Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runmpv causes SVP to not "kick in" #22

Open
NintendoManiac64 opened this issue May 26, 2022 · 2 comments
Open

runmpv causes SVP to not "kick in" #22

NintendoManiac64 opened this issue May 26, 2022 · 2 comments

Comments

@NintendoManiac64
Copy link

As I mentioned in my previous thread, I compiled mpv using the following instructions so that I can use it in conjunction with SVP:

However, it would seem that runmpv causes SVP to not actually "kick in" even if SVP "kicks in" without issue if you launch the exact same video file through mpv without runmpv.

That being said, if one is fine with videos not being focused then one work-around is to instead associate video files with SVP itself as, when you then open video files that way, it basically seems to behave the same as runmpv except that newly-opened videos do not take focus.

@poxu
Copy link
Owner

poxu commented May 26, 2022

I, sadly, have no experience with SVP, but I looked through the documentation and noticed, that SVP uses mpv socket to communicate to mpv. SVP manual says that user should add --input-ipc-server=/tmp/mpvsocke to mpv arguments.

runmpv uses socket too. And, to distinguish mpv instances, created by runmpv from ones, launched without runmpv, runmpv passes a different socket name to mpv. That name is taken from runmpv.properties default value is pipeName=runmpv-mpv-pipe. Don't let setting name confuse you. It's pipeName, because mpv uses pipes under windows. Under linux mpv uses sockets and so runmpv uses sockets too.

But pipeName setting contains socket's name, not full path. Full path is constructed in runtime, according to the following logic. runmpv tries to be compliant with xdg, so it first looks at XDG_RUNTIME_DIR environment variable. If it's defined, then runmpv creates runmpv directory there and then creates socket in that new directory. For example, on my machine XDG_RUNTIME_DIR is /run/user/1000 . So, if pipeName is runmpv-mpv-pipe, then full socket path will be /run/user/1000/runmpv/runmpv-mpv-pipe .

If XDG_RUNTIME_DIR is not defined, then runmpv will use /tmp instead of it . If you can pass full path to mpv socket to SVP, please try doing that. If you can't, then it's a problem, because runmpv doesn't support absolute paths in pipeName setting.

I'll fix that today, but right now I'm afraid specifying socket path for SVP is the only option.

@poxu
Copy link
Owner

poxu commented May 26, 2022

You know, runmpv already supports absolute path in pipeName. If wasn't a deliberate effort on my part, so I should make the code for that more explicit, but you definitely can try using absolute path to fix your issue with SVP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants