[FFmpeg-devel] [PATCH] simplify ipmovie.c pts calculation

Michael Niedermayer michaelni
Thu Feb 26 19:50:47 CET 2009


On Thu, Feb 26, 2009 at 07:31:04PM +0100, Reimar D?ffinger wrote:
> On Thu, Feb 26, 2009 at 07:01:49PM +0100, Michael Niedermayer wrote:
> > On Thu, Feb 26, 2009 at 06:47:23PM +0100, Reimar D?ffinger wrote:
> > > On Thu, Feb 26, 2009 at 05:14:16PM +0100, Michael Niedermayer wrote:
> > > > why does lavf fail?
> > > > could you print the duration from the packets (i mean pts-last_pts) ?
> > > > if they are (near) multiplies of some integer lavf should find the
> > > > timebase, if OTOH they are random then 1/1m is maybe the best timebase
> > > > in which these can be specified exactly
> > > 
> > > Can you point me to the code that does this guessing? I didn't find it.
> > 
> > see code calling tb_unreliable() in lavf/utils.c
> 
> Maybe that is just a bad name, but the time base is not unreliable, not
> a bit, it is 100% exact. It just has no relation with the frame rate
> (admittedly, tb_unreliable checks if the time_base would make a valid
> frame rate).
> Obviously, the code around line 2192 in utils.c is supposed to fix up
> that kind of thing.

> I guess the error is in that completely unexplained and mysterious
> calculation of the initial best_error value.

its set so that only frame rates are accepted that would generate the
found timestamps within +-1 or so rounding errors in the timestamps.


btw you multiply 2 values together to get pts differences, what are these 2 values?

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- 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/20090226/ec34cf82/attachment.pgp>



More information about the ffmpeg-devel mailing list