Published on


Note: If you get a /usr/bin/env: 'python': No such file or directory error when running these commands, run which python3 and add the command before youtube-dl. For example - /usr/bin/python3 youtube-dl.


youtube-dl [video url]

Download with custom title

youtube-dl -o 'Custom Title.mp4' [video url]

List formats

/usr/local/bin/youtube-dl --list-formats [video url]

Download best audio/video

youtube-dl -f bestvideo+bestaudio [video url]

Download a specific format

youtube-dl -f m4a [video url]

Download embedded video

In short, you need to use the --referer flag

youtube-dl --referer "URL in browser" "player-url"