Created
February 21, 2019 07:54
-
-
Save mishazawa/9b36719e847f7a18b74d5140a4f572d4 to your computer and use it in GitHub Desktop.
extract keyframes from video
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
| # extract kframes | |
| `ffmpeg -skip_frame nokey -i $filename -vsync 0 -r 30 -f image2 $output_dir-%02d.jpeg` | |
| # get frames \ timestamps | |
| `ls -1 image-*.jpeg > images.txt` | |
| `ffprobe -f lavfi -i "movie=input.mp4,fps=fps=25[out0]" -show_frames -show_entries frame=pkt_pts_time -of csv=p=0 > frames.txt` | |
| `paste images.txt frames.txt > combined.txt` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment