Extract Video Frames as an Image Sequence (FFmpeg)
Dump frames from a video into numbered PNG files at a chosen rate — one per second, one per frame, or any interval you need.
Run ffmpeg -i input.mp4 -vf fps=1 frame_%04d.png to save one PNG frame per second as frame_0001.png, frame_0002.png, and so on.
01Command
Command
$ ffmpeg -i input.mp4 -vf fps=1 frame_%04d.png02What it does
The fps filter controls how many frames per second are grabbed: fps=1 gives one per second, fps=1/60 gives one per minute, and omitting the filter grabs every single frame. The %04d in the output name is a printf-style pattern that numbers files sequentially with zero padding. Use .png for lossless stills or .jpg for smaller files when exact pixels don't matter.
03Risk
!Warning: Extracting every frame from a long video creates thousands of files and gigabytes of PNGs — set an fps filter first unless you truly need all frames.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- FFmpeg Wiki: Images to/from VideoEvidence: Documents image sequence patterns like frame_%04d.png and the fps filter for controlling extraction rate.
- FFmpeg DocumentationEvidence: Official docs for the fps video filter and image sequence output naming.
Last verified: 2026-09-17 · Category: Media