Youtube-dl on macOS

System: M1 MacBook Pro

Install youtube-dl and required libraries for extracting audio and save default config

# install
# sudo curl -L -o /usr/local/bin/youtube-dl
# sudo chmod a+rx /usr/local/bin/youtube-dl

brew install youtube-dl ffmpeg libav

# create a config file
sudo touch /etc/youtube-dl.conf

echo "Adding default config to save videos as MP3 Audio.. \n"

# add default config
echo "# Always extract audio (-x or --extract audio)

# Always save Audio in mp3 format
--audio-format mp3

# Save all files to this folder, with this title format
-o ~/Music/%(title)s.%(ext)s
" | sudo tee -a /etc/youtube-dl.conf

Please note that this site and the posts on it are, and will always be, a work in progress. If i waited for perfection, i’d never get anything done.