[Ffmpeg-devel] Re: ffmpeg-devel Digest, Vol 4, Issue 34

Michael Niedermayer michaelni
Sat Jul 16 01:04:40 CEST 2005


On Friday 15 July 2005 23:20, Nicolas Roussel wrote:
> >> I'm having a hard time trying to understand how much time I can spend
> >> between frames to process the movie at nominal speed.
> >
> > frame.pts - last_frame.pts obviously
> Ok...
> But what if frame.pts<last_frame.pts? (seems to happen if the current
> frame is an I frame).

the pts of a frame which is output by the decoder is the dts of the packet 
which has been input and its also the reordered pts of the packet

some formats like mpeg also allow these values to have discontinuities which 
have to be detected and dealt with for example by using AVPacket.duration

also note that AVPacket.duration is not always available although it should be 
available for mpeg1/2 
and summing AVPacket.duration over several packets will be inaccurate just in 
case you are planing to try that ...


More information about the ffmpeg-devel mailing list