[FFmpeg-devel] [PATCH] lavf: inspect more frames when the time base is unreliable
Reimar Döffinger
Reimar.Doeffinger
Sat Jan 29 11:28:58 CET 2011
On Sat, Jan 29, 2011 at 02:39:38AM +0200, Anssi Hannula wrote:
> For the record, here you can see the progression of the cumulative error
> of the two competing rates when detecting the frame rate:
>
> 0.042000
> for 24.000000, at 0.042000, error 0.000333, cumulative 0.000000111
> for 23.976024, at 0.042000, error 0.000292, cumulative 0.000000085
> 0.041000
> for 24.000000, at 0.041000, error -0.000667, cumulative 0.000000444
> for 23.976024, at 0.041000, error -0.000708, cumulative 0.000000502
> 0.083000
> for 24.000000, at 0.083000, error -0.000333, cumulative 0.000000556
> for 23.976024, at 0.083000, error -0.000417, cumulative 0.000000675
> 0.125000
> for 24.000000, at 0.125000, error 0.000000, cumulative 0.000000556
> for 23.976024, at 0.125000, error -0.000125, cumulative 0.000000691
> 0.167000
> for 24.000000, at 0.167000, error 0.000333, cumulative 0.000000667
> for 23.976024, at 0.167000, error 0.000167, cumulative 0.000000719
> 0.208000
> for 24.000000, at 0.208000, error -0.000333, cumulative 0.000000778
> for 23.976024, at 0.208000, error -0.000542, cumulative 0.000001012
> 0.250000
> for 24.000000, at 0.250000, error 0.000000, cumulative 0.000000778
> for 23.976024, at 0.250000, error -0.000250, cumulative 0.000001075
> 0.292000
> for 24.000000, at 0.292000, error 0.000333, cumulative 0.000000889
> for 23.976024, at 0.292000, error 0.000042, cumulative 0.000001076
> 0.333000
Well, the problem is that the time stamps _do_ match 24 fps better
than 23.97..., and it is pure chance that parsing more changes this.
So this file simply isn't constant frame-rate.
But it might be possibly to go for whatever is stored in the MKV
file (if anything) in such an unclear case.
More information about the ffmpeg-devel
mailing list