mpenkov / ffmpeg-tutorial

A set of tutorials that demonstrates how to write a video player based on FFmpeg
http://www.ffmpeg.org/documentation.html
1.22k stars 395 forks source link

Why tutorial01 produce twice less frames than ffmpeg? #18

Closed Jofsey closed 11 years ago

Jofsey commented 11 years ago

I disabled if(++i<=5) check in tutorial01.c and ran it on my mp4 video. The count of ppm files I got is 137. But when I tried to extract frames with ffmpeg tool I got 305 frames, instead of 137. ffmpeg -i video.mp4 /tmp/fr/%4d.bmp

I also checked it with keyframe extraction and also got 274 frames instead of 137. ffmpeg -i video.mp4 -vf select='eq(pict_type\,I)' /tmp/fr/%4d.bmp

So, why tutorial01 produce less frames than ffmpeg tool?

Jofsey commented 11 years ago

Sorry, that's my fault. Produced frames count is correct.