Ffmpeg keyframe deletion

I am trying to extract keyframes from a video using ffmpeg 0.11.1. So far, all the commands that I tried do not extract key frames, but return all frames, i.e. 25 frames per second * total number of frames in output. I tried setting keyint_min to 25 to make sure there is a maximum size of 1 keyframe per second.

ffmpeg -vf select="eq(pict_type\,PICT_TYPE_I)" -g 250 -keyint_min 25 -i C:\test.mp4 -vsync 2 -f image2 C:\testTemp\thumbnails-%02d.jpeg

But still all the frames are returning.

Then I tried to separate the keyframes for 20 seconds.

ffmpeg -i C:\test.mp4 -vf select='eq(pict_type\,I)*(isnan(prev_selected_t)+gte(t-prev_selected_t\,20))' -vsync 0 -f image2 C:\testTemp\%09d.jpg

Again the same result, all frames are returned.

What should I do?

+5
source share
1 answer

In your first command, you use a filter as an input parameter. I do not know how ffmpeg will interpret this.

Try the following:

ffmpeg -i C:\test.mp4 -vf select='eq(pict_type\,I)',setpts='N/(25*TB)' C:\testTemp\%09d.jpg

25 : 30000/1001 NTSC, 24000/1001 NTSC, 25 PAL ..

-q:v -qscale:v ( -qscale ffmpeg). mpeg * - 1-31, 31 - .

, ffmpeg superuser.com, stackoverflow .

+9

All Articles