FFmpeg is the backbone of modern video and audio processing. YouTube's transcoding pipeline, VLC's playback engine, Handbrake, Adobe Premiere Pro — they all use FFmpeg under the hood. If you work with video, you'll eventually need it installed on your machine.
This guide walks through installing FFmpeg on Windows, Mac, and Linux, including how to verify the installation and fix common setup problems.
What you'll learn
- Installing FFmpeg on Windows and setting environment variables
- Installing via Homebrew on Mac (the easiest way)
- Installing on major Linux distros using package managers
- Verifying the install and troubleshooting issues
What is FFmpeg?
A quick background before we start.
The name FFmpeg is often said to derive from "Fast Forward" and "MPEG", though there is no official definition of the abbreviation. It was originally created by Fabrice Bellard in the late 1990s and is now maintained by a global open-source community. It handles encoding, decoding, transcoding, filtering, and streaming for virtually every media format in existence.
If you've ever compressed a video, extracted audio from a movie file, or converted between formats, there's a good chance FFmpeg was involved.
Installing FFmpeg on Windows
Windows doesn't have a built-in package manager, so the process involves downloading a binary, extracting it, and adding it to your system PATH. It sounds like more work than it is.
1. Download the binary
Go to the official download page: https://ffmpeg.org/download.html
Under "Get packages & executable files," click the Windows logo. This takes you to third-party builds. The recommended source is gyan.dev — the builds are well-maintained and updated frequently.
Download ffmpeg-release-essentials.zip. This includes ffmpeg, ffprobe, and ffplay without requiring additional codecs to be installed separately.
2. Extract the archive
Extract the ZIP to a location of your choice. The path should not contain spaces. A clean option is:
C:\ffmpeg
After extracting, you should have a folder like C:\ffmpeg\ffmpeg-7.1-essentials_build. Inside it, navigate to the bin folder and confirm that ffmpeg.exe, ffprobe.exe, and ffplay.exe are present.
3. Add FFmpeg to your system PATH
This step is what lets you run ffmpeg from any directory without typing the full path every time.
- Press
Win + Sand search for "Edit the system environment variables" - Click Environment Variables
- Under "System variables," find and select Path, then click Edit
- Click New and enter the path to your
binfolder:
C:\ffmpeg\bin
- Click OK on all dialogs to save
Important: Close any open Command Prompt or PowerShell windows and open new ones. Environment variables are loaded at process startup, so existing sessions won't pick up the change.
4. Verify the installation
Open a new Command Prompt or PowerShell and run:
ffmpeg -version
You should see output like this:
ffmpeg version 7.1 Copyright (c) 2000-2024 the FFmpeg developers
built with gcc 14.2.0 (Rev1, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 ...
libavutil 59. 39.100 / 59. 39.100
libavcodec 61. 19.100 / 61. 19.100
Troubleshooting: "ffmpeg is not recognized"
If you get an error saying ffmpeg is not a recognized command:
- Make sure you added
C:\ffmpeg\bin(not justC:\ffmpeg) to PATH - Check for trailing spaces in the path you entered
- Confirm you opened a new terminal window after updating the environment variables
Installing FFmpeg on Mac
If you have Homebrew installed, this is a one-liner.
1. Install Homebrew (if you haven't already)
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
You'll be asked for your Mac login password. The installation takes a few minutes.
2. Install FFmpeg
brew install ffmpeg
Homebrew handles all dependencies automatically. When it's done, verify the install:
ffmpeg -version
That's it.
Apple Silicon (M1/M2/M3)
Homebrew automatically selects the right binary for your chip. No Rosetta 2 needed.
Updating to a newer version later
brew upgrade ffmpeg
Installing FFmpeg on Linux
Linux package managers make this straightforward. The exact command depends on your distribution.
Ubuntu / Debian
sudo apt update
sudo apt install ffmpeg
Verify:
ffmpeg -version
Note: The FFmpeg version in Ubuntu's default repositories tends to lag behind the latest release. If you need cutting-edge features, build from source or use a third-party PPA.
CentOS / RHEL / Rocky Linux
FFmpeg isn't in the default CentOS/RHEL repos. You'll need RPM Fusion.
# Enable EPEL
sudo yum install epel-release
# Add RPM Fusion (provides FFmpeg)
sudo yum install --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm
sudo yum install ffmpeg
For CentOS 8+ / Rocky Linux / AlmaLinux, use dnf:
sudo dnf install epel-release
sudo dnf install ffmpeg
Arch Linux / Manjaro
Arch's community repositories always have the latest FFmpeg version:
sudo pacman -Syu ffmpeg
Fedora
# Add RPM Fusion
sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install ffmpeg
Verifying on any Linux distro
ffmpeg -version
which ffmpeg
The which ffmpeg command should return something like /usr/bin/ffmpeg. If it returns nothing, FFmpeg either isn't installed or isn't in your PATH.
Building from source (advanced)
If you need features or codecs not available in your distro's package manager version, building from source gives you full control.
Here's the basic process on Ubuntu:
# Install build dependencies
sudo apt install build-essential yasm nasm pkg-config libssl-dev \
libx264-dev libx265-dev libvpx-dev libopus-dev libvorbis-dev
# Get the source
git clone https://git.ffmpeg.org/ffmpeg.git
cd ffmpeg
# Configure with your desired options
./configure --prefix=/usr/local --enable-gpl --enable-libx264 --enable-libx265
# Build (use all CPU cores)
make -j$(nproc)
# Install
sudo make install
Building from source is also necessary if you're creating a redistributable binary with specific license requirements. I cover that scenario in a separate article.
The other tools: ffprobe and ffplay
When you install FFmpeg, two additional tools come along for the ride.
ffprobe — Inspects media files and outputs metadata
ffprobe -v quiet -print_format json -show_format -show_streams input.mp4
This outputs detailed information about codecs, resolution, bitrate, duration, and more. Essential for debugging encoding problems.
ffplay — A minimal media player built on FFmpeg
ffplay input.mp4
Useful for quickly previewing files without opening a full editor.
Make sure both work after installing:
ffprobe -version
ffplay -version
Summary
Here's the quick reference by platform:
| Platform | Command |
|---|---|
| Windows | Download zip from ffmpeg.org → extract to C:\ffmpeg → add C:\ffmpeg\bin to PATH |
| Mac | brew install ffmpeg |
| Ubuntu/Debian | sudo apt install ffmpeg |
| Arch Linux | sudo pacman -S ffmpeg |
| CentOS/RHEL | Add RPM Fusion, then sudo yum install ffmpeg |
After installing, ffmpeg -version should print version information. If it does, you're ready to start using one of the most powerful tools in video and audio processing.
Check out the FFmpeg basics guide next to learn how to convert formats, extract audio, trim clips, and more.