[FFmpeg-devel] [RFC] consider all mpeg4 tb_unreliable()
Michael Niedermayer
michaelni
Sun Apr 19 20:50:28 CEST 2009
On Fri, Mar 06, 2009 at 04:23:25PM +0100, elupus wrote:
> Hi,
>
> I just ran into an avi file which contains a mpeg4 video stream with a
> time_base of 23.9.. This have been muxed into a 25fps avi, and the audio
> resampled to sync..
>
> Now r_frame_rate for this file get's set to 23.9.. instead of the real
> framerate (at playback based on timestamps), 25 fps.
>
> Forcing the codec to be considered as tb_unreliable() will work for the
> sample in question ( 25fpsVidConsidered24fps.avi in incomming ).
>
> But i'm not sure what other problems that might cause.
>
> Any thoughs?
Maybe tb_unreliable() could check if codec and container time_base are
close but unequal and if so return true ?
because if 0.5 < tb0/tb1 < 2.0 // tb0!=tb1 then one almost has to be wrong
the alternative i see would be to bias the decission stronger toward the
container timebase, that is add a *2 in
if( st->codec->time_base.den * (int64_t)st->time_base.num
<= st->codec->time_base.num * st->codec->ticks_per_frame * (int64_t)st->time_base.den){
patches welcome, tests too
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I do not agree with what you have to say, but I'll defend to the death your
right to say it. -- Voltaire
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090419/4363a0ef/attachment.pgp>
More information about the ffmpeg-devel
mailing list