[MEncoder-users] converting a 59.940 FPS avi into a 23.976 FPS one

Trent Piepho xyzzy at speakeasy.org
Wed Feb 2 03:25:03 CET 2005


On Sat, 29 Jan 2005, D Richard Felker III wrote:
> > > well first of all we need to know more about the source. this is very
> > > strange source. is it really 60 (59.94) distinct, progressive frames
> > 
> > It's not that strange at all.  It's what ABC broadcasts all day long when they
> > don't have native HD content.  It's NTSC upconverted from 480i-60000/1001 to
> > 720p-60000/1001.  It could be telecined, but probably isn't.  
> 
> ok, then encoding at 29.97 (30000/1001) fps will do fine, i expect.

That's a sub-optimal way to encode it.

The proper thing to do depends on the original source, is it 60 fps or 24 fps? 
I'm omitting the factor of 1000/1001 for the sake of brevity.

A 60 fps source is something shot on video as opposed to film, like a low
budget tv shot, the news, sports, porn, etc.  In this case think of the
original video as 640x240 frames at 60 fps.  The TV station up-converts each
frame from 620x240 to 1280x720 by adding black bars to the sides and scaling. 
If you want to encode this properly, you should scale the height down by a
factor of 2 (relative to the width) and encode as an interlaced sequence at
30fps.  mpeg1 doesn't support interlaced sequences, while mpeg2 does.  I don't
know about other codecs.

You could also take every other 640x240 frame, and attempt to blend them
together into a 640x480 frame using a de-interlacing filter.  Then encode
these 640x480 frames at 30 fps.

If you drop every other frame by just changing the framerate to 30 fps, you
are losing half your vertical resolution by encoding scaled video.  Basically
you are taking 640x240 frames at 60fps, dropping every other frame, scaling
them up to 640x480 and then wasting bits encoding 480 lines when you really
only had 240.

If it's a 24 fps source, the TV station should have converted it to 24 fps,
but usually they don't.

When a 24 fps source is converted to NTSC at 60 fps, it is split into fields
and undergoes a 2:3 pulldown.  If you have four film frames 1 to 4, the Odd
and Even fields are sent like this:

1o 1e 2o 2e 2o 3e 3o 4e 4o 4e    <- 60 fps

Drop every other field to go from 60fps to 30fps and you get this:

1o 2o 2o 3o 4o     <- 30 fps

You end up doubling every fourth frame, which gives a noticeable stutter.
It would be much better to drop the repeated frame, and encode at 24 fps.

The TV station may have been nice enough to de-telecin the 24 fps content
partially, but not all the way to 24 fps.  This is what a progressive
scan dvd player does.  The four film frames become:

1 1 2 2 2 3 3 4 4 4     <- 60 fps

Each entire 640x480 frame is sent twice then three times, since this
is 480P (or 720P) high-definition progressive output.  Drop every other frame
and you again get 1 2 2 3 4, the double frame stutter.  Much better to
recognize the 1 1 2 2 2 pattern and covert to just 1 2 at 24 fps.




More information about the MEncoder-users mailing list