Notes

Youtube-dl on macOS

Edit on GitHub

Misc.

System: M1 MacBook Pro

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

 1# install
 2# sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
 3# sudo chmod a+rx /usr/local/bin/youtube-dl
 4
 5brew install youtube-dl ffmpeg libav
 6
 7# create a config file
 8sudo touch /etc/youtube-dl.conf
 9
10echo "Adding default config to save videos as MP3 Audio.. \n"
11
12# add default config
13echo "# Always extract audio (-x or --extract audio)
14--extract-audio
15
16# Always save Audio in mp3 format
17--audio-format mp3
18
19# Save all files to this folder, with this title format
20-o ~/Music/%(title)s.%(ext)s
21" | sudo tee -a /etc/youtube-dl.conf