Replace youtube-dl With yt-dlp. How To Make MPV Work With yt-dlp


I’ve mentioned youtube-dl a bunch of time here on FSM. But the package wasn’t updated in a few months now, and lately it’s either super super slow or it takes a couple of tries to make it work.  Lukily there’s a replacement, a fork of youtube-dl called yt-dlp.

ALSO READ FOSS Front-Ends and Alternatives for Twitter, Instagram, Reddit, YouTube, TikTok and more…

ALSO READ Parabolic – A yt-dlp frontend app for Linux

I won’t waste any time on how to install and all that jazz. You can read everything you need to know on the project’s GitHub repo.

The only thing I will say about installing yt-dlp is that, you can also install it using pipx.  And if you’re running Arch ( or an Arch based distro ), you can install yt-dlp from the AUR. Now you see why I said that, FOR ME, the AUR is a decisive factor when choosing a Linux distro.

Once installed, you’ll notice that downloading youtube videos ( or files from other supported videos ) will run at full speed again.


But now that you’ve replaced youtube-dl with yt-dlp, you need to make it work with other packages that either require it or require it as an option dependency.


Again, if you’re running Arch ( or an Arch based distro ), all you have to do is install yt-dlp-drop-in from the AUR. You’re all set and good to go.

And if you want to make MPV to use yt-dlp here’s what you need to do:

On Linux and Mac navigate to ~/.config/MPV/ and edit your mpv.conf( if there isn’t such a file in there, create it ). Inside the mpv.conf paste the following line  script-opts=ytdl_hook-ytdl_path=PATH-TO-YT-DLP.


How to find the path to yt-dlp? Easy, open up a terminal and either use whereis yt-dlp or which yt-dlp.


Save the file, and now you can use MPV with youtube videos just like before. ( NOTE: don’t mind the errors, this was done in a brand new virtual machine created specifically for these screenshots )

ALSO READ MPV + youtube-dl: Stop Wasting Resources