Extract a single frame at a timestamp

gif & images

// what it does

Grabs a single frame at the 5-second mark as a JPEG. Placing -ss before -i does an input seek, which jumps close to the target quickly instead of decoding from the start, and -frames:v 1 limits output to exactly one frame. This is the fast, standard way to generate a poster or thumbnail image.

// shell

$ ffmpeg -ss 00:00:05 -i input.mp4 -frames:v 1 thumbnail.jpg

// gotcha

Contrary to common advice, this is already frame-accurate: ffmpeg jumps to the nearest keyframe, then (because it re-encodes) decodes and discards up to 00:00:05 with accurate_seek, which is on by default. So you get both speed and accuracy — output seeking (-ss after -i) is just slower with no benefit. The nearest-keyframe/off-target problem only appears with stream copy (-c copy), which can't decode past the keyframe.