Skip to content

Instantly share code, notes, and snippets.

@OSoG
Created February 9, 2019 17:48
Show Gist options
  • Select an option

  • Save OSoG/3b7293c3176183d0e1665b3b49704bfb to your computer and use it in GitHub Desktop.

Select an option

Save OSoG/3b7293c3176183d0e1665b3b49704bfb to your computer and use it in GitHub Desktop.
youtube-dl.md

Note that on Windows you may need to use double quotes instead of single.

Download best mp4 format available or any other best if no mp4 available

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

Download best format available but not better that 480p

$ youtube-dl -f 'bestvideo[height<=480]+bestaudio/best[height<=480]'

Download best video only format but no bigger than 50 MB

$ youtube-dl -f 'best[filesize<50M]'

Download best format available via direct link over HTTP/HTTPS protocol

$ youtube-dl -f '(bestvideo+bestaudio/best)[protocol^=http]'

Download the best video format and the best audio format without merging them

$ youtube-dl -f 'bestvideo,bestaudio' -o '%(title)s.f%(format_id)s.%(ext)s'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment