Creating MPEG Still Images for VCD/SVCD

This document presupposes that you already have MJPEGtools v1.6.x and y4mscaler (>= v0.5.x) installed.

Step 1: Make a picture.

Create your source image. It does not need to have a 4:3 aspect ratio, however it will be displayed that way, so keep that in mind. The overall size of the image is not important either, since it will be rescaled as needed to match the VCD/SVCD specifications.

Keep in mind that due to overscanning, a regular TV set will not show the outer edges of the image. The image will effectively be cropped by about 3 percent on all sides. For a 640x480 image, the visible portion on an NTSC set is approximately the middle 608x448 pixels.

Save the image as a raw PPM. (You could save it as anything you want, but then you would need to use one of the NetPBM tools to convert it to raw PPM anyway.)

Step 2: Convert it to an MPEG Still video stream.

Use the following command-line to convert your PPM image to an MPEG still video stream (this should all be on one line):

ppmtoy4m -Ip -FFPS YOUR_IMAGE.ppm |
y4mscaler -O preset=TYPE |
mpeg2enc -f MPTYPE -T TRGSIZE -o YOUR_IMAGE.mXv

The italicized arguments above can be filled in from the table below. By convention, the extension on the output filename should be ".m1v" if it is a VCD still (MPEG-1 encoding) or ".m2v" if it is an SVCD still (MPEG-2 encoding).

MPEG still conversion arguments
SystemDisc TypeResolution FPS TYPE MPTYPE TRGSIZE
NTSC SVCD low 30000:1001 SVCD_STILL_LO 7 42
high 30000:1001 SVCD_STILL_HI 7 120
VCD low 30000:1001 VCD_STILL_LO 6 42
high 30000:1001 VCD_STILL_HI 6 120
PAL SVCD low 25:1 SVCD_STILL_LO 7 42
high 25:1 SVCD_STILL_HI 7 120
VCD low 25:1 VCD_STILL_LO 6 42
high 25:1 VCD_STILL_HI 6 120

Step 3: Convert that into an MPEG system stream.

The video/image stream created above cannot directly be used on a VCD or SVCD. The last step is to encapsulate it into a "system stream". (This step is called "multiplexing", because usually this is where a video stream and an audio stream are jammed together to create a complete movie. Stills don't have audio tracks, but all the same they need the same repackaging step.)

Use the following command-line:

mplex -f MPTYPE -o YOUR_IMAGE.mpg YOUR_IMAGE.mXv
Use the same MPTYPE parameter that you used in Step 2.

For a VCD, you may actually multiplex a high-resolution still and a low-resolution still together into the same system stream. Just make two video stream files (one lo-res and one hi-res, doing Step 2 twice), and give the names of both files on the above command line. The lo-res file should come first, like this:

mplex -f MPTYPE -o YOUR_IMAGE.mpg YOUR_IMAGE-lo.m1v YOUR_IMAGE-hi.m1v

Step 4: Stick your still into a VCD or SVCD.

You'll have to consult other documentation to do this. Just remember that MPEG stills can only be used as segment items, never as sequence items.


return to the video library

maximum impact research
Digital Media Group
<dmg at mir.com>
Last modified: Sat Nov 29 13:35:54 EST 2003

©2003 Matthew Marjanovic.
This material may not be republished in any form without express written consent of the author.