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?
source
share