You are currently viewing 干货分享 | TSMaster如何同步播放视频和总线记录文件

Sharing | How to Synchronize Video Playback and Bus Record Files in TSMaster

Recently, there are a lot of partners are more interested in our TSMaster background operation applications, such as "how to synchronize the background video playback and bus record files", "how to automatically send LIN messages through the code" and so on. We will publish a series of application notes about TSMaster for this kind of questions.

Keywords: video playback, online playback, bus playback

Table of Contents for this article

I. Video playback window

The TSMaster video playback window can play mainstream video formats, and users can open one or more video playback windows, as shown in Figure 1.

Figure 1 TSMaster Video Playback Window

1|Direct Video Playback

Click the Open button to select the video file, make sure that the drop-down box of "Associated Bus Playback Engine" is selected as "None", then the video can be freely played, paused and stopped, as shown in Figure 2.

Figure 2 Selecting a Video File

Click the Play button to play the video file freely (shortcut key F9). Once playback has started, you can click the Pause button to pause the video playback (shortcut key F10), and click the Play button again (F9) to resume playback.

Click the Stop Play button to stop the playback of the video file (shortcut key F11).

Click the Stretch button to maximize the image stretched in the window (shortcut F4):

Figure 3 Image Stretching Display

2|Associated Bus Playback Engine Video Playback

2-1 Configuring the Bus Online Playback Engine


Open the Bus Playback window and select Online Playback Configuration:

Figure 4 Video Playback Only Supports Online Playback Engine

Right click in the blank space of the list to add the blf file to the list.

Select one of the playback engines from the list and configure its parameters, e.g. whether to start playback automatically, to which bus channel to playback, etc:

Figure 5 Configuring the Online Playback Engine

2-2 Associating the Video Playback Interface to a Bus Playback Engine


Open the "Video Playback" window, in the "Associated Bus Playback Engine" drop-down box, check the online playback engine you want to associate:

Figure 6 Associated Online Playback Engine
With the playback engine associated, the manual playback control buttons will not work, and the start, pause, and stop functions of video playback will be fully controlled by the bus playback engine:
Figure 7 Manual Control Buttons for Video Playback Function Disabled After Associating the Bus Playback Engine

2-3 Run online playback, video playback will be triggered synchronously


After connecting TSMaster's channel, start the online playback engine and you can see that the video playback is synchronized with the bus playback:

Figure 8 Video playback will be synchronized when bus playback is activated
When you click Pause on the bus playback engine, the video playback is paused:
Figure 9 Video playback will be synchronized with bus playback in real time

2-4 Applying Time Offset


If the start time of the video deviates from the start of the bus time (e.g. by 10 seconds), you need to set this relative deviation time in the video playback interface:

Figure 10 Setting the Time Offset
When bus playback is initiated at this point, the start time of the video will start at 10 seconds.
Figure 11 Video playback with time offset applied

II. Video analysis

1|Single Frame Analysis

Use the step buttons in the toolbar menu for functions such as single-frame stepping:

Figure 12 Single Frame Analysis Function Buttons

Due to the unidirectional nature of video playback, TSMaster supports debugging video stepping in the direction of positive time elapsed, and the buttons that support stepping are colored differently than the other buttons. The three green buttons out of the four indicate simply moving the video to the specified frame, while the blue stepping buttons step both the video and the message (if associated with an online playback engine).

Move to the first frame (shortcut key F3);   

Move to the previous frame (shortcut key F7);

Moves to the next frame (shortcut key F8) while playing back all messages within the time from the current frame to the next frame;

Move to the last frame (shortcut key F12);

After a single frame step, the status bar below will be synchronized to show the frame and time information that you are currently in:

Figure 13 Frame position information displayed in the status bar

2|Video Positioning

Use the drag bar below to locate the specified frame in the video. During the dragging process, the status bar next to and below the cursor will display real-time information about the positioning of the video:

Fig. 14 Real-time display of positioning information during dragging
After dragging the video to a specified position, you can continue to play the video based on this position (shortcut key F9), or analyze the video in a single frame (shortcut key F8).