<div dir="ltr"><div class="gmail_quote"><div dir="ltr">Hi all!<div><br></div><div>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...)</div><div><br></div><div>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...)</div><div><br></div><div>What ffmpeg does differently? Did I miss something? (Like a flag in AVFrame which tells me to duplicate, or some options in the decoder?)</div><div><br></div><div>Thanks for your help!</div><div><br></div><div>Best,</div><div>Tr3wory</div></div>
</div><br></div>