Created
July 16, 2022 05:39
-
-
Save markshust/aaaddfe749708fc82861465dede28d3d to your computer and use it in GitHub Desktop.
Generate video thumbnails at 15 sec timestamp from directory of MP4 files
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 | |
for i in *.mp4; do | |
[[ $i == *"- clean"* ]] && continue # this line excludes files that contain "- clean" in filename | |
prefix=`echo "$i" | sed "s/^\([0-9]*\)\.\(.*\)/\1/"`; | |
ffmpeg -i "$i" -ss 00:00:15.00 -vf "thumbnail,scale=480:270" -frames:v 1 "$prefix.webp" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment