Creating an MPEG from a directory of PPM still image files is quite easy using a tool called ImageMagick, which is installed on Owlnet. First, add the comp314/bin directory to your $PATH:

[for bash] $ export PATH=$PATH:/home/comp314/bin
[for tcsh] > setenv PATH $PATH:/home/comp314/bin

Now, to convert a directory of PPMs, run the convert tool as follows:

convert -quality 80 *.ppm output.mpg

The MPEG-2 file is saved as output.mpg. Wasn't that easy? You can tweak the -quality <percent> option to trade off file size for image quality (the ImageMagick MPEG encoder is lossy unless you tell it otherwise). You can specify any list of PPM files instead of *.ppm above; convert will smash them together in order, compress the result, and create an MPEG for you.

If you want to try using ImageMagick on your own computer (it's extremely handy: it can convert to/from almost any image file format, as well as creating animations like this), download it from imagemagick.org.

[Note: In previous years, we have made available the Berkeley MPEG decoder for students wishing to generate an MPEG animation from their still image files. You can still do it this way, if you want; use ~comp314/bin/mpeg_encode (along with a default params file).]