Article Preview
Buy Now
COLUMN
Extracting Frames
Using ffmpeg to Extract Frames from a Video
Issue: 23.1 (January/February 2025)
Author: Marc Zeedar
Author Bio: Marc taught himself programming in high school when he bought his first computer but had no money for software. He's had fun learning ever since.
Article Description: No description available.
Article Length (in bytes): 10,692
Starting Page Number: 53
Article Number: 23106
Resource File(s):
project 23106.zip Updated: 2025-01-09 23:43:15
Related Link(s): None
Excerpt of article text...
The other day, I had what I thought was a simple need: I wanted to extract some representative still images from a video file. Now, there are many manual ways to do this—such as pausing a video in a video-playing app, copying the current frame, and pasting it into an image editing program to save the file—but beyond all those steps, it also requires scrubbing through the entire video file to find the specific frames you want, which is time-consuming.
Sometimes you want an exact frame, but in my situation, I just wanted a few sample images, and I wasn't that particular. What I wanted was an app that would just grab a bunch of frames from a video file—say, one every second—and save each as a picture. Then I could browse through the pictures and select the ones I wanted.
This would be useful for security camera recordings, finding shots of certain people in a video, extracting promotional stills, and more.
Naturally, I turned to Xojo, but its video support is limited, and there's no access to the individual frames of a video. I could have turned to a third-party plugin, such as Monkeybread Software, but there's a learning curve, and it was overkill for something this simple.
Then I noticed that Xojo's
picture
object has a command that lets you access the individual pictures in a multi-picture file. I knew there were lots of apps that generate an animated GIF from a video file. Couldn't I use one of those and then use Xojo to extract the frames from the GIF? Easy!Except... not. I found a free app to make animated GIFs from a movie, but even though it had some settings to let me specify how many frames per second to extract, its minimum still created too many frames, and the resulting files were quite large. The still image quality wasn't that great, either, since GIFs are limited to 256 colors.
...End of Excerpt. Please purchase the magazine to read the full article.