Notes on youtube-dl

Some settings on using youtube-dl for Mac.

Dependencies

youtube-dl

brew install youtube-dl

ffmpeg

brew install ffmpeg

Best Video+Audio Quality

youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best' `[URL]`

Authentication for Private Videos Using Cookies (HTTP Error 400)

https://github.com/ytdl-org/youtube-dl/issues/21313

Example for Downloading a Private Video from Youtube (with authentication through cookies)

youtube-dl --cookies=/Users/anti/Documents/cookies.txt -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best' [URL]