MPEG_OPEN function initializes an IDLgrMPEG object for
MPEG encoding and returns the object reference. The MPEG routines provide a wrapper around the IDL Object Graphics IDLgrMPEG object, eliminating the need to use the Object Graphics interface to create MPEG files.
This routine is written in the IDL language. Its source code can be found in the file
subdirectory of the IDL distribution.
mpegID = MPEG_OPEN(
A two-element vector of the form [
] indicating the dimensions of the images to be used as frames in the MPEG movie file. All images in the MPEG file must have the same dimensions.
Set this keyword equal to a string representing the name of the file in which the encoded MPEG sequence is to be saved. The default file name is
The following sequence of IDL commands illustrates the steps needed to create an MPEG movie file from a series of image arrays named image0, image1, .., image
is the zero-based index of the last image in the movie:
mpegID = MPEG_OPEN()
MPEG_PUT, mpegID, IMAGE=image0, FRAME=0
MPEG_PUT, mpegID, IMAGE=image1, FRAME=1
MPEG_PUT, mpegID, IMAGE=imagen, FRAME=n
MPEG_SAVE, mpegID, FILENAME='myMovie.mpg'