Back to News
How to Make MPEG Movies
Date : March - 25 - 2009
Author : Lowell Bradford
How to Make MPEG Movies

Creating MPEG movies on a UNIX system differs greatly from creating an MPEG movie on a Windows system. First, the user needs to have data image files stored on their UNIX system for use in creating the movie. Any of the most common forms of image files may be used, including .rle, .ppm, .jpg, .gif, and .tiff. Any image file that is not in .ppm format will need to be changed to .ppm format for the conversion into YUV files. There are many available public domain programs, like NetPBM, that will assist in the conversion process. While any sized image may be used in the formation and creation of MPEG movies, it is recommended that dimensions divisible by sixteen be used. Should the MPEG movie be intended for the web, it is recommended that the image data be scaled to 320 pixels by 240 pixels, but 160 pixels by 120 pixels works better. This enables the movies to play at manageable speeds and resolutions.


The next step is to convert the .ppm files (portable pixmap file format) into their respective and separate Y, U and V files. The Y, U and V files represent the luminance and chrominance of the image and were founded in the days of color tube televisions; each one of these files is a separate signal. To convert the .ppm files into the YVU files is to use the same program that converted the original files to .ppm files. In NetPBM, it is "ppmtoyuvsplit." Now the YUV files need to be combined, or assembled, into an MPEG file output using an MPEG encoder. Commonly used is the "mpeg" encoder, which is found on most UNIX systems, while at the same time, there are plenty of other encoders to chose from.


The entire process of converting files to .ppm, and then to YUV, can be accomplished using the command "makempeg." This command will create an MPEG movie from a series of image files, creating all of the necessary arguments needed to use the MPEG format. Before proceeding with this, make sure that the program "ppmtoyuvsplit" is in the path, there is a set of image files ready to use, and there is enough free space to use these images. An MPEG display program will be needed to view the MPEG movie created. ImageMagick is a versatile display program for UNIX and can be used for conversion as well. These display programs can be found on a multitude of software and education websites for download and use. In addition, most UNIX systems have a display program built into them, and a user should check the specifications to see which files it can and cannot display.


In order to have all of the images turn into a movie, a shell script must be used to create the coding that tells the images when and how to change. A shell script is a written list of instruction or commands that are intended to be carried out or executed by a shell or other command interpreter. Because the UNIX interface is direct, with no graphic interface, the shell script tells the operating system exactly what to do and when to do it. Shell scripts finalize the process and wrap all the coding and conversions into a single file that can be read and executed by the system. Shell scripting help is abundant and can be found multiple places and on many UNIX forums.



More Products
Share |