This document presupposes that you already have MJPEGtools v1.6.x and y4mscaler (>= v0.5.x) installed.
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.)
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).
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.mXvUse 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
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.
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.