From: John Stone (
Date: Mon Apr 11 2005 - 14:44:42 CDT


On Mon, Apr 11, 2005 at 02:44:01PM -0400, wrote:
> I also found the gif file is a lot larger than the mpg file, about 3 times
> larger? To get around this, you will have to have larger memory and faster cpu.

GIF is a very bad format for animations. I consider it a method of
last resort.

> As mentioned in John (Stone)'s email, he (and the VMD team) is going to make
> it standard to add some redundant pictures in between frames to slow down mpg
> movies. I would suggest to insert blank frames, which will not increase the
> size of the final movie. This will have the same effect on slowing down the
> frame rate. If identical frames are copied and put in the video sequence, the
> movie will be awefully larger and it will also consume lot more memory.

Before coming here to work on VMD I used to write MPEG video encoders,
so I know a few things about video compression :-)
A well-written video encoder will not double the size of the movie file.
Duplicated frames in a movie sequence would be compressed with
"no-coded" macroblocks/frames, i.e. the video playback device is told to
essentially "do nothing" for these blocks for one frame. There's a
small amount of additional bits for a frame like this, but only a
fraction of the size of a whole frame. This is akin to your suggestion
of going back in and adding "blank" frames, except that by allowing
the video encoder to do it for itself, you don't corrupt the MPEG GOP
by editing, and the MPEG encoder should be able to do a better job
with rate control than a post-edited sequence would. This technique
is not unique to MPEG video encoders, many compression formats also
allow this method to eliminate redundant data. The main issue here
is that you're stuck with the intelligence available in the MPEG encoder.

It's pretty easy to detect identical input frames. This identical frame
detection is also used for things like "inverse telecine", eliminating 3/2
pulldown from video sources which originated in 24fps film, were converted
to 30fps video by frame duplication, and are then converted back to
24fps MPEG by detecting the identical frames and eliminating them.

Since MPEG only allows a fixed set of frame rates, frame duplication
is the only away to achieve other playback speeds. Ideally the MPEG
encoder will detect frame duplication and do the right thing. I can't
vouch for the freeware encoders, but professional video encoders definitely
take advantage of every trick in the book to yield the best compromise
between movie size and quality, and they'd definitely do the right thing
in this particular situation.

  John Stone

> Marc

NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email:                 Phone: 217-244-3349              
  WWW:      Fax: 217-244-6078