Can you tell me the command for extracting the index of key frames from a video using ffmpeg in Windows. I tried

ffprobe -select_streams v -show_frames \-show_entries frame=pict_type \-of csv bbb480.avi \| grep -n I | cut -d ':' -f 1 > frame_indices.txt

but this error is displayed:

'grep' is not recognized as an internal or external command, operable program or batch file

share|improve this question

On Windows, grep isn't available unless you install a package such as a port of coreutils.

Anyway, you can run

ffprobe in.mp4 -select_streams v -show_entries frame=key_frame,pkt_pts_time -of csv=nk=1:p=0 | findstr "1,"
share|improve this answer
Thank you sir for answering the question .But by using above command I am getting only key frame time instant not keyframe index.Can you please suggest the command for keyframe index. Thank you sir.– B GaneshJul 28 '16 at 15:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.