Last active
January 10, 2023 17:59
-
-
Save colemar/f6500b1fd57bae6cff89844ffde778cc to your computer and use it in GitHub Desktop.
Print key frame numbers and intervals with ffprobe
This file contains 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
ffprobe in.mkv -v error -select_streams v:0 -show_frames -skip_frame nokey -print_format csv | gawk -F, "/^frame/{print $22,$22-n;n=$22}" | |
ffprobe in.mkv -v error -select_streams v:0 -show_frames -skip_frame nokey -show_entries frame=pts_time -print_format csv | gawk -F, "/^frame/{printf \"%.0f %.0f\n\",$2*23.976,($2-n)*23.976;n=$2}" | |
ffprobe in.mkv -v error -select_streams v:0 -show_entries packet=pts_time,flags -print_format csv | gawk -F, "$3~\"^K\"{printf \"%.0f %.0f\n\",$2*23.976,($2-n)*23.976;n=$2}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Quoting is Windows-like.