yt-dlp vs youtube-dl

It’s well known that videos are not nearly as easy to save from a website as things like images or text. Although web browsers do not feature a default way to save videos directly to our hard drive, open source projects like yt-dlp and youtube-dl fill this gap quite nicely.

As you can tell from the names, these tools work especially for YouTube, where most of the world’s videos are found these days. But they can also work for a variety of other sites – actually, most any site that you come across. And, usually, if there is a site that these tools can’t work with, the developers will work on adding support for it into the next release of their software.

In this tutorial, we will show you how to install yt-dlp and youtube-dl on major Linux distros. We will also go over their pros and cons to help you see which one is better.

In this tutorial you will learn:

  • How to install yt-dlp and youtube-dl on major Linux distros
  • How to use yt-dlp and youtube-dl to download video and audio streams
  • Which is better? yt-dlp vs youtube-dl
Downloading a YouTube video with yt-dlp on Linux
Downloading a YouTube video with yt-dlp on Linux
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Any Linux system
Software yt-dlp, youtube-dl
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

How to install yt-dlp and youtube-dl on major Linux distros

On some Linux distros, these packages can be installed from the system’s package manager. However, it is recommended that you download the packages from their respective GitHub pages in order to make sure you get the latest version possible.

To install the latest version of yt-dlp on your Linux distro:

$ sudo curl -L -o /usr/local/bin/yt-dlp
$ sudo chmod a+rx /usr/local/bin/yt-dlp

To install the latest version of youtube-dl on your Linux distro:

$ sudo curl -L -o /usr/local/bin/youtube-dl
$ sudo chmod a+rx /usr/local/bin/youtube-dl

yt-dlp vs youtube-dl – usage examples

All of these commands should be interchangeable between either program, so we will only show yt-dlp (our preferred program) in the syntax examples below.

  1. To keep the program up to date, use the -U option.
    $ yt-dlp -U
  2. View the available formats and resolutions of a video with the --list-formats option.
    $ yt-dlp --list-formats
  3. Download the highest quality video stream and the highest quality audio stream for a video, and combine them into a single file.
    $ yt-dlp -f 'bv*+ba' -o '%(id)s.%(ext)s'
  4. Download 1080p video quality and combine it with the best possible audio stream.
    $ yt-dlp -f 'bv*[height=1080]+ba' -o '%(id)s.%(ext)s'
  5. Save only the audio stream (best quality possible) and put into an mp3 file:
    $ yt-dlp -f 'ba' -x --audio-format mp3 -o '%(id)s.mp3'
  6. Of course, many more options exist, and you can get very granular with your settings in order to produce the exact video and/or audio file that you want. Use the --help option to produce a long list of options that you can use with the yt-dlp command.

    $ yt-dlp --help

yt-dlp vs youtube-dl – which is better?

Both tools work very similarly and incorporate a lot of the exact same code. With this in mind, determining which tool works better basically boils down to their sets of features and how often either tool gets updated or maintained.

Seeing as yt-dlp absorbs all of the code and features from youtube-dl, it makes it the pretty clear winner. This means you get all the features from youtube-dl, as well as other unique features not found in the other video downloading projects.

From monitoring both GitHub pages, it’s also obvious that yt-dlp gets more updates than its counterpart. This is important since websites are always introducing new obstacles (intentionally or not) which thwart download programs like yt-dlp, and an update to the code is needed in order to circumvent the new block.

You can see a list of these features for yourself over on the features section of the yt-dlp GitHub page.

There is one important caveat to keep in mind when you are determining which project has the better software. These projects are only as reliable as their maintainers. If the project head for either software were to suddenly disappear due to real life circumstances (has happened many times to orphaned projects), then a new leader would have to take over, or the project eventually dies and is superseded.

To get involved with either project, or download the source code directly, check out either project’s GitHub page:

Closing Thoughts

In this tutorial, we saw how to install and use the yt-dlp and youtube-dl programs on any Linux distribution. These are very similar programs, with one being forked from the other, and both work very well at downloading video and audio from YouTube and other sources. Due to additional features and better maintenance, yt-dlp gets the edge slightly.

Comments and Discussions
Linux Forum