[Ffmpeg-devel] Timestamps on Decoding

Rich Felker dalias
Mon Oct 24 02:37:39 CEST 2005


On Sun, Oct 23, 2005 at 05:23:28PM -0400, Ronald S. Bultje wrote:
> On Sun, 2005-10-23 at 17:10 -0400, Paul Curtis wrote:
> > and quite a few abrupt and less than helpful answers.
> 
> They are probably correct, and more than tired of having to explain it
> every time again. I explained it to you in an as-simple-as-possible
> fashion in my other email, which you appear to silently ignore.
> 
> Richard may not be very nice to you, but he is completely right. The
> timestamps that you are using are illegal, and the fact that it works is
> most likely nothing more than pure coincidence or luck. Most likely, the
> Helix SDK does timestamp smoothing to make sure the output file is
> valid.

Actually judging from the sameple code it looks like what he is gdoing
is correct, or very close. If you are decoding frames, the pts of the
picture you get as output from the decoder is the same as the dts of
the frame that you just put into the decoder. There may be an
off-by-one error I didn't notice, but what Paul is doing is roughly
correct, at least.

What's _very_ difficult is recovering pts for a sequence of encoded
frames without decoding them, using only the dts values. Having pts is
preferable since it's slightly more general and allows you do process
the video in ways you couldn't (easily) do with just dts, but it
doesn't seem essential in this case.

Rich





More information about the ffmpeg-devel mailing list