Created
August 5, 2021 04:53
-
-
Save dillonchr/fff8c02c5bef78db979eb23d7d91779f to your computer and use it in GitHub Desktop.
scene thumbnailer
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 | |
SOURCE="$1" | |
TS_FILE=raw_timestamps | |
ffmpeg -i "$SOURCE" -filter:v "select='gt(scene,0.4)',showinfo" -f null - 2> $TS_FILE | |
TIMES=$(grep showinfo $TS_FILE | grep 'pts_time:[0-9.]*' -o | grep '[0-9]*\.[0-9]*' -o) | |
for ts in $TIMES | |
do | |
ffmpeg -ss "$ts" -i "$SOURCE" -vframes 1 -q:v 5 "t_${ts}.jpg" | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment