Extract Frames from a Video as Images (FFmpeg)
Dump video frames to numbered PNG files at any interval.
Run ffmpeg -i video.mp4 -vf fps=1 frame_%04d.png to save one frame per second as frame_0001.png, frame_0002.png, ...
01Command
Command
$ ffmpeg -i video.mp4 -vf fps=1 frame_%04d.png02What it does
fps=1 selects one frame per second; use fps=1/5 for one every 5 seconds, or drop the -vf filter entirely to capture every single frame. The %04d part numbers the output files so ffmpeg writes them all. PNG is lossless — switch the extension to .jpg for much smaller thumbnails.
03Risk
!Warning: Extracting every frame of a long video produces thousands of files in seconds — always start with fps=1 or lower to test.
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- fps — FFmpeg Filters DocumentationEvidence: Documents the fps filter used to select frames at a given rate before writing them as images.
Last verified: 2026-09-18 · Category: Media