How do you install FFmpeg for yt-dlp? On Windows, run winget install Gyan.FFmpeg in PowerShell. On macOS, run brew install ffmpeg via Homebrew. On Ubuntu/Debian, execute sudo apt update && sudo apt install ffmpeg. FFmpeg is mandatory because YouTube serves 1080p+ video and audio as separate DASH tracks; FFmpeg multiplexes them into a single playable MP4 container without re-encoding.
- Windows:
winget install Gyan.FFmpeg(automatic PATH registration). - macOS:
brew install ffmpeg(includes all open codecs). - Linux:
sudo apt install ffmpeg(standard repository package).
Why FFmpeg Is Required for High-Quality Downloads
YouTube streams its high-definition video (1080p and above) as two separate files: a video-only DASH stream and an audio-only DASH stream. FFmpeg is the tool that merges these two streams into a single playable MP4 or MKV file. Without FFmpeg, yt-dlp falls back to downloading combined "progressive" streams, which YouTube caps at 720p for most content. Additionally, converting audio to MP3 requires FFmpeg's codec library (libmp3lame).
Installing FFmpeg on Windows 10 / Windows 11
Method 1: winget (Recommended)
Windows Package Manager (winget) is built into Windows 10 (1709+) and Windows 11 and is the simplest installation method:
winget install Gyan.FFmpeg
After installation, open a new PowerShell or Command Prompt window and verify:
ffmpeg -version
Method 2: Chocolatey
choco install ffmpeg-full -y
Method 3: Manual Download
- Download a Windows build from gyan.dev/ffmpeg/builds. Choose the release essentials or release full 7-zip archive.
- Extract the archive to a stable location, e.g.,
C:\ffmpeg. - Add
C:\ffmpeg\binto your system PATH:- Open Start → System → Advanced System Settings → Environment Variables
- Under "System variables", find and edit Path
- Add a new entry:
C:\ffmpeg\bin
- Open a new terminal and run
ffmpeg -versionto verify.
Installing FFmpeg on macOS
Method 1: Homebrew (Recommended)
# Install Homebrew if you haven't already
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install FFmpeg with all codecs
brew install ffmpeg
# Verify installation
ffmpeg -version
Homebrew's FFmpeg build includes most common codecs including libmp3lame, libopus, libvpx, and libx264.
Method 2: MacPorts
sudo port install ffmpeg +nonfree
Installing FFmpeg on Linux
Ubuntu & Debian
sudo apt update
sudo apt install ffmpeg -y
# Verify version (should be 5.0+ for best yt-dlp compatibility)
ffmpeg -version
Note: Ubuntu 20.04 ships FFmpeg 4.2 which works for most uses. For the latest FFmpeg 7.x, use the official builds from johnvansickle.com/ffmpeg or build from source.
Fedora / RHEL / CentOS
# Enable RPM Fusion repository first
sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install ffmpeg ffmpeg-devel -y
Arch Linux / Manjaro
sudo pacman -S ffmpeg
Verifying Your FFmpeg Installation
After installation, run this command to confirm FFmpeg and its key codecs are available:
# Check version and build configuration
ffmpeg -version
# Confirm key codecs are compiled in
ffmpeg -codecs 2>/dev/null | grep -E "mp3|aac|opus|vp9|h264"
The output should show ffmpeg version 5.x or higher and list codecs including libmp3lame, libopus, and libvpx-vp9.
Troubleshooting: "FFmpeg not found" in YT Downloader
If the YT Downloader web UI shows a yellow "FFmpeg not found" warning on startup:
- Verify FFmpeg is in your system PATH: open a new terminal and run
where ffmpeg(Windows) orwhich ffmpeg(Mac/Linux). - If you installed FFmpeg manually, set the
FFMPEG_PATHenvironment variable in your.envfile to the full path of the FFmpeg binary (e.g.,C:\ffmpeg\bin\ffmpeg.exe). - Restart the YT Downloader Flask server after any PATH changes.
Comprehensive Troubleshooting: Common FFmpeg Installation Pitfalls
Even experienced developers occasionally encounter environmental snags when configuring FFmpeg. Below is a checklist of verified solutions for the three most common installation issues:
| Error Message / Symptom | Root Cause | Resolution Step |
|---|---|---|
| 'ffmpeg' is not recognized | Binary folder missing from PATH environment variable | Add C:fmpegin to System Variables and restart your terminal. |
| Unidentified developer alert (macOS) | macOS Gatekeeper blocks manually extracted binaries | Run xattr -d com.apple.quarantine /path/to/ffmpeg or install via Homebrew. |
| Unknown encoder 'libmp3lame' | FFmpeg was compiled without MP3 encoding libraries | Install ffmpeg-extra (Ubuntu) or full builds from Gyan.dev or Homebrew. |
Advanced Verification: Checking Codec Capabilities
To ensure your FFmpeg binary supports the full range of codecs needed for modern web media multiplexing, execute the following commands in your shell:
# Check for H.264, VP9, and AV1 video decoders
ffmpeg -decoders | grep -E "h264|vp9|av1"
# Check for AAC, MP3, and Opus audio encoders
ffmpeg -encoders | grep -E "aac|libmp3lame|libopus"
When both encoder lists output corresponding rows with the V..... or A..... capability flags, your workstation or server is 100% prepared to execute high-throughput media conversions with yt-dlp.