[Ffmpeg-devel] Re: Bethsoft VID demuxer and decoder

Michael Niedermayer michaelni
Tue Mar 27 03:18:43 CEST 2007


On Mon, Mar 26, 2007 at 04:54:08PM -0700, Mike Melanson wrote:
> Michael Niedermayer wrote:
> >this is wrong, you should set the proper timebase (and i suggest you dont
> >look in demuxers written by melanson ;) for figuring our how to do that)
> See, that's why I advised him to direct this patch to the broader list. 
>  All of my demuxers predate the new pts system and I still haven't 
> figured it out. 

whats a timebase?
its simply the units in which timestamps are stored
1 second for example is one, 1/100 second too is one ...

now for example if we have a 25 fps video and a 1/100 second timebase then the
frames could have the following timestamps 

if we have a 1/150 second timebase then our 25 fps video would have

and a 30 fps video with 1/150 timebase would have

if we now have a video with 1/30 fps which has a few identical frames which
have been skiped and arent stored then the timestamps might be

a 30 and 25 fps mixed video with 1/150 second timebase could look like

av_set_pts_info(AVStream *s, int pts_wrap_bits, int pts_num, int pts_den);

av_set_pts_info() sets the timebase and the number of bits each timestamp has
so if timestamps are stored as 33 bit values like in mpeg then pts_wrap_bits
is 33, if they are stored as 64bit values in the bitstream then its 64
pts_num is the numerator of the timebase, pts_den the denominator

i hope this makes the whole clear to everyone ...

> How I rose to be the FFmpeg mentoring administrator is 
> anyone's guess. :)

you volunteered ;)
and handled last years soc excellently btw ...

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070327/de72756b/attachment.pgp>

More information about the ffmpeg-devel mailing list