[FFmpeg-devel] av_set_pts_info() help

Kostya kostya.shishkov
Mon Sep 22 06:19:35 CEST 2008


On Sun, Sep 21, 2008 at 06:58:42PM -0400, Jesse L. Zamora wrote:
> Hello All,
> 
> I was wondering about void the av_set_pts_info function's parameters. I don't 
> understand what the av_set_pts_info(...int pts_wrap_bits...) parameter 
> means...or how it works. I notice that different demuxers have different 
> values, but what value would I use in some other demuxer? :-)

To put it simply it just tells by what value to increment frame timestamp
(or frame duration).
It should be given as a fraction of seconds, so if you have framerate 15fps,
you use increment 1/15th of second call av_set_pts_info(st, 33, 1, 15),
for 7.5 fps it would be 2/15 and av_set_pts_info(st, 33, 2, 15)
The second parameter there is precision of timestamps before they start
wrapping up, it may be leaved 33, I think.

It similar for audio but you can copy behaviour from wav.c in that
case for some demuxer ;)
 
> Thanks,
> 
> Xtreme Kommander




More information about the ffmpeg-devel mailing list