deftools.io Media

🎬 FFmpeg Command Generator

Generate ffmpeg commands from common tasks: convert format, trim video, change resolution, GIF from video, extract audio, compress media.

Filter:
ffmpeg command
 

About this tool

FFmpeg is a powerful command-line tool for processing video, audio, and image files — but its syntax is notoriously hard to remember, especially under time pressure. This generator builds correct ffmpeg commands from plain-English scenarios: convert between formats, trim a segment, change resolution, create a GIF from a video, extract audio, compress files, burn subtitles, and more.

Pick a task from the dropdown, fill in your file name and the relevant parameters, and the command updates live. Example: pick "Create a GIF from a video segment", enter clip.mp4, start at 00:01:30, duration 3 seconds, and you get a palette-optimized GIF command ready to paste.

Each scenario includes a breakdown of what each flag does, so you understand the command before running it in a terminal. Commands that modify files or use complex filter graphs include appropriate cautions.

FAQ

Do I need to install FFmpeg first?

Yes. This tool generates commands; you must have FFmpeg installed on your system to run them. Install it via your package manager: <code>brew install ffmpeg</code> (macOS), <code>sudo apt install ffmpeg</code> (Debian/Ubuntu), or from the official download page at ffmpeg.org.

What does -c copy mean and when should I use it?

<code>-c copy</code> copies the video and audio streams without re-encoding — it is fast and preserves quality. Use it for format conversion (remuxing), trimming on keyframe boundaries, and stream operations that do not need to change codecs. Omit it when you need to actually re-encode the content (resizing, changing codec).

Why does trimming not always start at the exact frame I specified?

When <code>-ss</code> (start time) is placed before <code>-i</code>, ffmpeg seeks to the nearest keyframe, which may be a few frames before your target. For frame-accurate cutting, place <code>-ss</code> after <code>-i</code> (slower seek, exact frame) or leave it before for fast approximate cuts and accept the keyframe boundary.

The generated GIF is too large — how do I make it smaller?

Reduce the frame rate (try 8-10 FPS), lower the resolution (320-480 px wide), and shorten the duration. The palettegen+paletteuse filter already produces the most efficient GIF possible for your source; after that, size is governed by frame count and dimensions.

Related media tools

Copied!