How to Install FFmpeg: Complete Tutorial for All Platforms (2026)
Photo by H Cesar Melendez Ramos on Unsplash
Tutorial16 min read

How to Install FFmpeg: Complete Tutorial for All Platforms (2026)

Comprehensive step-by-step tutorial to install FFmpeg on Windows, macOS, Linux, and Docker. Includes troubleshooting, verification, and cloud alternatives.

By Eranol Team
#install ffmpeg#installation#tutorial#setup#guide

Installing FFmpeg correctly is crucial for video processing workflows. This complete tutorial covers installation on every major platform, common issues, and modern alternatives that eliminate installation complexity entirely.

Pre-Installation Checklist

Before installing FFmpeg, verify:

RequirementCheckNotes
Operating SystemWindows 7+, macOS 10.12+, Linux64-bit recommended
Disk Space500MB-2GB freeDepends on build
Administrator AccessRequiredFor system-wide installation
Internet ConnectionRequiredFor download
Package ManagerOptionalSimplifies installation

Install FFmpeg on Windows

Quick Installation (Chocolatey)

Step 1: Install Chocolatey

Open PowerShell as Administrator:

powershell
Set-ExecutionPolicy Bypass -Scope Process -Force [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

Step 2: Install FFmpeg

powershell
choco install ffmpeg -y

Step 3: Verify

cmd
ffmpeg -version

Done! FFmpeg is installed and configured.

Manual Installation (More Control)

Step 1: Download

  1. Visit gyan.dev/ffmpeg/builds
  2. Download "ffmpeg-release-essentials.zip"

Step 2: Extract

Extract to C:\ffmpeg

Step 3: Configure PATH

  1. Press Win + X → System
  2. Advanced system settings
  3. Environment Variables
  4. Edit "Path" under System variables
  5. Add new entry: C:\ffmpeg\bin
  6. Click OK on all dialogs

Step 4: Verify

Open new Command Prompt:

cmd
ffmpeg -version

Install FFmpeg on macOS

Using Homebrew (Recommended)

Step 1: Install Homebrew

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

Step 2: Install FFmpeg

bash
brew install ffmpeg

Step 3: Verify

bash
ffmpeg -version

Install with all features:

bash
brew install ffmpeg --with-fdk-aac --with-freetype --with-libass --with-libvorbis --with-libvpx --with-opus --with-x265

Using MacPorts

Step 1: Install MacPorts

Download from macports.org

Step 2: Install FFmpeg

bash
sudo port install ffmpeg

Manual Installation

Step 1: Download

Visit evermeet.cx/ffmpeg

Step 2: Install

bash
# Extract and move to /usr/local/bin sudo mv ffmpeg /usr/local/bin/ sudo chmod +x /usr/local/bin/ffmpeg

Install FFmpeg on Linux

Ubuntu/Debian

From Official Repository:

bash
sudo apt update sudo apt install ffmpeg -y

Latest Version (PPA):

bash
sudo add-apt-repository ppa:savoury1/ffmpeg4 sudo apt update sudo apt install ffmpeg -y

Verify:

bash
ffmpeg -version

Fedora/RHEL/CentOS

Fedora:

bash
sudo dnf install ffmpeg -y

RHEL/CentOS (Enable EPEL first):

bash
sudo yum install epel-release -y sudo yum install ffmpeg -y

Arch Linux

bash
sudo pacman -S ffmpeg

Compile from Source (All Distributions)

For latest features and custom builds:

Step 1: Install Dependencies

Ubuntu/Debian:

bash
sudo apt-get update sudo apt-get install -y build-essential yasm cmake git \ libx264-dev libx265-dev libvpx-dev libfdk-aac-dev \ libmp3lame-dev libopus-dev

Step 2: Download Source

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

Step 3: Configure

bash
./configure --enable-gpl --enable-libx264 --enable-libx265 \ --enable-libvpx --enable-libfdk-aac --enable-libmp3lame \ --enable-libopus --enable-nonfree

Step 4: Compile and Install

bash
make -j$(nproc) sudo make install

Compilation time: 15-30 minutes

Install FFmpeg in Docker

Perfect for containerized applications:

Dockerfile:

dockerfile
FROM ubuntu:22.04 RUN apt-get update && apt-get install -y ffmpeg WORKDIR /app CMD ["ffmpeg", "-version"]

Or use official image:

bash
docker pull jrottenberg/ffmpeg docker run jrottenberg/ffmpeg -version

Process video with Docker:

bash
docker run -v $(pwd):/tmp jrottenberg/ffmpeg \ -i /tmp/input.mp4 /tmp/output.mp4

Verify Installation

Check Version

bash
ffmpeg -version

Expected output:

ffmpeg version 6.1.1 Copyright (c) 2000-2024 the FFmpeg developers
built with gcc...
configuration: --enable-gpl --enable-libx264...

Check Available Codecs

bash
ffmpeg -codecs | grep h264

Check Available Formats

bash
ffmpeg -formats | grep mp4

Test Basic Conversion

bash
# Create test file ffmpeg -f lavfi -i testsrc=duration=10:size=1280x720:rate=30 test.mp4 # Convert it ffmpeg -i test.mp4 -c:v libx264 output.mp4

If this works, FFmpeg is properly installed!

Common Installation Issues

Issue 1: Command Not Found

Problem: ffmpeg: command not found

Solutions:

Windows:

  • Restart Command Prompt after PATH configuration
  • Verify PATH: echo %PATH%
  • Use full path: C:\ffmpeg\bin\ffmpeg

macOS/Linux:

  • Check installation: which ffmpeg
  • Reload shell: source ~/.bashrc
  • Check PATH: echo $PATH

Issue 2: Permission Denied

Problem: Cannot execute FFmpeg

Solution:

bash
sudo chmod +x /usr/local/bin/ffmpeg

Issue 3: Missing Libraries

Problem: error while loading shared libraries

Solution:

Linux:

bash
sudo ldconfig

macOS:

bash
brew reinstall ffmpeg

Issue 4: Old Version Installed

Problem: ffmpeg -version shows old version

Solution:

Remove old version:

bash
# Ubuntu/Debian sudo apt remove ffmpeg sudo apt autoremove # macOS brew uninstall ffmpeg # Then reinstall latest version

Issue 5: Codec Not Found

Problem: Unknown encoder 'libx264'

Solution:

Install FFmpeg with required codecs:

bash
# Ubuntu sudo apt install ffmpeg libx264-dev # macOS brew reinstall ffmpeg --with-x264 # Or compile from source with required libraries

Post-Installation Configuration

Set Default Quality

Create alias for common commands:

Linux/macOS (~/.bashrc or ~/.zshrc):

bash
alias ffmpeg-hq='ffmpeg -c:v libx264 -crf 18 -preset slow' alias ffmpeg-web='ffmpeg -c:v libx264 -crf 23 -preset medium'

Windows (PowerShell profile):

powershell
function ffmpeg-hq { ffmpeg -c:v libx264 -crf 18 -preset slow $args }

Enable Hardware Acceleration

Check available hardware encoders:

bash
ffmpeg -encoders | grep nvenc # NVIDIA ffmpeg -encoders | grep qsv # Intel ffmpeg -encoders | grep amf # AMD

Update FFmpeg

Windows (Chocolatey)

powershell
choco upgrade ffmpeg -y

macOS (Homebrew)

bash
brew update brew upgrade ffmpeg

Linux (Ubuntu/Debian)

bash
sudo apt update sudo apt upgrade ffmpeg -y

From Source

bash
cd ffmpeg git pull ./configure [your options] make -j$(nproc) sudo make install

Uninstall FFmpeg

Windows (Chocolatey)

powershell
choco uninstall ffmpeg -y

Windows (Manual)

  1. Delete C:\ffmpeg folder
  2. Remove C:\ffmpeg\bin from PATH

macOS (Homebrew)

bash
brew uninstall ffmpeg

Linux (Ubuntu/Debian)

bash
sudo apt remove ffmpeg sudo apt autoremove

Skip Installation: Use FFmpeg API

Modern alternative that eliminates installation complexity:

Installation Comparison

AspectLocal InstallFFmpeg API
Time to Setup30-120 min5 min
ComplexityHighLow
Platform IssuesCommonNone
UpdatesManualAutomatic
Disk Space500MB-2GB0MB
TroubleshootingRequiredNone

Quick Start with API

Instead of installing:

javascript
// No installation, no configuration, just code const response = await fetch('https://eranol.com/api/v1/ffmpeg/merge', { method: 'POST', headers: { 'x-api-key': YOUR_API_KEY, 'Content-Type': 'application/json' }, body: JSON.stringify({ width: 1280, height: 720, images: [ { url: 'https://example.com/image1.jpg', duration: 3 }, { url: 'https://example.com/image2.jpg', duration: 3 } ], audio_url: 'https://example.com/audio.mp3', audio_mode: 'video_length', transition: 'fade' }) }); const job = await response.json(); console.log('Video processing:', job[0].status_url);

Benefits:

  • ✅ No installation required
  • ✅ Works on all platforms
  • ✅ Always latest version
  • ✅ Unlimited processing power
  • ✅ Zero maintenance

Conclusion

Installing FFmpeg varies by platform but follows similar patterns:

Quick Summary:

  • Windows: Use Chocolatey or manual install + PATH
  • macOS: Use Homebrew
  • Linux: Use package manager
  • Docker: Use official images

Or skip installation entirely with FFmpeg API for instant video processing.

Ready to process videos without installation? Try Eranol's FFmpeg API with $1 free credit.


Related Articles:

Ready to try FFmpeg API?

Get $1 free credit and start processing videos today.

Get Started Free →