-
-
Save iksnae/c8eb79b76b63e60cf3dab1f4fae2601e to your computer and use it in GitHub Desktop.
Batch generate thumbnails from mp4 files using ffmpg
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
| #!/bin/bash | |
| # setup | |
| FILES=name_of_file_to_match_*.mp4 | |
| SEEK_POINT=00:00:15 | |
| IMG_FORMAT=png | |
| FRAME_SIZE=512X288 | |
| 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