Created
June 22, 2018 22:48
-
-
Save jhallard/02145a3700c83dcbe61b52faddc8d6fb to your computer and use it in GitHub Desktop.
Show the keyframe indices in a video using ffprobe
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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