[Libav-user] Updated libav/ffmpeg tutorial
max.vlasov at gmail.com
Tue Mar 3 10:27:51 CET 2015
after reading more information about how currently ffmpeg/libav is
interrelated (basically ffmpeg borrows from libav, but not vice versa), I
decided to look into the sources to see how av_frame_get_best_effort_timestamp
It turns out that it is just a get accessor for best_effort_timestamp field
and the corresponding set accessor (av_frame_set_best_effort_timestamp) is
called twice (in avcodec_decode_video2 and in avcodec_decode_audio4) in the
utils.c with a similar lines
av_frame_set_best_effort_timestamp(..., guess_correct_pts(avctx, .... );
There's no any "best_effort" symbols in libav, but the function
exists in libav, the code of both versions (ffmpeg vs libav) looks almost
So, probably one who wants to keep compatibility with both libraries should
conditionally use either the field accessor (ffmpeg) or function (libav),
but the feature actually exists in both libraries. Probably looking at
is called in ffmpeg one might probably always use guess_correct_pts instead
of av_frame_get_best_effort_timestamp, but this is just a hypothesis.
On Mon, Feb 23, 2015 at 2:31 PM, wm4 <nfxjfg at googlemail.com> wrote:
> On Mon, 23 Feb 2015 13:51:33 +0300
> Max Vlasov <max.vlasov at gmail.com> wrote:
> > Frankly, I thought that all alternatives should be considered _after_
> > av_frame_get_best_effort_timestamp returned AV_NOPTS_VALUE. At least the
> > name suggests so. ....
> The heuristic in av_frame_get_best_effort_timestamp() is pretty weak,
> and the function doesn't exist in Libav, so you don't have to use it.
> It's really just a helper.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libav-user