What is FFmpeg? (The Universal Video and Audio Tool)
You’ve seen FFmpeg mentioned throughout our video guides. It’s the most important piece of software you’ve probably never heard of — the engine behind countless apps and services that handle video and audio. Here’s what it actually is.
FFmpeg in one sentence
FFmpeg is a free, open-source, command-line tool that can convert, edit, analyze, and process virtually any audio or video file.
Originally created by Fabrice Bellard in 2000, it’s been continuously developed for over 25 years. It handles essentially every video and audio format that exists.
What it powers
FFmpeg is the backbone of:
- YouTube’s transcoding pipeline
- Netflix’s video processing
- VLC media player (uses FFmpeg’s libraries)
- HandBrake (FFmpeg under the hood)
- OBS Studio (uses FFmpeg for encoding)
- iOS apps and Android apps for video work
- Web browser video playback (related libraries)
- Plex, Jellyfin, Emby (media servers)
- Many of the tools in our video section
When you watch a video on the internet, FFmpeg likely touched it somewhere in the pipeline.
Basic operations
A few example commands to give you a feel:
Convert MP4 to WebM:
ffmpeg -i input.mp4 output.webm
Extract audio from a video:
ffmpeg -i video.mp4 -vn -acodec copy audio.aac
Convert video to GIF:
ffmpeg -i video.mp4 -vf "fps=15,scale=480:-1" output.gif
Trim a video:
ffmpeg -ss 00:01:00 -to 00:02:30 -i input.mp4 -c copy output.mp4
Resize a video:
ffmpeg -i input.mp4 -vf scale=1280:720 output.mp4
Combine multiple videos:
ffmpeg -f concat -i list.txt -c copy output.mp4
These are simple examples. FFmpeg can do vastly more complex operations through its filter system.
Installing FFmpeg
Mac: brew install ffmpeg (with Homebrew installed)
Windows: download from ffmpeg.org/download.html, unzip, add to PATH
Linux: apt install ffmpeg (Ubuntu/Debian), dnf install ffmpeg (Fedora)
After installation: ffmpeg -version confirms it’s working.
Why command-line vs GUI
GUIs (HandBrake, iMovie, etc.) wrap FFmpeg with visual controls. They’re easier for casual use but:
- Slower for batch work: clicking through each file vs running a script
- Less flexible: GUIs expose specific options; FFmpeg has thousands more
- Less repeatable: a command can be saved and re-run; a GUI workflow is manual
- No automation: scripts using FFmpeg can run on servers, in pipelines, automatically
For one-off jobs: a GUI is fine. For repeated or complex work: FFmpeg directly is faster.
Common FFmpeg use cases
Converting between formats: any container, any codec — FFmpeg handles it.
Batch processing: script that converts hundreds of files automatically.
Streaming and live encoding: live broadcasts go through FFmpeg.
Format-specific optimization: precise control over bitrates, codecs, quality settings.
Audio extraction: pull audio from video files.
Image generation from video: thumbnails, contact sheets, frame extraction.
Video filtering: deinterlacing, cropping, scaling, denoising.
Composition: overlay text, mix multiple tracks, color correction.
What it can’t do well
FFmpeg is text-based. It struggles with:
- Visual editing: no timeline, no preview of edits before they happen
- Audio waveform editing: can process audio but not visually wave-edit
- Color grading: rudimentary; use DaVinci Resolve for serious color work
- Multi-clip projects: better suited for single-input operations than complex edits with many sources
- Real-time effects: most effects render only when you execute the command
For complex creative editing: use a real NLE (non-linear editor) like DaVinci Resolve, Premiere, or Final Cut.
For programmatic, batch, or scripted operations: FFmpeg.
Filter graphs
FFmpeg’s filter system is powerful and dense. Filters chain together:
ffmpeg -i input.mp4 -vf "crop=1080:1080:420:0,scale=720:720" output.mp4
Above: crop a 1080×1080 region starting at (420,0), then scale to 720×720.
Filters cover virtually anything you’d want to do: scale, crop, rotate, flip, fade, overlay, blur, sharpen, color-correct, denoise, etc.
Learning the filter syntax is the main barrier to FFmpeg mastery.
Codecs vs containers in FFmpeg
A common source of confusion:
- Container = the file wrapper (MP4, MKV, WebM, MOV)
- Codec = the compression algorithm inside (H.264, H.265, AV1, VP9 for video; AAC, MP3, FLAC for audio)
In FFmpeg:
-c:v libx264= use H.264 codec for video-c:a aac= use AAC for audio- The output extension (
.mp4,.mkv) sets the container
ffmpeg -i input.mov -c:v libx264 -c:a aac output.mp4
Re-encodes a MOV to MP4 with H.264 video and AAC audio.
When to copy vs re-encode
-c copy copies streams without re-encoding:
- Fast: usually seconds instead of minutes
- Lossless: no quality change
- Limited: only works when source codecs match destination requirements
-c:v libx264 -c:a aac re-encodes:
- Slower: depends on file length and quality settings
- Some quality loss: lossy re-encoding always loses something
- Universal: produces a guaranteed-compatible output
For “I just want this in MP4” with compatible source: try -c copy first.
Why we don’t have full FFmpeg in our browser tools
FFmpeg compiles to WebAssembly (ffmpeg.wasm) for browser use. It works but:
- Slow: WebAssembly is slower than native FFmpeg
- Memory-intensive: each video chews up significant memory
- File-size limits: practical limits on what fits in browser memory
- Subset of features: not every FFmpeg capability works in WASM
For our audio merger and similar tools, we use FFmpeg WebAssembly. For heavy video conversion, native FFmpeg on desktop is much faster.
Resources for learning
Official docs: ffmpeg.org/documentation.html — comprehensive but dry.
Wikis and tutorials: many community resources online with example commands for common tasks.
Stack Overflow: practical answers to specific FFmpeg questions.
ffmpeg -filters: lists all available filters.
Trial and error: most people learn FFmpeg by adapting examples.
TL;DR
- FFmpeg = open-source command-line tool for video/audio processing
- Powers: YouTube, Netflix, VLC, HandBrake, OBS, most video apps
- Strengths: universal format support, scripting, batch work, precise control
- Weaknesses: command-line interface, learning curve, no visual editing
- For everyday use: GUIs like HandBrake are easier
- For automation: FFmpeg is unmatched
- Install:
brew install ffmpeg(Mac), package managers (Linux), download (Windows)