[libav-api] How to manage PTS/DTS at transcoding?

Andrey Utkin andrey.krieger.utkin at gmail.com
Fri Oct 28 17:48:18 CEST 2011

in libavcodec/avcodec.h, on AVFrame.pkt_pts, there is a comment:
"reordered pts from the last AVPacket that has been input into the decoder"
But it is interesting to get pts that is corresponding to the output frame
When i use pkt_pts in further transformations, i get video late from audio.
AVFrame.pts is AV_NOPTS_VALUE out from decoder, so i use pkt_pts. There's no
best_effort_timestamp that is present in ffmpeg AVFrame.
Any comments on my timestamping mistakes are appreciated.
My sources: https://github.com/krieger-od/transcoder
At the moment it works well with ffmpeg libs.
Andrey Utkin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libav.org/pipermail/libav-api/attachments/20111028/e124da9b/attachment.html>

More information about the libav-api mailing list