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

Card Puncher Data Processing


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


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

Discover More
Card Puncher Data Processing
What is ffmpeg ?

What is ffmpeg ? ffmpeg is a command line to record, convert and stream audio and video. This is the simple tool to manipulate and convert any video. * * * * * * FFmpeg...

Share this page:
Follow us:
Task Runner