ToolXON Blog

FFmpeg Screenshot Commands

FFmpeg screenshot commands: Capture a single frame, generate contact sheets, select a representative thumbnail and crop frames using FFmpeg filters. This guide explains what each command does, its syntax, practical examples, useful options, and common mistakes. Commands are shown for typical installations; flags can vary across operating-system and tool versions.

Before you start

Open a terminal appropriate for the operating system shown in the examples. Check that the required tool is installed and that you are running it with the permissions needed for your task. Replace sample names, paths, hostnames and IDs with values from your own environment.

Syntax at a glance

Square brackets usually indicate optional arguments, while uppercase words such as FILE, HOST and PACKAGE are placeholders that you replace. Keep quotes around paths or text that contains spaces. Commands should be tested on a safe sample before being used in production.

Quick command reference

CommandWhat it doesExampleUseful options
ffmpeg -ss ... -frames:v 1Capture a frame at a given timeffmpeg -ss 00:00:08 -i video.mp4 -frames:v 1 frame.jpg-q:v controls JPEG quality in common image encoders
-vf fps=1Extract one frame per secondffmpeg -i video.mp4 -vf fps=1 frames/%03d.jpgChange fps value for a different interval; image2 pattern writes numbered files
-vf thumbnailSelect a representative frameffmpeg -i video.mp4 -vf "thumbnail,scale=640:-2" -frames:v 1 cover.jpgFilter may analyze multiple frames; behavior is not a guarantee of the best frame
-vf cropCrop a screenshot to a selected areaffmpeg -i video.mp4 -ss 00:00:03 -frames:v 1 -vf "crop=800:450:100:60" crop.jpgCoordinates start from the upper-left corner
ffprobeFind duration and dimensions before capturingffprobe -v error -show_entries format=duration:stream=width,height -of json video.mp4-select_streams v:0 limits results to first video stream

Command syntax and examples explained

1. ffmpeg -ss ... -frames:v 1

Purpose: Capture a frame at a given time.

Syntax

ffmpeg -ss TIME -i INPUT -frames:v 1 OUTPUT.jpg

Example

ffmpeg -ss 00:00:08 -i video.mp4 -frames:v 1 frame.jpg

Options and notes: -q:v controls JPEG quality in common image encoders.

Seek time must be within the media duration.

2. -vf fps=1

Purpose: Extract one frame per second.

Syntax

-vf fps=1 OUTPUT_PATTERN

Example

ffmpeg -i video.mp4 -vf fps=1 frames/%03d.jpg

Options and notes: Change fps value for a different interval; image2 pattern writes numbered files.

Frame extraction can create many images from a long video.

3. -vf thumbnail

Purpose: Select a representative frame.

Syntax

-vf thumbnail

Example

ffmpeg -i video.mp4 -vf "thumbnail,scale=640:-2" -frames:v 1 cover.jpg

Options and notes: Filter may analyze multiple frames; behavior is not a guarantee of the best frame.

Review the chosen frame before using it as a public thumbnail.

4. -vf crop

Purpose: Crop a screenshot to a selected area.

Syntax

-vf crop=WIDTH:HEIGHT:X:Y

Example

ffmpeg -i video.mp4 -ss 00:00:03 -frames:v 1 -vf "crop=800:450:100:60" crop.jpg

Options and notes: Coordinates start from the upper-left corner.

Choose a crop that preserves the subject and relevant context.

5. ffprobe

Purpose: Find duration and dimensions before capturing.

Syntax

ffprobe -v error -show_entries format=duration -show_entries stream=width,height INPUT

Example

ffprobe -v error -show_entries format=duration:stream=width,height -of json video.mp4

Options and notes: -select_streams v:0 limits results to first video stream.

This helps select a valid capture time and output dimensions.

Common mistakes and troubleshooting

  • Command not found: confirm the tool is installed and available on your PATH; open a new terminal after changing PATH.
  • Permission denied: verify the current account, file permissions and target path. Use administrator/root privileges only when genuinely required.
  • Unexpected output: check the command version, quoting, current directory and exact arguments. Consult the local help or manual for options supported by your build.
  • Destructive operations: preview the target and keep a backup before deleting data, rewriting history, flashing a partition or changing system configuration.

Safety tips

Review every command before running it, especially commands that delete files, change permissions, flash firmware, alter a database or expose a network service. For network scanning and remote administration, work only on devices and systems you own or are authorized to test. Keep credentials, private keys, access tokens and log files private.

Frequently asked questions

Do these commands work on every system?

Not always. Some commands are specific to Windows, Linux, Android, a particular package manager or an installed tool version. Use the syntax shown for your platform and check local help when a flag is unavailable.

Can I copy and run every example exactly?

Use the examples as templates. Replace placeholders such as filenames, package IDs, hostnames and paths with your own values, and verify the effect before executing a command that changes data or system state.

Conclusion

Use this reference as a starting point, then confirm flags in the tool’s official help or manual for your installed version. A clear understanding of syntax, options and side effects makes command-line work more reliable.