mpv+yt-dlp

why

yt-dlp is a alternative for youtube-dl. Although mpv have a built-in youtube-dl, it is not competable with yt-dlp by default.

problem

Install mpv the way you prefer and install yt-dlp as well.
In my case I installed mpv and vapoursynth first and then I install yt-dlp. After installation first test both applications works as excepted.


At this point mpv http://xxxx.com works but built-in youtube-dl is used. In order to replace that, install yt-dlp-drop-in in AUR and for OS that don’t have such thing try ln -s ${which yt-dlp} /usr/bin/youtube-dl
And then

1
2
3
#/mpv.conf

script-opts=ytdl_hook-ytdl_path=/usr/bin/yt-dlp

Now, yt-dlp is called successfully.

Call with arguments

only 480P videos played
So I tried add args behind /usr/bin/yt-dlp, is returns error
my solution is try add

1
2
3
#~/.yt-dlp/config.txt

--cookies-from-browser firefox

In this way websides like bilibili works normally.

Author

Winson

Posted on

2023-10-09

Updated on

2023-10-09

Licensed under

Comments

You forgot to set the shortname for Disqus. Please set it in _config.yml.