How to extract the images of a video (ie frame) with ffmpeg ?

About

This article shows you how to extract the frame (picture) of a video

List

Once you have installed ffmpeg, you can execute the following command.

Extract the first 20 frames

ffmpeg -i input.mp4 -vframes 20 output_image_%03d.jpg

Extract the frame 30

ffmpeg -i input.mp4 -vf "select=eq(n\,30)" -vframes 1 output_image.jpg

Extract every n frames (samples)

  • To encode a movie to frame (single pictures) sampled (every n frames) 1)
ffmpeg -i movie.mpg movie%d.jpg

Powered by ComboStrap