Created
October 8, 2023 13:03
-
-
Save nknapp/76079aa2bd3a8dfeb5546b2206c3851b to your computer and use it in GitHub Desktop.
Detect bluriness in frames extracts from video and copy the best 10 to another directory
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
# Extract frames | |
ffmpeg -i filename.mov -ss 30 -to 65 -vsync 0 -q:v 2 out%03d.jpg | |
for i in out*.jpg ; do | |
echo $i $( convert $i -colorspace gray -statistic StandardDeviation 5X5 - | identify -verbose - | grep deviation ) ; | |
done | tee deviation.txt | |
mkdir good | |
cat deviation.txt | sort -n -t ":" -k 2 | tail -20 | cut -b -10 | xargs cp -t good |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment