Index

downloading from youtube

install

sudo apt-get install youtube-dl
alternative install (package manager may not have latest version
sudo curl -L https://yt-dl.org/latest/youtube-dl -o /usr/local/bin/youtube-dl
sudo chmod a+rx /usr/local/bin/youtube-dl
required for extracting audio
sudo apt-get install libav-tools
updating
https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl

Youtube

download a video
youtube-dl https://www.youtube.com/watch?v=XXXXXXXXXXX
download entire channel (-i to keep going for video's that fail to download
youtube-dl -i https://youtube.com/[channel]
download in a specific format
youtube-dl -f 'bestvideo[ext=mp4][height<=480]+m4a' [youtube_url]
list supported file formats
youtube-dl -F [youtube_url]
download all videos in a channel (best quality)
youtube-dl -f best -citw -v [channel]
extract audio as mp3
youtube-dl -x --audio-format mp3 https://www.youtube.com/watch?v=XXXXXXXXXXX
download subtitles
youtube-dl --write-auto-sub https://www.youtube.com/watch?v=XXXXXXXXXXX
use proxy
youtube-dl --proxy socks5://127.0.0.1:1080  https://youtube.com/XXXXXXXXXX

documentation

main page
https://github.com/rg3/youtube-dl
video format documentation
https://github.com/rg3/youtube-dl/blob/master/README.md#format-selection