Download YouTube videos with yt-dlp
11 March 2022 (Updated 11 March 2022)
Install yt-dlp-dl
Grab the binary for your platform and download in a folder that’s part of your path.
For example:
sudo wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp /usr/local/bin
Change ownership:
chown $USER:$USER yt-dlp
Make it executable:
chmod +x yt-dlp
Verify installation
Run:
yt-dlp
If you get the error: /usr/bin/env: ‘python’: No such file or directory
, run:
sudo ln -s /usr/bin/python3 /usr/bin/python
Test installation
yt-dlp https://www.youtube.com/watch?v=u9Dg-g7t2l4
That should download the video into whatever folder you ran the above command from.
(Optional) Create config file
touch ~/yt-dlp.conf
You can use --ignore-config
if you want to disable using the config file for a particular youtube-dl run.
Recipes
Default output template
%(title)s [%(id)s].%(ext)s
You can view list of available fields here.
Download single video to current folder
yt-dlp <video-url>
Download entire playlist to current folder
yt-dlp <playlist-url>
Download MP3 of video / playlist
yt-dlp <video-or-playlist-url> -x --audio-format mp3
Tip: You can make your playlist unlisted to make it easier to download with yt-dlp without having to pass your account credentials.
Tagged:
Misc
Thanks for your comment 🙏. Once it's approved, it will appear here.
Leave a comment