[Libav-user] Fwd: Frame number mismatch

Tr3wory tr3w at freemail.hu
Sat Sep 12 13:31:27 CEST 2015

Hi all!

I'm unfortunate enough that I have a steady stream of midly corrupted/badly
encoded mp4/h264 videos what I need to process. I wrote a simple program
based on some tutorial on the internet which reads all the video frames
using av_read_frame and avcodec_decode_video2, I even flush the internal
buffer of the decoder with some empty packets in the end. (No errors in the
process, no corrupted frames...)

It looks good and well until I run the ffmpeg standalone tool (compiled
from the same source three) with jpg output, which produces 600 more frames
than my frame reader (from a 24k frame long video). (All frames look valid,
but maybe duplicated...)

What ffmpeg does differently? Did I miss something? (Like a flag in AVFrame
which tells me to duplicate, or some options in the decoder?)

Thanks for your help!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20150912/d78c4566/attachment.html>

More information about the Libav-user mailing list