UCAR | NCAR | SCD | VETS Search | Contact Us
NCAR Visualization and Enabling Technologies  

Converting an Animation Sequence of RGB Images into a Web-ready Movie with SGI dmconvert


Most of the scientific animations we create in VETS are in the source format of a directory of high resolution RGB files numbered in sequence which are then played in the VisLab with Xmovie, a UNIX player that enables very high bitrate playback.

VETS Workflow

To prepare these high resolution source animations into a web-ready format, we use the following workflow:

  1. Use the Silicon Graphics utility dmconvert to create a lossless AVI for each animation at a frame rate appropriate for viewing (see detailed VETS workflow below). This requires that you have access to a Silicon Graphics workstation or server.
  2. Use the resulting AVI as the source file to create QuickTime/Soren and Real/G2 streaming videos with Discreet Cleaner (a streaming media batch conversion tool available for Mac and PC).
  3. If the appropriate frame rate for the animation is 24 fps or above, Discreet Cleaner can also be used to convert the AVI into an MPEG-1 file for UNIX users to download.
  4. If the appropriate frame rate for the animation is below 24 fps, another solution is required since MPEG-1 does not support frame rates below 23.976 fps. In this case we use a frame-multiplying script which uses dmconvert to save an MPEG-1 that closely approximate the frame rate set for the AVI.

Alternate Workflows

If working on both UNIX and Mac or PC platforms is not an option for you, it is possible to design alternate workflows:

  • A UNIX-only workflow would use dmconvert to save QuickTime and MPEG-1 formats. dmconvert does not support Real or WMP formats.
  • A Mac or PC only workflow would involve batch converting .rgb files to an intermediary format like TIFF and then loading those TIFF files into video authoring software like Adobe Premiere or Apple Final Cut Pro, setting an appropriate frame rate. The resulting video could then be prepared for streaming using Discreet Cleaner or a similiar product.

VETS Workflow in Detail

1. RGB image sequence to AVI movie

dmconvert is a utility that comes standard on SGI IRIX systems. It provides extensive format conversion capabilities. Consult the dmconvert man pages for more details. It is available on the following VETS systems: redcloud, cyclone, magic.

AVI is used as the movie format since it is lossless and provides for maximum quality. The AVI will later be compressed into streaming media formats.

When using dmconvert to create a movie from a sequence of RGB images, it is important to first decide on an appropriate frame rate for viewing. Short sequences and those where change is rapid require a slower frame rate. By default, dmconvert creates movies at a frame rate of 30 fps. To avoid dropping frames when saving movies at a lower rate, you must set both the inrate and rate video options at the same rate. To slow down an animation by a factor of 4, we would use a 7.5 fps rate rather than the default 30 fps. The dmconvert incantation would look like:

dmconvert -v -f avi -p video,size=640x640,inrate=7.5,rate=7.5,comp=none infile.????.rgb outfile.avi

Change the size, infile and outfile according to your situation. The four question marks in the infilename will result in dmconvert reading in all files with 4-digit numbers in the current directory in numeric sequence starting with 0001.

There is a known bug in dmconvert where the background color of the AVI output file turns blue. The work around is to add the following line to your .cshrc file:

setenv LD_LIBRARY_PATH /usr/local/lib/irix6.5.9

2 & 3. AVI Movie to QuickTime and Real Streaming Videos and MPEG-1

Use the resulting AVI as your source file to create QuickTime/Soren3 and Real/G2 streaming videos with Discreet Cleaner or a similiar conversion product. See Streaming Video Tips for more details. If your AVI has a frame rate below 24 fps, you will need to use step 4 below to create your MPEG-1.

4. Creating an MPEG-1 with a virtual frame rate below 24 fps

If the appropriate frame rate for viewing an animation is below 24 fps, a frame multiplying solution is required to create a movie which appears to move more slowly but is still moving at the high frame rate that the MPEG-1 format requires.

img2mov.pl is a PERL script written by John Clyne in VETS which multiplies image files and then uses dmconvert to create a movie that appears to move more slowly. Using the 7.5 fps AVI example above, we would multiply frames by 4 to create a 30 fps movie that essential runs at a quarter of the pace, just as our AVI file does. Using the incantation...

img2mov.pl <# frames> <dmconvert options> -- <imgfiles...> <moviefile>

the example would be...

img2mov.pl 4 dmconvert -v -f mpeg1v -p video,size=640x640 -- infile.????.rgb outfile.mpg

img2mov.pl is located on cyclone.ucar.edu in ~clyne/bin.


Author: Markus Stobbs
Contributor: John Clyne



Web Engineering
Terms of Use/License Agreement

UCAR NCAR SCD VETS Search VETS Contact Us NCAR Tornadic Thunderstorm NCAR Tornadic Thunderstorm Tornadic Thunderstorm