How to Extract Frames from a Video?
A video we see in daily life is made up of a series of still images, and a frame is a single image in a sequence of pictures. In general, one second of a video is comprised of 24, 30, 60, or 120 frames per second. The higher the FPS (frames per second) is, the smoother the video motion is. When all the images are played in order and at a certain rate, we get a moving picture, aka a video.
So, to extract frames from video is to extract a still image or a series of images from video. For this purpose, you need a dedicated video frame extractor which we will introduce in the following words.
5 Video Frame Extractors to Help Extract Frames from Video
1. Winxvideo AI
* Available for extracting a still image and a short clip with continuous frames from a video.
Winxvideo AI is a free MP4 video converter for video conversion between formats, such as MP4, MKV, MOV, AVI, 4K, etc. You can also use it to take screenshots to get thumbnails for YouTube videos or extract a short clip with continuous frames from a long video.
How to get a still from a video with Winxvideo AI
Step 1. Free download Winxvideo AI, install, and launch it on your computer.
Step 2. Click on the +Video button to add a video.
Step 3. In the right playback window, play your video and then click the "Camera" icon to extract a still image you need.
Step 4. To see the image, simply click on the "Folder" icon next to "Camera" icon.
How to extract a short clip from video with Winxvideo AI
If you only need a short clip with continuous frames for uploading or making GIF, Winxvideo AI can also help you.
Step 1. After adding a video, simply click on the "Edit" button.
Step 2. In the new window, navigate to the "Trim" section.
Step 3. Tick the "Enable Trim" option, set "Start Time" and "End Time", then click on "Done".
Step 4. Now, choose a destination folder to save the clip by clicking the "Browse button".
Step 5. When everything is ready, hit the "RUN" button to start extracting a clip from video with Winxvideo AI.
2. VideoProc Converter
* Available for extracting a single frame, a series of frames, and all frames in sequence at once.
VideoProc is a much more powerful video frame extractor. This tool allows you to extract high-quality frames from MP4, HD, 4K, etc. videos for thumbnails or anything else. You can use it to get a still image from video, extract a series of frames during a certain period of time, and extract all frames in sequence from a video at once in just one second.
How to get a still image from a video with VideoProc Converter
Step 1. Free download VideoProc Converter, install and launch it on your computer.
Step 2. Click on the "Play" button to preview your video.
Step 3. Hit the "Camera" icon to extract the frame you want.
Step 4. Click the "Folder" icon next to the "Camera" icon to see the captured screenshot.
How to extract frames from a video with VideoProc Converter
Besides snapshots, you can also use VideoProc Converter to extract a series of frames or all frames in sequence from a video in a click.
Step 1. Once you have added your video to VideoProc Converter, navigate to the "Toolbox" section at the bottom.
Step 2. Double-click on the "Snapshot" option.
Step 3. In the new window, set "Start Time" and "End Time" to ensure that your frames are extracted from this period of time. In the right part, choose picture format, image size, and picture count. Then, click on "Done" button to continue.
* Picture Count: If the Picture Count is set to 10, VideoProc Converter will extract 10 frames/images from the video clip you selected. If you want to extract all frames from a video, set the Picture Count to the result of frame rate multiplied by duration. For example, for a 10-second video at 30fps, the Picture Count should be 300 (10x30).
Step 4. When everything is done, simply click on the "RUN" button at the bottom right corner. Then, VideoProc Converter will immediately extract frames from video for you.
Once done, the folder with all picture frames will pop up automatically.
* Available for extracting a single frame, a series of frames, and all frames in sequence from a shorter video.
VLC is a must-have on every computer. If you already own it, you can use it to save sequences of images from any video. However, the whole process is much more complicated than other video frame extractors, you need to pay close attention to the following steps.
Step 1. After downloading and installing VLC, launch it on your computer.
Step 2. On the main UI, go to Tools and choose Preferences.
Step 3. In the new window, select the option All under Show Settings in the lower-left corner of the interface.
Step 4. Scroll down to the Video section, expand Video, and then expand Filters.
Step 5. Scroll down to find the Scene filter option and click on it.
Step 6. In the right section, set the image format, specify the path to save the extracted frames, and give the recording ratio. Then, click on Save.
*Recording Ratio: The recording ratio determines how many images you can extract from a specific video. For example, you can extract 1 image in every 10 frames if you type in the value 10. Or if your video is 30fps, VLC will extract 3 frames every second.
Step 7. Now, go to Tools again > Preferences > All. Navigate to the Filters, and click but don’t expand it. Then, in the right section, tick the box of Scene video filters, and then press Save.
Step 8. Now, you can play your video with VLC. VLC will start extracting frames from your video continuously until you stop, pause, or skip through the video.
- If you want to extract all frames from a video, you need to play the video completely.
- You may get dropped frames if you didn’t set the recording ratio properly.
- Sometimes, there may be no frames being extracted. You can try to re-open VLC and then play your video again.
- The settings will apply to all the videos later. So, please untick the box before the option of Scene video filters, and press Save if you don’t want VLC to do the same with every video later.
- You need to know your video’s FPS so as to set the recording ratio to a proper number.
* Available for extracting all frames, a single frame, a series of frames, images every N seconds, and images at a given time. Also, available for taking a single screenshot.
FFmpeg is a command-line way better suited to experienced users. It is quite complicated in operation but very powerful for extracting images from a video. It offers a wide range of options to specify the output format, image quality, aspect ratio, and frequency of extracted frames. Now, let’s get started with the basic command of FFmpeg: ffmpeg -i input.mp4 %04d.png to extract frames from a video in different situations.
Note: Before extracting, you have to head to the official FFmpeg website to install FFmpeg. After downloading a zip file, unzip it, then find the "Bin" folder and select it. Type "cmd" on the path to open and change the directory on Command Prompt. Then, on the command prompt window, type in the following command and press "Enter".
How to extract all frames from a video with FFmpeg
You can extract all frames from your video by simply using basic command of FFmpeg:
ffmpeg -i input.mp4 %04d.png
- -i indicates input video file and its path.
- -%04d.png indicates a sequence pattern type used to interpret the output file names by sequencing them with zero-padded sequential numbers, eg. 0001.png, 0002.png, 0003.png, etc.
- png is the image format, and you can also use jpg, bmp, tiff, etc. format.
By default, FFmpeg uses a frame rate that is the same as the video source. That’s to say, if your video frame rate is at 30fps, 30 images will be extracted for every second of the video when running the basic command. As a result, a total of 300 images will be extracted from a 10s video (30 images x 10 seconds).
How to extract N frames every 1 second during a period of time with FFmpeg
Type the following command line:
ffmpeg -ss 00:00:05 -t 00:00:10 -i input_file.mp4 -r 10.0 output_image-%4d.jpg
- -ss indicates the start time for the image extraction.
- -t indicates amount of time you want to extract frames.
- -i indicates the input video file and its path.
- -r indicates the number of frames to capture per second.
- 00:00:00 means hh:mm:ss (hour:minute:second).
In this example, starting from the 5th second, you will get 100 (10 frames x 10 seconds) images in JPG format.
How to extract a single frame or screenshot with FFmpeg
Type the following command line:
ffmpeg -i input.mp4 -ss 00:00:05 -vframes 1 frame_out.jpg
This command tells FFmpeg to extract one frame from the video at the 5th second and save it as a JPG file named frame_out.
- -i specifies the input video file.
- -ss sets the start time offset to five seconds into the video, using the format hh:mm:ss.
- -vframes is used to set the number of frames to extract. You can change it to 2 or another number, which means you will get 2 or more frames from the video at the 5th second.
In addition to these, you can also use FFmpeg to extract images every N seconds, resize the output frames, make GIFs from an MKV video, change the frame rate of your video, and so on.
5. Online Converter
Online Converter is a better choice if you want to extract frames from a video with a very small file size. It won’t ask you to install any application. You can save your frames as JPG or PNG images, or save video clips as animated GIF images. Like some video frame extractor software, it also lets you set start time, end time, duration, the maximum number of images to be captured, etc.
However, you should know that the max file size for processing is 200MB, and often the case the file upload process takes a very long time.
Step 1. Go to the webpage: https://www.onlineconverter.com/extract-image-from-video, and click on Choose File to upload the video you want to extract frames.
- Choose the image format in the "Save As" section.
- Set the number in "Max Count". For example, 1 means you can extract 1 frame.
- Set Time Interval to extract X frames every X seconds.
- Set Start Time and End Time to extract frames from a video in a specific period of time.
Step 2. Click the button "Extract" to start.
The above 5 video frame extractors are the most common tools to help extract frames from a video. FFmpeg should be the most complicated yet most powerful one covering all the functions of its competitors in this list. FFmpeg lets you take a screenshot, or extract a single frame, a series of frames, N frames every N seconds, and all frames in sequence easily. If you don’t want any installation, Online Converter should be the best choice for smaller videos. For VLC users, VLC can extract frames from video directly. If you need an easier video frame extractor with an intuitive interface, both Winxvideo AI and VideoProc are good options.