-
-
Save HatScripts/d4aa916a93ba18d4a74702d86a695838 to your computer and use it in GitHub Desktop.
Batch generate thumbnails from mp4 files using ffmpg
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
#!/bin/bash | |
# setup | |
FILES=name_of_file_to_match_*.mp4 | |
SEEK_POINT=00:00:30 | |
IMG_FORMAT=png | |
FRAME_SIZE=150X100 | |
DEST=thumbnails | |
for f in $FILES | |
do | |
echo "Generating thumbnail for $f ..." | |
ffmpeg -i $f -y -an -ss $SEEK_POINT -vcodec $IMG_FORMAT -r 1 -vframes 1 -s $FRAME_SIZE $DEST/_$f.$IMG_FORMAT | |
echo "====================================================" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment