[Libav-user] What is the correct way to read frames

Pauli Suuraho pauli.suuraho at gmail.com
Sun Mar 24 15:23:41 CET 2013


Hello all.

I'm a newcomer to use ffmpeg, and I've been bugging my mind about this one
thing.

I have videoclips (either h264 or prores), and I want to extract all the
frames. I'm using 32 bit ffmpeg-20130322-git-e0e8c20-win32 zeranoe
shared+dev and Qt compiled using MSVC2010.

I'm using the following code to extract the frames.

http://pastebin.com/DrC9H6g0

If I have a test clip that is 30 frames, 30fps long, for some reason the
lib always extracts only 24 frames and then says end of file.

FFmpeg.exe extracts all the frames (for example to PNGs) correctly. So
clearly I'm doing something wrong.

This happens with every clip I have. I've even tried to repack the clips
with ffmpeg but the output is same: last frames won't get noticed.

I guess this has something to do with I,P,B-frames, but not sure how.

Any help is appreciated!

Thanks,
Pauli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20130324/1d310bf5/attachment.html>


More information about the Libav-user mailing list