[Ffmpeg-devel] Timestamps on Decoding
Rich Felker
dalias
Sun Oct 23 16:51:02 CEST 2005
On Sun, Oct 23, 2005 at 09:03:42AM -0400, Paul Curtis wrote:
> 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:
>
> AVFormatContext->streams[index]->cur_dts
>
> 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.
Neither. DTS is the decode timestamp, which is definitely NOT the
presentation timestamp (not even in the same order) unless the stream
contains no out-of-order frames.
Rich
More information about the ffmpeg-devel
mailing list