Skip to main content

Installing FFmpeg

FFmpeg can be installed on most operating systems through package managers or by compiling from source.

Linux

Ubuntu/Debian

Install FFmpeg using the apt package manager:
1

Update package list

sudo apt update
2

Install FFmpeg

sudo apt install ffmpeg

Fedora/RHEL/CentOS

Install FFmpeg using the yum or dnf package manager:
1

Enable RPM Fusion repository (if needed)

sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
2

Install FFmpeg

sudo dnf install ffmpeg

Compile from Source (Linux)

1

Install build dependencies

sudo apt install build-essential yasm pkg-config
2

Download FFmpeg source

git clone https://git.ffmpeg.org/ffmpeg.git
cd ffmpeg
3

(Optional) Merge source plugins

If you want to include source plugins:
tools/merge-all-source-plugins
4

Configure build

./configure
Run ./configure --help to see all available options.
5

Build FFmpeg

make
GNU Make 3.81 or later is required.
6

Install FFmpeg

sudo make install
Non-system dependencies (e.g. libx264, libvpx) are disabled by default. Use configure flags to enable additional codec support.

macOS

1

Install Homebrew (if not installed)

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
2

Install FFmpeg

brew install ffmpeg
For additional codec support:
brew install ffmpeg --with-options

Compile from Source (macOS)

1

Install Xcode Command Line Tools

xcode-select --install
2

Download FFmpeg source

git clone https://git.ffmpeg.org/ffmpeg.git
cd ffmpeg
3

Configure and build

./configure
make
sudo make install

Windows

1

Download FFmpeg

Visit ffmpeg.org and download the Windows build from a trusted source like:
2

Extract the archive

Extract the downloaded archive to a location like C:\ffmpeg
3

Add to PATH

Add the bin folder to your system PATH:
  1. Open System Properties > Environment Variables
  2. Edit the PATH variable
  3. Add C:\ffmpeg\bin (or your installation path)

Compile from Source (Windows)

Compiling on Windows requires setting up a build environment:
1

Install MSYS2

Download and install MSYS2
2

Install build tools

pacman -S make gcc yasm pkg-config
3

Follow Linux compile steps

Use the same steps as Linux compilation above

Verify Installation

After installation, verify FFmpeg is working correctly:
ffmpeg -version
You should see output showing the FFmpeg version, configuration, and library versions.
ffmpeg version 6.1 Copyright (c) 2000-2023 the FFmpeg developers
built with gcc 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)
configuration: --prefix=/usr --extra-version=0ubuntu1 ...
libavutil      58. 29.100 / 58. 29.100
libavcodec     60. 31.102 / 60. 31.102
libavformat    60. 16.100 / 60. 16.100
libavdevice    60.  3.100 / 60.  3.100
libavfilter     9. 12.100 /  9. 12.100
libswscale      7.  5.100 /  7.  5.100
libswresample   4. 12.100 /  4. 12.100

Build Options

When compiling from source, you can configure FFmpeg with various options:
Out-of-tree builds: You can build FFmpeg in a separate directory by using an absolute path when launching configure:
/path/to/ffmpeg/configure
Package Maintainers: It is recommended to build FFmpeg twice:
  1. First with minimal external dependencies for core libraries
  2. Then with full dependencies (which may depend on 3rd party packages)
This avoids circular dependencies during build.

Next Steps

Quick Start Guide

Learn how to use FFmpeg with basic commands and examples

Build docs developers (and LLMs) love