How to fix the ffmpeg not found error with youtube-dl
By Flavio Copes
Fix the 'ffmpeg not found' error from youtube-dl when extracting audio to mp3, by installing ffmpeg on your Mac with a single brew install ffmpeg command.
If youtube-dl tells you ffprobe/avprobe and ffmpeg/avconv not found, the fix is to install ffmpeg. On a Mac, that’s one command: brew install ffmpeg.
Here’s how I ran into it.
I love fan noises while sleeping. My sleep quality totally changed for the better since I started.
I was downloading a fan noise audio track from YouTube to put in the Music app using youtube-dl, like this:
youtube-dl ciD52cwJGCs --extract-audio --audio-format mp3 --prefer-ffmpeg
But after downloading the file, I got the error
ERROR: ffprobe/avprobe and ffmpeg/avconv not found. Please install one.
To solve this on my Mac I had to run
brew install ffmpeg
It took a while, then I ran the command again and since the file was already downloaded, it was a quick process to get the mp3.
Why does this happen?
youtube-dl on its own only downloads files. It doesn’t convert anything.
YouTube doesn’t serve plain mp3 files. The audio comes in formats like m4a or webm. When you ask for --extract-audio --audio-format mp3, the tool needs something to do the actual conversion, and that something is ffmpeg, a separate program that handles audio and video processing.
That’s why the download itself succeeded, and the error only showed up at the conversion step. A plain youtube-dl <video-id> without the audio extraction flags would have worked fine, but you’d get a video file, not an mp3.
The error message also mentions ffprobe. That’s a companion tool ffmpeg uses to inspect media files. You don’t need to install it separately: the ffmpeg package includes it.
Installing on other systems
On Ubuntu or Debian:
sudo apt install ffmpeg
Once installed, verify it’s available by running:
ffmpeg -version
If that prints version information, youtube-dl will find it too.
Still getting the error after installing?
One thing that can trip you up: ffmpeg must be in your PATH, because youtube-dl looks for it there.
If you installed it some other way, say by downloading a binary into a random folder, the error stays. You can point youtube-dl at the exact location with the --ffmpeg-location flag:
youtube-dl ciD52cwJGCs --extract-audio --audio-format mp3 --ffmpeg-location /opt/ffmpeg/bin
With Homebrew you don’t have to worry about this, since brew puts ffmpeg in your PATH automatically.
Related posts about tools: