[Ffmpeg-devel] wrong framerate in mpeg4 file?

Rich Felker dalias
Sat Sep 24 15:38:06 CEST 2005


On Sat, Sep 24, 2005 at 12:03:55PM +0100, M?ns Rullg?rd wrote:
> The Wanderer <inverseparadox at comcast.net> writes:
> 
> > M?ns Rullg?rd wrote:
> >
> >> Rich Felker <dalias at aerifal.cx> writes:
> >>
> >>> Treating 1 specially is definitely wrong. 1/25 is a typical valid
> >>> timebase. The problem is that the codec's framerate is being used
> >>> at all. If the container contains a framerate/timebase, this must
> >>> be used.
> >> Why?  When the two disagree, the container is just as often the one
> >> that's wrong.
> >
> > I have no technical knowledge in this area (which, of course, means I
> > probably shouldn't speak up - but then I'm me), but my guess would be:
> > because it's much easier to change the information (and thus fix the
> > problem) in the container than it is to do the same thing in the codec
> > (without damaging anything, i.e. without transcoding). If the two both
> > have values for the framerate/timebaes, and the player uses the
> > container's value, and it's wrong, then the problem can easily be fixed
> > by remuxing; on the other hand, if the player uses the codec's value and
> > *that* is wrong, there's probably not much you can do about it (in most
> > cases, anyway) without transcoding the video and thus losing quality.
> 
> That's a valid point.  Although the frame rate information on the
> codec level could be corrected without reencoding the video, I've yet
> to see a program capable of doing it.  However, the quality of
> encoders tends to be better than that of muxers, so any random muxer
> is more likely to produce incorrect files than a random encoder.

FYI: when encoding with mencoder and not -vf harddup, the timestamps
in the video stream can be entirely wrong, and the framerate is also
wrong since it's not cfr. The timebase in the avi header is correct.

Rich





More information about the ffmpeg-devel mailing list