[Ffmpeg-devel] Frame rates and time_base

Måns Rullgård mru
Fri May 6 23:30:59 CEST 2005


Michael Niedermayer <michaelni at gmx.at> writes:

> Hi
>
> On Friday 06 May 2005 17:05, M?ns Rullg?rd wrote:
>> After the latest framerate/pts related changes, I have a few
>> questions:
>>
>> - Is it still possible to find the framerate in AVCodecContext?  How?
>
> well, if its fixed fps, AVCodecContext.time_base should be
> 1/framerate and if its not fixed, well then theres no fps anyway
> (the old frame_rate wouldnt have helped you here either, as most
> likely it would have been 1/time_base)

Formerly, I'd get things like 1/25 in frame_rate/frame_rate_base.
Now, with the same files, I get things like 1/2 in time_base.  I'm
surely doing something wrong, but what?

> there is also AVFormatContext.r_frame_rate which contains
> libavformats guess of the framerate

Not (necessarily) using libavformat.

>> - What is the proper way to synchronize the pts values with timestamps
>>   from the containter?
>
> hmm, iam not sure what you are asking here ...

OK, I'll try to rephrase it.  Where does libavcodec get the values it
puts in AVFrame.pts?  If the demuxer supplies a pts with a frame, I'd
like that pts to appear in the corresponding AVFrame.  How do I tell
libavcodec about the pts of the encoded frames I'm feeding it?

-- 
M?ns Rullg?rd
mru at inprovide.com





More information about the ffmpeg-devel mailing list