woodruffw / ff2mpv

A Firefox/Chrome add-on for playing URLs in mpv.

Home Page:https://addons.mozilla.org/en-US/firefox/addon/ff2mpv/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to add yt-dlp since yt-dl is dead

G2G2G2G opened this issue · comments

https://github.com/woodruffw/ff2mpv/blob/master/ff2mpv.py#L15

is this the proper way?

    args = ["mpv", "--script-opts=ytdl_hook-ytdl_path=yt-dlp", "--no-terminal", "--", url]

also what is the last "--" in there before url?
thanks

Here is how I replaced original youtube-dl with yt-dlp
Create file named /usr/bin/youtube-dl, and paste this short script in it

#!/bin/sh
/usr/bin/yt-dlp --compat-options youtube-dl "$@"

And thats it. everything will work like with original youtube-dl

All ff2mpv does is call MPV; we're completely agnostic to how MPV decides to handle whatever URL it gets passed (it could call youtube-dl, or yt-dlp, or fetch the file itself, or anything else).

The additional flag you added looks correct. However, just in case we change the native client in the future, the best place to put that is in one of your MPV configs.

@Feanor1397's solution also works, and that's how I do it locally.