CSE as AND gate University of Washington  Department  of  Computer  Science  &  Engineering
 Capturing and Synchronizing Slides with WMV
  CSE Home  About Us    Search    Contact Info 

Introduction

This page describes a methodology and a set of custom tools used for capturing high-res slide images from a lecture, and preparing them for playback, synchronized with a Windows Media video.

The basic elements described are:

  1. Capturing high resolution images from a VGA source
  2. Encoding WMV with embedded timing information
  3. Post-processing, including slide image filtering and automated synchronization
  4. Synchronizing system time between the capture and encoding systems
  5. Basic HTML/CGI support for embedded video and slides.

Capturing Images from VGA Source

The image capture was done using the Epiphan VGA2USB.  This is an inexpensive USB2 framegrabber.  We installed the Epiphan driver and a simple capture application on a image capture computer system, plugged the USB2 interface from the framegrabber to the image capture system, and plugged the VGA signal from the lecturer laptop into the framegrabber VGA interface.  We used an old PIII Windows laptop for the image capture system.  The capture application was configured to capture one image every 3 seconds from the lecturer's laptop.  The time of the capture of each file was preserved in the Windows File Modification Time.  The images were compressed to jpg format automatically by the Epiphan software.  To make the modification time meaningful, it was important that the system time on the image capture system was synchronized with the Windows Media Encoder system (see below).

Encoding WMV with Timing Information

To permit the slides and the video to be synchronized automatically, we implemented a custom tool to insert timing information into one of our Windows Media archives.  One goal in the collection of this timing information was that it should persist even after the archive file had been cropped to remove the dead time at the beginning and end.  The approach taken was to insert a custom Windows Media script command containing the system time into the WMV at a regular interval.  Provided that the system clock on the encoder system is correct, this approach allows us to automatically synchronize any portion of the resulting WMV  with the relevant slides.

The tool used for this process is here:

This is a Windows console application.  To install it, simply copy the Debug or Release directory containing the exe to the target system.  The single required argument is the WME file, defining the desired encoding properties.  The WME file must include provisions for a script stream so that the tool can insert the SYNC script commands.  When it runs, the tool runs the encoder and loads the specified WME file.  If credentials are required for connection to a server using the Push method, the tool will prompt for them. 

After starting the encoder, click the encode button on the WME interface as normal.  While the encoder is encoding, the tool will report when a SYNC script command has been successfully inserted.  To quit the encoder, press 'enter' at the command prompt.

Post-processing

The first step in the post processing is to remove the dead time from the beginning and end of the WMV file.  This may be done with the Windows Media File Editor, among other tools.

To complete the post processing, we created a custom Windows application the basic functions of which are:

  1. Parse a WMV, and using the SYNC script commands, determine its start time and duration.
  2. Parse a directory of slide image files.  Remove those files which do not fall between the WMV start and end time, and remove duplicate and near duplicate files.
  3. Insert URL script commands into a copy of the WMV, one for each of the set of filtered slides.  These represent slide transitions.
  4. Upload the resulting slide set to a web server, and the resulting WMV to a Windows Media server.

The post-processing tool is available here:

To use this tool, first crop and name the WMV as desired.  Put the WMV in a directory with a subdirectory containing the raw slide captures.  There should be no other files or directories in the directory.  Specifiy this as the input directory in the SyncSlides tool's UI.  Fill in the other desired fields on the tool's UI, and click the Process button.

Time Synchronization

In a Windows domain environment, a simple way to synchronize clocks is to use 'net time'.  Our arrangement of systems included several networks with no domain which caused some problems with the use of 'net time'.  Instead, we used a custom time sync tool which used the daytime protocol to synchronize clocks.

This is a Windows console application.  To install, simply copy the Debug or Release directory containing the executable to the target system.  It requires one or more arguments.  The arguements are names or IP addresses of servers supporting the Daytime protocol.  The tool will progressively try each until one succeeds.  A list of DayTime servers was supplied by http://www.nist.gov.

Basic HTML/CGI Support for Embedded Video and Slides

Our goal in designing HTML/CGI support was to provide one simple solution which would function on multiple browsers.  The basics of embedding Windows Media Player for IE and Firefox browsers is well described elsewhere, for example the Windows Media Player SDK, and will not be discussed here.  A key observation is that the simple cross-browser solution can be created using the DefaultFrame parameter on the Windows Media Player embedded object.  The frame identified as the default frame will automatically be the target of all URL script commands embedded in the Windows Media stream with no additional scripting.  One drawback with this approach is that one must use a frameset which imposes many limitations on page layout.




CSE 
  
  
  
  logo Computer Science & Engineering
University of Washington
Box 352350
Seattle, WA  98195-2350
(206) 543-1695 voice, (206) 543-2969 FAX
[comments to E-mail the page owner]