Extract Selected Video Frames using FFmpeg
2010-07-24 by , tagged as
FFmpeg can easily be used to extract single frames from video data, in my case to create input images from an aerial surveillance video for structure from motion reconstruction.
The following command
ffmpeg -ss 00:07:00 -t 00:02:00 -i P1000072.MOV -r 0.1 P1000072/image%3d.jpg
will extract frames
- using the program
ffmpeg
(assuming it is installed properly), - beginning at minute 7 (
-ss 00:07:00
), - stopping after 2 minutes (
-t 00:02:00
), - reading from input file
P1000072.MOV
, - using only 0.1 frames per second, i. e. one frame every 10 seconds (
-r 0.1
) - and save them to the folder
P1000072
- as JPEG images with the names
image%3d.jpg
, where%3d
is a 3-digit ascending number with leading zeros.