C.W.K.
Stream
Lesson 09 of 10 · published

Screenshots — Single Frames at Any Time

~8 min · screenshot, thumbnail, still

Level 0Viewer
0 XP0/73 lessons0/15 achievements
0/100 XP to next level100 XP to go0% complete

One frame, any timestamp

Pulling a still from a video is a single line. The pattern: -ss to seek, -frames:v 1 to grab one frame, -update 1 on newer FFmpeg builds to silence the 'overwriting' warning.

Quality control

For PNG (lossless) the encoder ignores quality flags. For JPEG, -q:v 2 gives high quality (lower number = better, 1–31 range). Modern alternatives: WebP (-c:v libwebp -quality 90) or AVIF (-c:v libaom-av1 -still-picture 1) for smaller files at the same quality.

Many frames at once

Sample N frames every M seconds with fps=1/M: -vf fps=1/10 means one frame every 10 seconds. Output naming pattern uses printf: thumb_%04d.jpgthumb_0001.jpg, thumb_0002.jpg, …

Code

Single screenshot·bash
# Frame at exactly 1:30 as PNG
ffmpeg -ss 00:01:30 -i input.mp4 -frames:v 1 -update 1 frame.png

# As JPEG (smaller file)
ffmpeg -ss 00:01:30 -i input.mp4 -frames:v 1 -update 1 -q:v 2 frame.jpg

# As high-quality WebP
ffmpeg -ss 00:01:30 -i input.mp4 -frames:v 1 -update 1 -c:v libwebp -quality 90 frame.webp
Bulk thumbnail extraction·bash
# One frame every 10 seconds → thumb_0001.jpg, thumb_0002.jpg, ...
ffmpeg -i input.mp4 -vf fps=1/10 -q:v 2 thumb_%04d.jpg

# 'Smart' thumbnails (FFmpeg picks frames it thinks are interesting)
ffmpeg -i input.mp4 -vf "thumbnail=300" -frames:v 5 -update 1 best%02d.png

# Picks 5 frames, choosing the most representative within each 300-frame batch.

External links

Exercise

Pick a video. Extract: (a) a single PNG screenshot at 30 seconds, (b) one JPEG thumbnail every 5 seconds, (c) 10 'smart' thumbnails using the thumbnail filter. Open the smart thumbnails — are they qualitatively different from the time-based ones?

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.