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.
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:
| Requirement | Check | Notes |
|---|---|---|
| Operating System | Windows 7+, macOS 10.12+, Linux | 64-bit recommended |
| Disk Space | 500MB-2GB free | Depends on build |
| Administrator Access | Required | For system-wide installation |
| Internet Connection | Required | For download |
| Package Manager | Optional | Simplifies installation |
Install FFmpeg on Windows
Quick Installation (Chocolatey)
Step 1: Install Chocolatey
Open PowerShell as Administrator:
powershellSet-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
powershellchoco install ffmpeg -y
Step 3: Verify
cmdffmpeg -version
Done! FFmpeg is installed and configured.
Manual Installation (More Control)
Step 1: Download
- Visit gyan.dev/ffmpeg/builds
- Download "ffmpeg-release-essentials.zip"
Step 2: Extract
Extract to C:\ffmpeg
Step 3: Configure PATH
- Press
Win + X→ System - Advanced system settings
- Environment Variables
- Edit "Path" under System variables
- Add new entry:
C:\ffmpeg\bin - Click OK on all dialogs
Step 4: Verify
Open new Command Prompt:
cmdffmpeg -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
bashbrew install ffmpeg
Step 3: Verify
bashffmpeg -version
Install with all features:
bashbrew 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
bashsudo 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:
bashsudo apt update sudo apt install ffmpeg -y
Latest Version (PPA):
bashsudo add-apt-repository ppa:savoury1/ffmpeg4 sudo apt update sudo apt install ffmpeg -y
Verify:
bashffmpeg -version
Fedora/RHEL/CentOS
Fedora:
bashsudo dnf install ffmpeg -y
RHEL/CentOS (Enable EPEL first):
bashsudo yum install epel-release -y sudo yum install ffmpeg -y
Arch Linux
bashsudo pacman -S ffmpeg
Compile from Source (All Distributions)
For latest features and custom builds:
Step 1: Install Dependencies
Ubuntu/Debian:
bashsudo 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
bashgit 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
bashmake -j$(nproc) sudo make install
Compilation time: 15-30 minutes
Install FFmpeg in Docker
Perfect for containerized applications:
Dockerfile:
dockerfileFROM ubuntu:22.04 RUN apt-get update && apt-get install -y ffmpeg WORKDIR /app CMD ["ffmpeg", "-version"]
Or use official image:
bashdocker pull jrottenberg/ffmpeg docker run jrottenberg/ffmpeg -version
Process video with Docker:
bashdocker run -v $(pwd):/tmp jrottenberg/ffmpeg \ -i /tmp/input.mp4 /tmp/output.mp4
Verify Installation
Check Version
bashffmpeg -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
bashffmpeg -codecs | grep h264
Check Available Formats
bashffmpeg -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:
bashsudo chmod +x /usr/local/bin/ffmpeg
Issue 3: Missing Libraries
Problem: error while loading shared libraries
Solution:
Linux:
bashsudo ldconfig
macOS:
bashbrew 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):
bashalias ffmpeg-hq='ffmpeg -c:v libx264 -crf 18 -preset slow' alias ffmpeg-web='ffmpeg -c:v libx264 -crf 23 -preset medium'
Windows (PowerShell profile):
powershellfunction ffmpeg-hq { ffmpeg -c:v libx264 -crf 18 -preset slow $args }
Enable Hardware Acceleration
Check available hardware encoders:
bashffmpeg -encoders | grep nvenc # NVIDIA ffmpeg -encoders | grep qsv # Intel ffmpeg -encoders | grep amf # AMD
Update FFmpeg
Windows (Chocolatey)
powershellchoco upgrade ffmpeg -y
macOS (Homebrew)
bashbrew update brew upgrade ffmpeg
Linux (Ubuntu/Debian)
bashsudo apt update sudo apt upgrade ffmpeg -y
From Source
bashcd ffmpeg git pull ./configure [your options] make -j$(nproc) sudo make install
Uninstall FFmpeg
Windows (Chocolatey)
powershellchoco uninstall ffmpeg -y
Windows (Manual)
- Delete
C:\ffmpegfolder - Remove
C:\ffmpeg\binfrom PATH
macOS (Homebrew)
bashbrew uninstall ffmpeg
Linux (Ubuntu/Debian)
bashsudo apt remove ffmpeg sudo apt autoremove
Skip Installation: Use FFmpeg API
Modern alternative that eliminates installation complexity:
Installation Comparison
| Aspect | Local Install | FFmpeg API |
|---|---|---|
| Time to Setup | 30-120 min | 5 min |
| Complexity | High | Low |
| Platform Issues | Common | None |
| Updates | Manual | Automatic |
| Disk Space | 500MB-2GB | 0MB |
| Troubleshooting | Required | None |
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:
Related Articles
How to Convert Video to MP4 Using API: Complete Guide 2026
Learn how to convert any video format to MP4 using a simple API. Complete tutorial with code examples, best practices, and real-world use cases for developers.
Read more →Convert Audio to MP3 with API: Developer's Guide 2026
Complete guide to converting audio files to MP3 format using a simple API. Learn best practices, code examples, and optimization techniques for developers.
Read more →Convert Video to GIF Using API: Complete Guide 2026
Learn how to convert videos to animated GIFs using a simple API. Complete tutorial with optimization techniques, code examples, and best practices for developers.
Read more →