Created
November 20, 2015 20:49
-
-
Save icaoberg/24c5094b3a5383c2b0a9 to your computer and use it in GitHub Desktop.
Helper script that extract all frames from all mov files in a 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
for MOVIE in *.mov | |
do | |
if [ -f "$MOVIE" ]; then | |
FILENAME="${MOVIE%.*}" | |
echo $FILENAME | |
if [ ! -d "$FILENAME" ]; then | |
mkdir "$FILENAME" | |
fi | |
#extracts one frame per second. modify fps as needed | |
cd "$FILENAME" | |
ffmpeg -i ../$MOVIE -vf fps=1 $FILENAME"_"%05d.png | |
cd .. | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment