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

mpv config: window is forced even when running mpv in terminal #86

Closed
johnraff opened this issue May 24, 2018 · 6 comments
Closed

mpv config: window is forced even when running mpv in terminal #86

johnraff opened this issue May 24, 2018 · 6 comments

Comments

@johnraff
Copy link
Member

When running plain mpv <uri> (not bl-mpv ) in a terminal, if the uri points to http or https then an unwanted pseudo-gui window is opened. This is because our /etc/mpv/mpv.conf invokes an auto profile:

[protocol.http]
force-window=immediate

[protocol.https]
profile=protocol.http

This applies both to bl-mpv ( invoked with [pseudo-gui] or [audio-only] ) and mpv.
I think it would be desirable to insulate mpv from configurations for bl-mpv as far as possible, giving users something close to the vanilla mpv settings.

I disabled the window in my personal ~/.config/mpv/mpv.conf with:

[protocol.http]
# allow streaming in terminal
force-window=no

[pseudo-gui]
force-window=yes
player-operation-mode=pseudo-gui

but this disables the presumably desirable force-window=immediate also when running bl-mpv.

Is there some way to apply [protocol-http] only when running as bl-mpv (or if a user has specifically enabled it)?

I notice there is support for lua scripting, and a script exists to conditionally apply profiles: https://github.com/wm4/mpv-scripts/blob/master/auto-profiles.lua
I don't know if that could be used, or something simpler written?

@hhhorb
Copy link
Contributor

hhhorb commented May 25, 2018

This is a bit beyond me. You're trying to set default actions for both bl-mpv and plain mpv?

Shouldn't we just support one or the other, or are you trying to go the extra mile here?

@johnraff
Copy link
Member Author

You're trying to set default actions for both bl-mpv and plain mpv?

Trying to avoid bl-mpv's settings spilling over into regular mpv calls. This one's for @2ion I guess.

@ghost
Copy link

ghost commented May 25, 2018 via email

@johnraff
Copy link
Member Author

The problem is that if I want to listen to an audio stream in the terminal, controlling mpv from the terminal, ie mpv http://some.streaming.url, a rather large ugly pseudo-gui window opens.

It adds nothing to the functionality I already had, and I think users who want to enforce a pseudo-gui window for audio should invoke bl-mpv.

Of course video streams will open new windows anyway, and I can see the value of force-window=immediate in such cases. I guess either disabling the new window for audio streams (which is what mpv does by default) or applying [protocol.http] only for bl-mpv would work, whichever was easier to do.

@johnraff
Copy link
Member Author

Suggested workaround in this PR: #88

@johnraff
Copy link
Member Author

#88 seemed to do the job.

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

No branches or pull requests

2 participants