Convert an Image Sequence into a Video with ffmpeg
Merge numbered PNG/JPG frames into a smooth MP4 — perfect for timelapses, animation frames, and scans.
01Command
$ ffmpeg -framerate 24 -i img%04d.png -c:v libx264 -pix_fmt yuv420p slideshow.mp402What it does
The -framerate option sets how many images play per second (24 here; use 1/5 for one image every 5 seconds in a slideshow). %04d is the number pattern — four digits with leading zeros — and ffmpeg's image2 demuxer reads files matching it. The yuv420p pixel format keeps the MP4 playable in phones, browsers, and social apps.
03Risk
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- FFmpeg DocumentationEvidence: Main ffmpeg documentation includes the -framerate input option and stream specifier syntax used in the conversion command.
- FFmpeg Formats Documentation (image2 demuxer)Evidence: Documents the image2 demuxer options -framerate and pattern_type used to read numbered image sequences.
Last verified: 2026-09-19 · Category: Media
06Related solutions
Turn any PNG into JPEG, BMP into PNG, and more using .NET's built-in imaging library — scriptable, batchable, zero third-party tools.
A script-driven screenshot: grab the entire virtual desktop (all monitors) and write it to a timestamped PNG — useful for monitoring, unattended tasks, and scheduled captures.