[Ffmpeg-devel] PTS values

Anders Moden ffmpeg
Wed Jan 3 01:23:28 CET 2007

3 jan 2007 kl. 00.25 skrev Anders Moden:

> 19 dec 2006 kl. 23.06 skrev Paul Curtis:
>> Anders Moden wrote:
>>> Is there any docs that explains the various pts values found in  
>>> the stream, the image and the codec. i can find at least 4 pts  
>>> struct members with various values when decoding?
>> That was my problem, also. The discussion concerned which values  
>> were valid after a call to audio_decode or video_decode with  
>> "finished" == true. After much experimentation, I found the  
>> cur_dts to have a valid, monotonically increasing value that was  
>> usable for the encoder.
>> I never did find any docs that explained when each of the pts/dts  
>> values were valid ... so I built a small program that did nothing  
>> but print the values out. I never got a firm answer on which ones  
>> I should use ....
> Too bad. Havn't found the right discussion yet and I haven't tested  
> the cur_dts yet. However I think it is really bad this information  
> shall be so difficult to find.
> I think the ffmpeg project needs some proper system description !
> My original question was why I got unordered pts values using  
> avcodec_decode_video(m_pVideoCodecCtx, m_pFrame, &frameFinished,  
> packet.data, packet.size) in the m_pFrame struct ? Please can  
> someone answer this if the images I get are unsorted then ?

Ok. Just found a bunch of topics covering PTS etc.

In my case I have a variable fps so interpolating frame time is  
difficult. Is the cur_dts the answer to this problem ?

/Anders Mod?n

More information about the ffmpeg-devel mailing list