I’ve discovered that listening to fan noises while sleeping greatly improves my sleep quality. So, I decided to download a fan noise audio track from YouTube using the youtube-dl tool. Here’s the command I used:

youtube-dl ciD52cwJGCs --extract-audio --audio-format mp3 --prefer-ffmpeg; 

However, I encountered an error message after downloading the file:

ERROR: ffprobe/avprobe and ffmpeg/avconv not found. Please install one.

To fix this issue on my Mac, I followed these steps:

  1. Install ffmpeg by running the following command in your terminal:

    brew install ffmpeg
    

    This might take a while as it downloads and installs ffmpeg on your system.

  2. Once ffmpeg is installed, run the command again. Since the audio file is already downloaded, the process should be quick, and you’ll have your desired mp3 file.

That’s it! By installing ffmpeg, you’ll resolve the “ffmpeg not found” error and be able to successfully download and convert audio files using youtube-dl.