wget

How to install and use youtube-dl

Available also with apt-get on debian, this repository package is usually not updated to the latest version. Consider to donwload it manually and use standalone.

wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/bin/youtube-dl

chmod a+rx /usr/bin/youtube-dl

for updates:youtube-dl -U

youtube-dl <video_url>

To specify a format: youtube-dl -F <video_url>

To download with a specific format youtube-dl -f <chosen_format><video_url>

For subtitles:

youtube-dl --list-subs <video_url>

youtube-dl --all-subs --skip-download <video_url>

For Playlists: youtube-dl -cit <playlist_url>

Only Audio: youtube-dl -x --audio-format mp3 <video_url>