📅 October 14, 2021     🕐 2 minutes read

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

Here’s how to replace youtube-dl with yt-dlp and make mpv use it.

 

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.

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


SUPPORT

FSM has no ads or affiliate links. Your support would simply pay for our servers, domain and maintanance. If there's any leftover change, we'll get some coffee and a slice of pizza.

Merch FSM STORE
PayPal  
Monero (XMR) 43GnqUNJrTi9QyL7kEH8vM8pgWGCE6bjv1FSRipeNMM4TTeNnUVsRBb6MfMpQYxtLE7ReonxVVSXz2rFCEdW5H11LC3x73b
Bitcoin (BTC) 1Hfuq77gKKFJeNcq4EP4dQK3yDRWrFEwJR
Bitcoin Cash (BCH) qzmdm6e6q5wf2p6sxz2mst7cenz60newwc5m4e9js8
Ether (ETH) 0x5f02869278C24A6579d3820f52AD15936D6F9d69
Stellar (XLM) GDWT2QU2CI3GZ5XH5DTSU3IUAHZMTB6VQKKRHBYWS5YCCQOAG6OKG2OB
More content?