How to Extract a Thumbnail From a Video With FFmpeg
Grabbing a single still frame from a video, at a specific timestamp, to use as a thumbnail or preview image.
Grabbing a single still frame from a video, at a specific timestamp, to use as a thumbnail or preview image.
The command
ffmpeg -i input.mp4 -ss 00:00:05 -vframes 1 -q:v 2 thumbnail.jpgWhat each flag does
| -ss 00:00:05 | The timestamp to grab the frame from — placing this before -i makes it a fast seek. |
| -vframes 1 | Output exactly one frame instead of continuing to encode video. |
| -q:v 2 | JPEG quality scale from 1 (best) to 31 (worst) — 2 is visually lossless for a still image. |
Where this goes wrong
Placing -ss after -i instead of before it works too, but forces FFmpeg to decode from the start of the file to reach the timestamp — noticeably slower on long videos for no benefit when you just need one frame.
Extracting multiple thumbnails at intervals
ffmpeg -i input.mp4 -vf "fps=1/10" thumb_%03d.jpgThis grabs one frame every 10 seconds, naming them thumb_001.jpg, thumb_002.jpg, and so on — useful for generating a set of candidate thumbnails to pick from.
A thumbnail is a still. The video it represents is where the real work is — NULLFRAME's templates handle the structure, captions and motion that make people actually watch it.
See the templatesCommon questions
Why is my extracted frame blurry?+
-vf yadif if the source is interlaced.Can I output PNG instead of JPEG?+
How do I get the exact last frame of a video?+
-sseof -1 -vframes 1 — -sseof seeks relative to the end of the file, so -1 means one second before the end.