Special

Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 22 in printed book and digital formats -- plus a one-year subscription (beginning with 23.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Recent issues

Article Preview


Buy Now

Issue 23.1 ('Photo Batch Processing')
Instant purchase and download via GumRoad!

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):

Download Icon 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.