[FFmpeg-user] Problems getting the very last frames of videos using av_read_frame

Moritz Barsnick barsnick at gmx.net
Thu Oct 30 14:40:05 CET 2014

On Thu, Oct 30, 2014 at 12:15:34 +0000, Peter Rennert wrote:

> except for the last frames. It seems as av_read_frame only reads until 
> the last key frame and does not go beyond it.

Do you ever see "Unable to decode video picture: %d" from

There's an example in ffmpeg's doc/ directory, named
demuxing_decoding.c, which uses your described av_read_frame() loop,
and succeeds at reading all 1000 frames.

So the issue is probably somewhere in the python wrapper.

> ffmpeg version 2.2.git Copyright (c) 2000-2014 the FFmpeg developers
>    built on Apr  9 2014 16:32:16 with gcc 4.8 (Ubuntu/Linaro 4.8.1-10ubuntu9)

This is quite a bit too old to gain support on this list. :)

>    WARNING: library configuration mismatch

and is apparently using libraries from a different build, which is not
a good idea.

The first suggestion would be to build lastest git, and ensure you're
not using "stale" libraries from older installs.

(I don't have enough knowledge to tell you more about how to use libav
properly, I only know the examples. Anyway, there's a separate list for
libav issues: https://ffmpeg.org/mailman/listinfo/libav-user )


More information about the ffmpeg-user mailing list