FFmpeg · Command Guide

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.jpg

What each flag does

-ss 00:00:05The timestamp to grab the frame from — placing this before -i makes it a fast seek.
-vframes 1Output exactly one frame instead of continuing to encode video.
-q:v 2JPEG 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.jpg

This 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.

After the command

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 templates

Common questions

Why is my extracted frame blurry?+
You likely landed on a motion-blurred frame or an interlaced field — try a timestamp a second or two earlier or later, or add -vf yadif if the source is interlaced.
Can I output PNG instead of JPEG?+
Yes, just change the output extension to .png — FFmpeg picks the encoder from the file extension, and PNG gives you lossless output at a larger file size.
How do I get the exact last frame of a video?+
Use -sseof -1 -vframes 1-sseof seeks relative to the end of the file, so -1 means one second before the end.