Skip to content

Instantly share code, notes, and snippets.

@stevemclaugh
Last active April 11, 2018 15:25
Show Gist options
  • Save stevemclaugh/23f134c0055576c614f65aa9917a0451 to your computer and use it in GitHub Desktop.
Save stevemclaugh/23f134c0055576c614f65aa9917a0451 to your computer and use it in GitHub Desktop.

Common youtube-dl commands

Download highest-quality copy of a video to the current directory:

youtube-dl http://some/video

Download video and convert to MP4 (also supports flv, ogg, webm, mkv, avi):

youtube-dl --recode-video mp4 http://some/video

Download audio only as a 320Kbps MP3:

youtube-dl --extract-audio --audio-format mp3 --audio-quality 320k http://some/video

Download audio only as WAV:

youtube-dl --extract-audio --audio-format wav http://some/video

Download video and set filename from the command line:

youtube-dl -o "video_file.mp4" http://some/video

Download a password-protected video from Vimeo:

youtube-dl -p password http://some/video

Download a private video requiring login:

youtube-dl -u username -p password http://some/video
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment