Created
December 18, 2020 02:22
-
-
Save joshluongo/9a728c8d7faeb92b22bb603f1bd3eda6 to your computer and use it in GitHub Desktop.
FFMPEG Thumbnail Generator
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 | |
# Loop. | |
for a in `find . -type f \( -iname \*.dv -o -iname \*.mp4 -o -iname \*.mkv \) -not -path '*/\.*'`; do | |
# Generate thumbs | |
echo "Processing: $a" | |
ffmpeg -hide_banner -loglevel fatal -y -ss "$(bc -l <<< "$(ffprobe -loglevel error -of csv=p=0 -show_entries format=duration "$a")*0.5")" -i "$a" -vf yadif -frames:v 1 "$a.jpg" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment