CSE as AND gate University of Washington  Department  of  Computer  Science  &  Engineering
 Screen Capture Utility and Post-Production Tools
  CSE Home  About Us    Search    Contact Info 

Return to Tools Index

Overview:

Lectures, demonstrations and tutorials frequently use a projected image of the presenter's computer screen as a visual aid.  In the cases where the projected image is a PowerPoint presentation or an electronic whiteboard session, there are specialized tools to handle the capture and archiving of the visual materials.  The screen capture utility and post-production tools are designed for the more general case, such as a demonstration of the functions of a piece of software, or the use of a web interface.  These tools were designed to make it easy to gather sequenced raw data from a computer display, and to transform the data so that it can be easily integrated with a Windows Media stream file (WMV file) to make a richer archived program. 

A typical production scenario would go as follows:  First, the lecturer would run the screen capture utility (ScreenCap.exe) during the presentation.  After the presentation, the raw data would be copied to a post-production system.  There, image preparation tools ImageScale.exe and cjpeg.exe would be run to scale the images, insert a mouse cursor, and do the appropriate jpeg compression.  Then, timing information would be extracted from the file names of the raw images, and used to build a file of script commands and markers which is suitable to be imported into the Windows Media streaming file, using a tool such as the Windows Media Indexer.  Finally, images and archived streaming file would be uploaded to appropriate servers.

Download Runtime Download Source

Configuration

 The parts used in this process are:

  1. ScreenCap.exe and ImageScale.exe, both Visual Basic programs.
  2. Cjpeg.exe, a freeware jpeg compression program.  This software was written by The Independent JPEG Group.  Sources  and much, much more can be obtained from http://www.ijg.org/
  3. Two perl scripts called ProcessImages.pl and MakeCapsScript.pl

The Visual Basic packages have setup programs, but if you already have VB 6 on your system, or if you have already run another VB6 Setup program on your system, you may be able to just run the executable.  If in doubt, see if the executable runs.  If not, run setup first.  To use the Perl scripts, you will need to get Perl from http://www.perl.com.  These scripts were developed and tested with Win32 Perl 5.

The ImageScale.exe and cjpeg.exe are designed to be run from the command prompt.  For convenience, it's best to copy them to a directory that is in your path, typically C:\windows or C:\winnt would do the trick.

Using the Screen Capture Utility

The Screen Capture utility (ScreenCap.exe) can run in timed mode or in manual mode.  When run in timed mode, captures will be automatically recorded at the frequency defined by the user.  In manual mode, the captures can be made by using a hot key (Ctrl-f) or by clicking the button on the utility's main dialog.  The hot key can be turned on or off independently of whether the timer is enabled.  After installing the utility on the presenter's system, run it and click configure. 

Set the timer, capture period, capture path, image size, and hot key as desired.  Note that if you turn the timer on, it will begin recording as soon as you click OK.  The capture recording process is fairly resource intensive.  You'll want to tune the capture frequency and size such that you can get the duration you want without filling all available free disk space with captures.  You'll also need to be careful that the capture process doesn't render the computer so unresponsive that it will be difficult for the presenter to use.  At the time of this writing, the bottleneck on today's well equipped computer seems to be disk write speed.  With a capture size of 640x480 or greater, it's difficult to capture more than two or three frames per second.  This makes the tool inappropriate for capture of rapidly moving animations.  To get images with full detail, set the presenter computer's screen resolution to match the capture size.  If the images will be scaled to a smaller size later, be sure to verify that fonts the presenter will use for critical text will still be legible at the smaller size.   Plan your disk space, accounting for approximately 900KB per 640x480 capture and 1400KB per 800x600 capture.  Captures will be written to a directory whose name begins with "SCREENCAP".  It's important that you don't rename the directory or the capture files because the information encoded in those names will be used in the post-production process.

Post-Production of Captured Images

The steps in image preparation are scaling the images to their final size, inserting the mouse arrow cursor, and compressing the images.  The first two steps are handled by ImageScale.exe, and the final step by cjpeg.exe.  To make it convenient to process many images at once, the Perl script ProcessImages.pl is used to run both ImageScale.exe and cjpeg.exe on a whole directory full of images.  Even though you may not normally call ImageScale or cjpeg directly, we'll describe them here for reference:

ImageScale is designed to be run from the command prompt.  It takes five arguments, three of which are mandatory:

   imagescale InputFile sx sy [dx] [dy]

Sx and sy are the dimensions of the source InputFile, and dx/dy are the desired dimensions of the destination or output file.  If dx and dy are not specified, the file will be scaled to 640x480.  ImageScale will scale the InputFile and create a new output file. The new file will be placed in the same directory with the input, and will have a name composed with the input file name followed by the new dimensions.  If a file with that name already exists, it will be overwritten.  The input file name is assumed to be composed following the convention used by ScreenCap:   "N-TTTTTT-X-Y.bmp" where:  N is a sequence number, TTTTTT is the time of the capture, and  X and Y are the mouse coordinates.  A standard arrow shaped red mouse cursor will be inserted into the output image with its point at {X,Y} relative to the source file dimensions.

Cjpeg is a jpeg compression utility written by The Independent JPEG Group.  It is fully documented at http://www.ijg.org/  To see its usage message, just run it without arguments.  For our purposes it will normally be sufficient to call it simply with:

   cjpeg inputfile.bmp outputfile.jpg 

ProcessImages.pl is the Perl script that ties together the other image processing tools, and handles batches of images at once.  The script is called like this:

  perl ProcessImages.pl -in InputDirName -out OutputDirName [-source x y] [-dest x y]

Errors will result if the input directory does not exist or isn't readable, or if the output directory does exist (the script won't overwrite an existing directory).  The optional -source and -dest parameters allow for the specification of image dimensions for the source and destination images, respectively.  If image dimensions are not specified, the defaults are 800x600 for source images, and 640x480 for the output images.  InputDirName should contain the bmp images created by the screen capture utility with their original names.  Before using, verify that imagescale.exe and cjpeg.exe are in your path.

Building the Windows Media Script

Another Perl script called MakeCapsScript.pl is used to build a file of script commands and markers suitable for importing into a Windows Media stream file (WMV file).  This script uses the image directory created by the Screen Capture utility as its input.  It extracts timing information from the file names and the directory name, and uses this information along with a user supplied offset to determine the timings.  Before running the script, edit the first executable line to specify the base URL where your screen capture jpeg images will be stored.  After saving your changes, run:

  perl MakeCapsScript.pl ImageDir [offset] 

The ImageDir is the one created by the screen capture utility whose name begins with SCREENCAP.  It's important that you don't rename it, since the script will use the time encoded in this directory name as the default "time zero" for the script commands and markers.  The optional offset is a positive or negative number to be added to each timing.  This is usually necessary to properly synchronize a script with a saved WMV file.  Any script command or marker timings that would be negative after the offset has been applied will be filtered out of the output.   To save the results to a file, use the output redirection operator ">" and a new file name at the end of the script command line.

Return to Tools Index


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]