Syncronizing Video and Data in MATLAB

The collection of video along with other data sources can help to enhance analysis of an experiment. But, the video and data need to be syncronized to become useful. This page documents some useful ways to syncronize video and data using the MATLAB software package.


Here is some code developed for Stanford tests by AMcClung:

Name Notes
VIDSYNC_V42.zip This package is based on v3.0 w/progress. It has been updated and specialized for use on SwRI force data. Now, shortened time segments can be sync'd exclusively, and its possible to load additional video data for preview (Rev 4.2 04/29/06)
VIDSYNC_woPROGRESS.zip This package will load the video file without any feedback, so the program may pause for a LONG time (depending on your system speed) with no feedback to the user. (Rev 3.0 05/14/05)
VIDSYNC_wPROGRESS.zip This package will load the video file with updates every 10 frames to let the user know that progress is still occurring. To accomplish this, one of the built-in MATLAB functions was augmented, and requires some files located in the packaged includes/ folder. (Rev 3.0 05/14/05)

NEW Rev 4.1 now includes the ability to load additional blocks of video for previewing. It also contains options to NOT sync the entire overlapping length of video data, but a specified time range (with time based on either data or video). It seems to be necessary to convert the SwRI MPG movies to some AVI format. FFMPEG (download) seems to work well for this.
Example output: 1) VidDataSync_060428-113717.avi

Rev 2.0+ now reads both *.MAT (from logger) and *.DAT (from force plate) data files for use in syncronizing. For logger files, the variable and specific columns can be selected for the sync. For force plate files, this is hard-coded by the column (so, change this within in the code as necessary).
ALERT! NOTES:
  • On PCs, the standard MATLAB helper scripts can handle many compressed and uncompressed AVI video files.
  • On Unix, the standard MATLAB helper scripts can handle only uncompressed AVI. Also, the version w/progress may require additional scripts from $MATLAB\toolbox\matlab\audiovideo\private to be placed in the includes folder to work properly.
  • On any machine with a screen resolution lower than 1280x1024, the syncronizer gui may not be displayed properly.

Example output: 1) SyncTestClimb4a.avi , 2) SyncTestAccel4a.avi


Here is some code developed for UC Berkeley tests by DanGoldman:

Name Notes
moviedataforwillandtrey.m Loads TIFF/AVI video and force plate data to create a movie of syncronized data.

Example output: r1_10c.avi

-- AMcClung? - 02 May 2005

 
This site is powered by the TWiki collaboration platformCopyright &© by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback