Last active
September 20, 2019 11:10
-
-
Save StanCallewaert/57360fcbf24ed4428e43c093372b0d2e to your computer and use it in GitHub Desktop.
Extract images from video
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
# First install ffmpeg | |
# Then set the following 2 variables | |
FILENAME=your_file.mp4 | |
NUMBER_OF_IMAGES=50 | |
VIDEO_LENGTH_IN_SECONDS=`ffprobe -i $FILENAME -show_entries format=duration -v quiet -of csv="p=0"` | |
ffmpeg -i $FILENAME -vf fps=$NUMBER_OF_SECONDS/$NUMBER_OF_IMAGES image%04d.jpg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment