Skip to content

Instantly share code, notes, and snippets.

@icaoberg
Created November 20, 2015 20:49
Show Gist options
  • Save icaoberg/24c5094b3a5383c2b0a9 to your computer and use it in GitHub Desktop.
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
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