Yt-dlp: youtube-dl alternative

yt-dlp is a youtube-dl fork based on the now inactive youtube-dlc. The main focus of this project is adding new features and patches while also keeping up to date with the original project.

Official GitHub repository: https://github.com/yt-dlp/yt-dlp

Installation:

sudo wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -O /usr/local/bin/yt-dlp
sudo chmod a+rx /usr/local/bin/yt-dlp

Yt-dlp usage similar as a youtube-dl. To show all supported video formats use command:

yt-dlp -F https://youtube.com/video-id

To download video use command with flag yt-dlp -f <firmat-id> <video-url>

yt-dlp -f 22 https://youtube.com/video-id

To download all videos from playlist and convert them to mp3 use command:

yt-dlp --ignore-errors --format bestaudio --extract-audio --audio-format mp3 --audio-quality 160K --output "%(title)s.%(ext)s" --yes-playlist 'YOUTUBE-PLAYLIST-URL'