yt-dlp, fork/successor of the discontinued youtube-dl that allows you to download videos from dozens of platforms

yt-dlp

A few years ago, my then-not-yet-companion Darkcrizt published an article talking about youtube-dl, a program written in Python that allowed us to download videos from dozens of sites from the terminal. youtube-dl It was the engine that powered many programs, but its developer decided to abandon it at the end of 2021 (latest version, 2021-12-17). As has happened with many other projects, others decided to go ahead creating a fork, and now the best option to download videos is called yt-dlp.

What also usually happens when someone picks up the baton that another drops is that they try to improve what already exists, and that is something that the yt-dlp team is in charge of emphasizing to the point of adding in their official image that is «a fork of youtube-dl with added features and fixes«. For most cases, those added functions They are as an extra, but the most important thing, in my opinion, are the corrections. In other words, that updates continue to be released, because it is common for video services to make changes and end up breaking compatibility.

How to install yt-dlp

Powering yourself can be done in different ways, but I would recommend doing it through the python pip package manager. If someone is on a distro like an Arch Linux derivative and decides to think "What's the point, if it's on the AUR?" or even in distribution repositories, well, say yes, it is, but the updates are not as fast as the official package. So if they make changes to a video service and it takes a few days to update the package, the download probably won't work. If you use the pip package, you just have to update it and try again.

So I insist on using the most direct package, and to install it, as long as you have Python installed on the operating system (this goes for anyone), you have to open a terminal and write:

pip install yt-dlp

Although it is available for any platform that can use Python, including iOS and iPadOS (via a-shell), you may not be able to use pip in all scenarios, especially on Windows if you haven't added to your PATH. In that case, it may be necessary to launch pip as a module, and the syntax would be python -m pip install yt-dlp. It will do a quick download and you can now use it.

UPDATED: more recently, there are Linux distributions that do not allow using pip to install system-wide software. Now it is recommended to use each one's package manager. Another option is to go to your GitHub page, download the executable file, give it execute permissions, and launch it from the terminal.

How it is used

And its use can be simple or complicated a little. Here we are going to explain three ways to use it, because dealing with everything it does is not easy even by reading the official documentation. To download a video with its best quality, we will open a terminal and write the program name followed by the link in quotes, for example:

yt-dlp "https://www.youtube.com/xxxxxxxxx"

With this, the program will download the best audio and the best video separately, and will join them by pulling FFmpeg. If we don't have FFmpeg installed, joining videos from platforms like YouTube will have to be done by hand.

Other download options with yt-dlp

The other way to download the videos is choosing quality. There are ways to tell you the best video, the best audio, all together, separately... but I prefer to do it this way. Instead of putting yt-dlp after the link in quotes, we put -F before the link. -F asks you to show us in the console the different formats that are available, and we will see something like the following:

video formats on youtube

As you can see, a lot of information is displayed. In the second column we see the video format, in the third the resolution or if it is only audio, and in the fifth the size. For this example, we are going to download the video at the highest resolution in which it is available and in mp4 format. To do this, we have to look at the number in the first column, and use it with the -f option, in this case in lowercase:

yt-dlp -f 137 "https://www.youtube.com/xxxxxxxxx"

The download will be exactly the same as just putting the link, with the difference that we will have chosen what is downloaded. And one detail: this can also work on pages that are not video, but have the video linked.

To select audio and video separately, behind the flag -f we will put the sum of both, for example "-f 248+600" if what we want is for it to download the video at its highest quality, the audio at its lowest quality and, when finished, join it all.

Who wants to know more about yt-dlp, its official page is this.


Leave a Comment

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

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Diego German Gonzalez said

    Thank you.
    Just the other day I installed youtube-dl and it didn't work for me. I am going to try

  2.   CMM said

    Thanks for the update