[Ffmpeg-devel] timestamp of a decoded frame?
Mon Jun 12 15:08:15 CEST 2006
Eric Fernandez wrote:
> I use avcodec_decode_video() in my program to decode each frame of an
> MPEG file. How can I determine the timestamp of the decoded frame? I
> tried to find a way in the documentation and examples, but was
> Many thanks, Eric
Look in the archives for a thread with subject "[Ffmpeg-devel]
Timestamps on Decoding". It gives the easy rule "When you input a frame
with DTS "t", a frame with PTS "t" will come out of the decoder". Plus
lots of hints and code samples.
What the field 'pts' in AVFrame is for is indeed puzzling. As well as
why the API does NOT give pts and dts to avcodec_decode_video, leaving
to it all the necessary logic...
T +32  2 790 29 41
F +32  2 790 29 02
E mailto:mbardiaux at mediaxim.be
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
More information about the ffmpeg-devel