Last active
August 29, 2015 13:56
-
-
Save ja-k-e/9233825 to your computer and use it in GitHub Desktop.
Insanely specific script for generating screenshots of all mp4 files in a directory using ffmpeg. Creates named directory for each file's screenshots.
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
# for each mp4 file in current directory | |
for FILE in *.mp4 | |
do | |
# get name of file sans the extension | |
NAME=${FILE%.*} | |
# make directory with file name | |
mkdir $NAME | |
# generate screens: currently 4 screens per second, starting at 1 second, for 5 seconds. | |
ffmpeg -i $FILE -r 4 -ss 00:00:01 -t 00:00:05 -f image2 $NAME/$NAME%05d.png | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment