[Ffmpeg-devel] Timestamps on Decoding

Paul Curtis pfc
Sun Oct 23 15:03:42 CEST 2005

I took a short break from my decoding application. After reading Richard 
Felker's e-mails again, I decided to look at the project again. My 
project is to use the ffmpeg libraries as the input to the Helix 
Producer SDK. As stated before, the Helix Producer encoder requires a 
start and end time (in milliseconds) to encode.

So what I needed was an accurate libavformat generated timestamp. After 
looking at the code again, I found the best value to use is:


In my tests, the cur_dts value was correct, and is available for every 
audio and video frame. (tested on MPEG format files with MPEG2 
video/audio). I still have a question, however. The DTS is the timestamp 
of the start of the frame or the end? This doesn't make much difference 
in my application, but it might in other's apps.


More information about the ffmpeg-devel mailing list