AI Video Editing Flows

FFmpeg extract frames and turn images into video

Pull still frames out of a video with -frames:v and the fps filter, and build a video from numbered images with -framerate. On our 60 s clip, fps=1/10 wrote 6 frames. Six images read at 2 fps gave a 3.0 s video. Globbing is not available in our Windows build, so use numbered names.

What to choose

JobCommand ideaResult on our 60 s clip
One frame-ss 5 -frames:v 1708.4 kB PNG, 121.1 kB JPG
A frame every 10 s-vf fps=1/106 frames
Keyframes onlyselect=eq(pict_type,I)14 frames
Images to video-framerate 2 -i thumb_%03d.png3.0 s, 6 frames

PNG is lossless and larger. JPG with -q:v 2 is much smaller. Pick PNG for editing and JPG for contact sheets and previews.

One frame

Put -ss before -i to seek before decoding. -frames:v 1 stops after one frame. FFmpeg prints a warning for a single image output unless you add -update 1. Our output without it was "[image2 @ ...] The specified filename 'frame.png' does not contain an image sequence pattern or a pattern is invalid.".

One frame at 5 s: 1280x534, 708.4 kB
ffmpeg -ss 5 -i tos.mp4 -frames:v 1 frame.png
Same with -update 1: the pattern warning did not appear
ffmpeg -ss 5 -i tos.mp4 -frames:v 1 -update 1 frame_u.png
As JPG, quality 2: 121.1 kB
ffmpeg -ss 5 -i tos.mp4 -frames:v 1 -q:v 2 frame.jpg

Frames every N seconds

The fps filter with a fraction picks one frame per interval: fps=1/10 is one every 10 seconds. The numbered pattern in the file name makes thumb_001.png, thumb_002.png and so on. It wrote 6 files, thumb_001.png to thumb_006.png, 3.36 MB in total.

One PNG every 10 s: 6 files
ffmpeg -i tos.mp4 -vf fps=1/10 thumb_%03d.png
One JPG per second for 10 s: 10 files, 970.3 kB
ffmpeg -t 10 -i tos.mp4 -vf fps=1 -q:v 2 s_%02d.jpg
Keyframes only: 14 files
ffmpeg -i tos.mp4 -vf "select='eq(pict_type,I)'" -fps_mode vfr key_%03d.jpg

Image sequence to video

-framerate before -i sets how fast the images are read. Six images at 2 fps last 3 seconds. At 24 fps they last a quarter of a second. To get a normal 24 fps file from slow images, add -r 24 on the output; frames are repeated.

CommandFramesLength
ffmpeg -framerate 2 -i thumb_%03d.png -c:v libx264 -pix_fmt yuv420p seq2.mp463.000 s
ffmpeg -framerate 24 -i thumb_%03d.png -c:v libx264 -pix_fmt yuv420p seq24.mp460.250 s
ffmpeg -framerate 2 -i thumb_%03d.png -r 24 -c:v libx264 -pix_fmt yuv420p seq2_r24.mp4723.000 s
Six images, 2 fps: 3.0 s
ffmpeg -framerate 2 -i thumb_%03d.png -c:v libx264 -pix_fmt yuv420p seq2.mp4

The glob pattern failed on our Windows build with "[in#0 @ ...] Pattern type 'glob' was selected but globbing is not supported by this libavformat build".

This fails on our Windows build: glob is not supported
ffmpeg -framerate 2 -pattern_type glob -i "thumb_*.png" -c:v libx264 -pix_fmt yuv420p seq_glob.mp4

Check the result

Count the files and read the video back. Our checks: 6 thumbnails, and the 2 fps video had 6 frames and 3.0 s from ffprobe.

Open one image to confirm it is the moment you meant.

Method and limits

All commands ran on FFmpeg 8.1.2 (a full Windows build) on a Windows 11 laptop, Ryzen 7 7735U, CPU only, on 2026-11-06. We added -y and -threads 4 to every run; they are left out of the commands shown. In quoted FFmpeg messages the hex address after @ changes on every run, so we replaced it with ...

tos.mp4 is a copy of Tears of Steel clip tos_a_0020_60s.mp4 (60 s, 1280x534, 24 fps), (c) Blender Foundation, licensed CC-BY 3.0. We credit it here as the licence asks.

Limits: one run of each command, so the sizes and times are single measurements and not averages. Times were taken on a laptop that was doing other work. Results depend on the input file and the FFmpeg version, so check yours. We did not test variable frame rate files, high bit depth video or other image formats.

Related: FFmpeg for video editors, FFmpeg video to GIF: palettegen, frame rate and width, FFmpeg trim video: accurate cuts by time, FFmpeg overlay text and images: drawtext, logo and picture in picture and FFmpeg command builder.

Page checked on Nov 4, 2026.