How to Create an MPEG Movie
from an MPIV0 Video File


Purpose

This document describes how to make an MPEG movie from an MPIV0 digital video file.

What You Need

You need:
  1. An MPIV0 file to be converted
  2. An SGI workstation in the Visual Computing Laboratory of the University of California, San Diego.
  3. The path environment variable set so that you can execute mpivtopnm, the mpeg codec, and the makempeg shell script. These should all be in the /local/zizkov6/vsam/bin directory.

Step-by-Step Instructions

  1. Create a set of ppm images from the MPIV0 file using mpivtopnm. For example:
    
    mpivtopnm vid.mpiv vid
    
    The above command converts the MPIV0 file, vid.mpiv, to the set of ppm files named vid.0000.ppm, vid.0001.ppm, vid.0002.ppm, and so on. Note that should the MPIV0 happen to be BW8 format, then mpivtopnm will produce black and white .pgm files that are not suitable for the makempeg script in the next step. If you have a BW8 MPIV0 file then convert the .pgm files to .ppm files using the pgmtoppm converter.
  2. Use the makempeg shell script to create the mpeg file. For example:
    
    makempeg -fs 0 -fe 300 -fi 1 -base vid
    
    makempeg has the following command line options.
    -fs #
    The number of the first frame in the sequence
    -fe #
    The number of the last frame in the sequence
    -fi #
    The increment between frame numbers
    -base string
    The base name of the files. The script expects files named string.????.pgm where the ???? is a zero-padded 4-digit sequence number.
    -ext ext
    Specifies the file extension to use in case the script cannot figure it out.
    The above example produces an MPEG file named vid.mpg that can be viewed with an MPEG player. The shell script produces YUV files from the .ppm files, puts them in /tmp (make sure there is enough room there) and converts the YUV to the MPEG. Although the YUV files should be deleted automatically, it doesn't hurt to check to see that they are gone. If the sequence is long you could easily fill /tmp.
  3. Delete all of the .ppm and .pgm files to save disk space. For example
    
    rm vid.????.ppm
    
  4. The MPEG file creation processes is now complete.

Web page design by Jeffrey E. Boyd