[Ffmpeg-cvslog] Re: ffmpeg-cvslog Digest, Vol 12, Issue 46

Rich Felker dalias
Tue Mar 28 18:50:57 CEST 2006

On Tue, Mar 28, 2006 at 06:22:38PM +0200, Michael Niedermayer wrote:
> > While I assume you have tested this and it works, there is a dangerous 
> > change in this code. For the moment lavf doesn't handle the "Track 
> > Timecode Scale" (used to mix audio from 30fps & 25fps with the same 
> > video) and it's a float. I'm not sure it will fit that new design. You 
> > might lose some precision when you do :
> > 
> > block_time = ((data[0] << 8) | data[1]) * track->timecode_scale;
> *  this is the old code, not the new and yes i agree that the old code has
>    the issue you describe
> *  32bit floats are not precisse enough as timebase (or timebase adjustment)
>    you will have very noticeable AV-deync after a few days, this is an issue
>    with the spec not an implementation

Somehow I doubt the matroska developers care about files that extend
for a few days, or anything other than warezed movie rips... :)

Anyway yes this is a problem, and the approach of using a time
rescaling is rather bad. If they want to mix 30000/1001 and 25 fps
content in the same file and align them to the same time then they
should just change the framerate in the NTSC part to exactly 30 (or
the PAL part to exactly 25000/1001) at the codec level rather than
changing the audio rate depending on which video track is selected.
Otherwise interleaving order will be blatently wrong after a short
amount of time...


More information about the ffmpeg-cvslog mailing list