Skip to content

Instantly share code, notes, and snippets.

@Da-Juan
Last active March 30, 2018 08:24
Show Gist options
  • Save Da-Juan/cb6a5719559a251acf641af4c5339642 to your computer and use it in GitHub Desktop.
Save Da-Juan/cb6a5719559a251acf641af4c5339642 to your computer and use it in GitHub Desktop.
youtube-dl cheat sheet
  • List Formats:
youtube-dl --list-formats <URL>
  • Download video with english subtitles, and embed them, using best formats available
youtube-dl --no-playlist --format best --sub-lang en --sub-format best --write-sub --embed-subs <URL>

or

youtube-dl --write-sub --sub-lang en --embed-subs --format 'best[ext=mp4]' --output '%(title)s.%(ext)s' <URL>
  • Download video preferring mp4 and m4a, if not available prefer mp4 and choose the best format if anything else is not available
youtube-dl --format 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best' <URL>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment