youtube-dl is an open-source software that can download videos from any video site including YouTube, Niconico, and BiliBili, but there are many cases where videos or sites donโt work and errors occur. yt-dlp is a fork and branch software of youtube-dl, released as an improved version of youtube-dl. This article introduces downloading, installing, and using yt-dlp.
Github:
yt-dlp/yt-dlp: A youtube-dl fork with additional features and fixes
Install yt-dlp.
sudo curl -L 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
The following shows an example of downloading a Niconico video. (The video URL is a non-existent sample)
$ yt-dlp "https://www.nicovideo.jp/watch/sm123123123"
[niconico] sm123123123: Downloading webpage
[niconico] sm123123123: Downloading video info page
[info] sm123123123: Downloading 1 format(s): h264_480p-aac_192kbps
If you try to download the above with youtube-dl, you get an error.
$ youtube-dl "https://www.nicovideo.jp/watch/sm123123123"
[niconico] sm123123123: Downloading webpage
[niconico] sm123123123: Downloading flv info
ERROR: Unable to find video URL; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure
to call youtube-dl with the --verbose flag and include its complete output.