The yt-dlp is a command line tool for downloading videos from YouTube and other websites. The yt-dlp is based on youtube-dl and offers additional features. The list of all the supported websites can be found in GitHub repository. The yt-dlp is a cross-platform tool that requires the Python interpreter.
This tutorial demonstrates how to install yt-dlp on Raspberry Pi.
Install yt-dlp
Use SSH to connect to Raspberry Pi. Run the following command to download the latest version of yt-dlp from GitHub repository:
sudo wget -qO /usr/local/bin/yt-dlp https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp
Set read and execute permissions for a file:
sudo chmod a+rx /usr/local/bin/yt-dlp
Now yt-dlp
command will be available for all users as a system-wide command.
We can check yt-dlp version as follows:
yt-dlp --version
We can update yt-dlp to the latest version by using the following command:
sudo yt-dlp -U
Testing yt-dlp
Video from website can be downloaded as follows:
yt-dlp <VIDEO_URL>
The <VIDEO_URL>
is a video URL that you want to download. For example:
yt-dlp https://www.youtube.com/watch?v=C0DPdy98e4c
In most cases, you don't need to install any external dependencies in order to use yt-dlp. However, if you want to convert video/audio, you will need to install FFmpeg. You can read post how to install it.
The -x
option can be used to convert video files to audio only files. Note that, this feature requires FFmpeg.
yt-dlp -x https://www.youtube.com/watch?v=C0DPdy98e4c
Uninstall yt-dlp
If you want to remove yt-dlp, execute the following command:
sudo rm -rf /usr/local/bin/yt-dlp
Leave a Comment
Cancel reply