

This is because the length of the video is 9.13 seconds, and 30 images will be generated from every second of it (30 images x 9.13 seconds). As a result, a total of 274 images will be generated from the input video. This means that 30 images will be extracted for every second of the video when running the basic command ffmpeg -i input.mp4 %04d.png. You should get a result similar to this:įrom the screenshot above, the frame rate of the video is 30 fps. The information about the video will be printed in the terminal. This is the basic command for extracting images from a video using FFmpeg: For reference, the version of FFmpeg used in this tutorial is v5.0.1. You will need to download FFmpeg for this tutorial to extract images from a video. It contains multiple tools for end-users to convert, play and analyze media files and libraries for developers to use in different applications. It is also highly portable as it compiles and runs in a wide variety of build environments, machine architectures, and configurations like Linux, Mac OS X, Microsoft Windows, etc. It can decode, encode, transcode, mux, demux, stream, filter and play pretty much any media file in any format. Click here to download the video instead.įFmpeg is a complete, cross-platform solution to record, convert and stream audio and video. Your browser does not support the video tag. In this tutorial, we will be using the FFmpeg command-line tool to extract images from the video below using several different commands. You can use it to generate thumbnails for your videos or take a screenshot of the video at any given time. FFmpeg is a very robust tool for different types of media operations, including extracting images from a video.
