Skip to content

Instantly share code, notes, and snippets.

@thewheat
Created November 28, 2021 10:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thewheat/17e04a1074c08159c6805e54ca59453e to your computer and use it in GitHub Desktop.
Save thewheat/17e04a1074c08159c6805e54ca59453e to your computer and use it in GitHub Desktop.

Quick start for yt-dlp

Default usage

yt-dlp $URL

Download specific format and resolution

yt-dlp -f 'b[ext=mp4][height<=480]'  $URL 
yt-dlp -f 'b[ext=mp4]' -S 'height:480' $URL 
yt-dlp -f 'b[ext=mp4]' -S 'res:480' $URL  # `res` uses smallest dimension (e.g. for portrait videos)

Downloadinig multiple files

  • Page filterng by not live and filesize
  • Specifiies the number of videos to download and also number of videos to parse from webpage
yt-dlp --max-downloads $NUMBER_OF_FILES_TO_DOWNLOAD --match-filter "!is_live" --max-filesize 500m -f 'b[ext=mp4]' -S 'res:480' --playlist-end $NUMBER_OF_VIDEOS_TO_PARSE_FROM_WEBSITE $URL -P "$OUTPUT_FOLDER"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment