Table of Contents

ffmpeg - Video - Frame - Extract Frames

Extract a single frame

ffmpeg -i input.mp4 %02d_out.jpg -frames:v 1

NOTE: Write a single image.


Extract a sequence of frames

ffmpeg -i input.mp4 %02d_out.jpg

NOTE: The output needs to be an image sequence pattern.

  • %02d: This is a pattern for an image sequence or use the -update option (with -frames:v 1 if needed) to write a single image.

Extract resized

ffmpeg -i $(video_in) -vf scale=-1:$(resize_width),fps=$(FPS) $(path)/$(name)_%02d_out.jpg