Skip to content

Instantly share code, notes, and snippets.

@jhallard
Created June 22, 2018 22:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhallard/02145a3700c83dcbe61b52faddc8d6fb to your computer and use it in GitHub Desktop.
Save jhallard/02145a3700c83dcbe61b52faddc8d6fb to your computer and use it in GitHub Desktop.
Show the keyframe indices in a video using ffprobe
show_keyframes() {
ffprobe -loglevel error -select_streams v -show_frames -show_entries frame=pict_type -of csv $1 | grep -n I | cut -d ':' -f 1
}
# use like
# $ show_keyframes /tmp/video.mp4
# 1
# 31
# 61
# 91
# 121
# 151
# 181
# 211
# 241
# 271
# 301
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment