[Libav-user] Updated libav/ffmpeg tutorial

wm4 nfxjfg at googlemail.com
Mon Feb 23 12:31:00 CET 2015


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. Both Stephen and ffmplay versions checks for some prior
> knowledge before even trying this function. Imho, If all heuristics is
> inside av_frame_get_best_effort_timestamp and better and better from
> version to version, this will be "best bet" for everyone. If single frame
> is not enough  then this function might require the last packet or
> something like this, but moving all the complexity inside it will remove
> large part of confusion

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.

For someone inexperienced, it will probably work much better than
whatever he could come up, though. The FFmpeg function also falls back
to DTS, and tries to resolve "strange" issues (like timestamps going
backwards). So there's no reason not to suggest using it, and also
there's no reason to try to fall back to DTS yourself.


More information about the Libav-user mailing list