This is an old revision of the document!


FFMPEG
Extract Video Frames
REM --- Utility to Extract video frames into image files ---
 
SET inputfile=%1
MKDIR output

REM --- Extract video frames for every second ---
REM Example: C:\>ffmpeg.exe -i C:\path\file.mkv -q:v 1 -r 1 -ss 00:02:07 -t 00:00:30 images%05d.jpg
REM          C:\>ffmpeg.exe -i C:\path\file.mpg -r 1/1 $filename%03d.bmp
REM
REM   -q:v : Sets the quality of the screenshots. The lower the number, 
REM          the higher the quality (with 1 being the highest quality).  
REM          It is important to include this when you want to generate
REM          JPEG screenshots, or low-quality images might be created.
REM   -r   : Sets the number of frames to extract per second.
REM   -s   : Width x Height, eg: 640×360
REM   -ss  : Sets the start time for commencing frame extraction. In the example above, 
REM          it is to start at 2 minutes and 7 seconds.
REM   -t   : Sets the duration of time to run frame extraction. 
REM          In the example above, it sets the frame extraction to run for 30 seconds.
 
C:\Apps\ffmpeg\bin\ffmpeg.exe -i %inputfile% -r 1/1 output\%inputfile%-%%05d.png
EXPLORER output