Created
January 2, 2020 19:36
-
-
Save kyuumeitai/37a6935fd1c8b6d917f6918fe6671f55 to your computer and use it in GitHub Desktop.
extract screenshots from video folder
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 | |
srcExt=$1 | |
destExt=$2 | |
srcDir=$3 | |
destDir=$4 | |
opts=$5 | |
for directory in */ ; do | |
for filename in "$directory"/*.$srcExt; do | |
basePath=${filename%.*} | |
baseName=${basePath##*/} | |
ffmpeg -i "$filename" -vf fps=1 "$filename"sc-%03d.jpg | |
done | |
done | |
echo "Conversion from ${srcExt} to ${destExt} complete!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment