youtube-dl
- download youtube videos from CLI
install
sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl sudo chmod a+rx /usr/local/bin/youtube-dl
config
/etc/youtube-dl.conf
~/.config/youtube-dl/config
examples
- list available formats:
youtube-dl -F 'http://www.youtube.com/watch?v=P9pzm5b6FFY'
- descargar formato concreto (de la lista anterior):
youtube-dl -f 22 'http://www.youtube.com/watch?v=P9pzm5b6FFY'
- otros comandos similares:
youtube-dl -f best 'http://www.youtube.com/watch?v=P9pzm5b6FFY' youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/bestvideo+bestaudio' --merge-output-format mp4 'http://www.youtube.com/watch?v=P9pzm5b6FFY'
- only audio:
youtube-dl -x -f bestaudio URL
youtube-dl -x -f bestaudio[ext=m4a] --embed-thumbnail URL # con carátula
- subtítulos:
youtube-dl --list-subs URL # lista subtítulos youtube-dl --write-sub --sub-lang LANG URL # varios subtítulos separados por comas youtube-dl --write-auto-sub --sub-lang LANG URL # subtítulos autogenerados
- usando aria2c:
youtube-dl --external-downloader aria2c --external-downloader-args '-c -j 3 -x 3 -s 3 -k 1M' URL