youtube-dl

Download videos from YouTube and other websites. More information: <http://rg3.github.io/youtube-dl/>.

Install

All systems
curl cmd.cat/youtube-dl.sh
Debian Debian
apt-get install youtube-dl
Ubuntu
apt-get install youtube-dl
Alpine
apk add youtube-dl
Arch Arch Linux
pacman -S youtube-dl
image/svg+xml Kali Linux
apt-get install youtube-dl
Fedora
dnf install youtube-dl
Windows (WSL2)
sudo apt-get update sudo apt-get install youtube-dl
OS X
brew install youtube-dl
Raspbian
apt-get install youtube-dl
Docker
docker run cmd.cat/youtube-dl youtube-dl powered by Commando

Download videos from YouTube and other websites. More information: <http://rg3.github.io/youtube-dl/>.

  • Download a video or playlist:
    youtube-dl 'https://www.youtube.com/watch?v=oHg5SJYRHA0'
  • List all formats that a video or playlist is available in:
    youtube-dl --list-formats 'https://www.youtube.com/watch?v=Mwa0_nE9H7A'
  • Download a video or playlist at a specific quality:
    youtube-dl --format "best[height<=480]" 'https://www.youtube.com/watch?v=oHg5SJYRHA0'
  • Download the audio from a video and convert it to an MP3:
    youtube-dl -x --audio-format mp3 'url'
  • Download the best quality audio and video and merge them:
    youtube-dl -f bestvideo+bestaudio 'url'
  • Download video(s) as MP4 files with custom filenames:
    youtube-dl --format mp4 -o "%(playlist_index)s-%(title)s by %(uploader)s on %(upload_date)s in %(playlist)s.%(ext)s" 'url'
  • Download a particular language's subtitles along with the video:
    youtube-dl --sub-lang en --write-sub 'https://www.youtube.com/watch?v=Mwa0_nE9H7A'
  • Download a playlist and extract MP3s from it:
    youtube-dl -f "bestaudio" --continue --no-overwrites --ignore-errors --extract-audio --audio-format mp3 -o "%(title)s.%(ext)s" 'url_to_playlist'

© tl;dr; authors and contributors