yt-dlp download youtube videos

yt-dlp, the best tool to download Youtube videos

No matter how fast my internet connection gets, I still feel the need from time to time to download videos from Youtube (and other online sources like Twitter, Instagram, Tiktok, etc). Sometimes it’s a matter of needing to save an important video snippet for a presentation, or keeping a local copy of a long video for offline viewing on my tablet/phone. Those cases in which it’s just not practical to stream. A reliable video downloader in these cases is a real game-changer.

And that’s where yt-dlp comes into the picture. yt-dlp is a command line program that lets you download videos from YouTube, Twitter, Tiktok, Instagram, and several other sites. It’s free, it’s loaded with features, and doesn’t require you to give up any personal information to use it.

There are countless websites and plugins claiming to assist in video downloads. I’ve tried a few, but find they have limitations that just don’t work for me. Aside from the fact that there’s a lot of seedy websites and downloaders that ask for more information than I feel comfortable giving them.

yt-dlp versus youtube-dl

You may have heard of youtube-dl, what’s the difference between that one and yt-dlp? As it turns out, they’re both pretty similar: yt-dlp is actually based on youtube-dl. youtube-dl is not really active as a project, so yt-dlp took over. It’s kind of an improved and updated version of youtube-dl.

As for which one you should be using: yt-dlp. If you’re using youtube-dl, you should switch, since with youtube-dl you’ll quickly find yourself facing limitations that can’t be solved.

What sites can you download from with yt-dlp?

the best way to download videos

You can download video not just from Youtube, but from a whole bunch of other sites. Check out the full list of supported sites here.

Can I use yt-dlp on Windows?

Yes, yt-dlp can be used to download videos from YouTube on Windows. It can also be used on MacOS. Although my favorite platform for using it is Linux and its varieties. There’s nothing like making a few bash scripts to batch download videos, put them on a Raspberry Pi media server, and start downloading what you need.

If you need yt-dlp installers for Windows or MacOS, you can find them on the Github page, in the installation section.

Where do I learn to use yt-dlp?

I’ll give you a really quick start:

yt-dlp [url]

For example let’s say I want to download a stock night lights video:

yt-dlp "https://www.youtube.com/watch?v=AttTbHVdCso"

With that, yt-dlp will do the rest. Note that the URL is enclosed in quotation marks. This is necessary (at least on Linux) because of the question mark in the URL. Linux will mess up if you don’t write the URL in quotation marks.

Now, be careful when copying your URLs from the youtube address bar in your browser. It turns out if you download a video which is in a playlist, and you copy the “&list” parameter as part of the URL, you’ll probably end up downloading the entire playlist. To avoid this, we can use one of yt-dlp’s parameters:

yt-dlp --no-playlist "https://www.youtube.com/watch?v=x4Qh3T-2LKw&list=PLRl7dddF_ZTHqQKraj2qdC9Zqi3phIDWK"

See? In that example I copied the full URL, including the “&list” parameter. But, since I specified –no-playlist, I get only my desired video and not the entire list.

I’m not going to go in-depth into how to use yt-dlp here, since there’s far better information sources already on the internet.

yt-dlp is a command line utility, and that can be confusing if you’re not used to working command line. Fortunately there’s a really complete collection of documentation on how to use this program on Github. The manpage is also very useful for finding out how to use yt-dlp.

There’s also a pretty good yt-dlp tutorial here.


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *