Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Batch generate thumbnails from mp4 files using ffmpg
#!/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
You can’t perform that action at this time.