MPEG-1 Animation Comments
by Matt Giwer, © 2003 [May]

  • These comments are primarily directed towards size limited animations rather than time limited. Size limited is used in the IRTC Animation competition.
  • These comments may apply more than just MPEG-1 but I have no idea.

MPEG-1 does two things. If the images are not originally JPEG they are converted to JPEG. Then it determines the changes between the resulting JPEG frames to create the animation. Thus size is determined by two thing the size of the contributing JPEGs and the changes between the JPEG frames. Thus the smallest size is obtained by the smallest JPEGs and the fewest changes between sequential JPEGs.

The first step of letting your mpeg encoder do the conversion does the standard .75 quality conversion. However using any number of common programs you can convert them yourself to a lower quality and compile the animation with the lower quality frames. Also when creating the frames you can keep them simple to begin with.

The second step of the differences between frames a star field is a good example. When panning a star field such as following an object through a starfield the stars move with every frame. Therefore the entire background is different with every frame and the resulting MPEG will be large.

On the other hand if the camera does not pan but lets the object move across a fixed background only the area the object covers changes so the MPEG is smaller.

IFRAME, PFRAME, BFRAME
I have no idea what they mean either. I looked up the definitions once but that didn't tell me anything useful. A little experimentation never hurts.

The larger those numbers the smaller the resulting mpeg and the ower the quality. This only means something if you are creating a size limited rather than time limited animation.

How to make use of it
The script for mpeg encoding only allows one set of IPB values so why bother tailoring the scenes? And as it only allows one declaration of type of input frame such as PPM or JPG all of the above seems mostly a wasted discussion.

Because current mpeg players like Windows Media Player and Mplayer for linux only look at the first header and ignore all subsequent headers. This means you can do

cat a1.mpg a2.mpg > a12.mpg

to get one mpeg showing a1 and a2 sequentially.

You can string together scenese created with any input format and any I,P,B values into a single animation.

Why?
Because the faster the motion in a scene the less important the detail in each frame of the scene. Scenes with fast motion can be assembled at lower quality then other scenes and very simply joined together. And that saves a lot of time in developement.

What you cannot do
You cannot change the image size. It looks like a TV that needs ajusting. With Mplayer you can change frame rate and only get a warning message. I do not know if Media Player is as forgiving.

Optimum number of frames against file size
I do not know how to calculate it or even a good rule of thumb but with motion from A to B it is at times possible to increase the number of frames with proportionately less motion per frame and get a smaller file size. I include this for completeness.

Page reads: 3584