You are not logged in.

#1 2024-06-11 21:44:17

yak
Member
Registered: 2022-12-01
Posts: 35

Mpv ignores my config unless explicitly requested

Hey there!
Yeah, pretty much the title...

I have my usual mpv configuration on ~/.config/mpv/, but when I start it, both from command line and thunar, it's just ignored...

I found a workaround, which is launching it with mpv --config-dir=~/.config/mpv, and doing so it works without any problem.

I'd like to understand what's happening though. If I try to set mpv as default media player in alternatives, I only have vlc and bl-mpv, not just mpv.
What's bl-mpv? Is it somehow overriding my configuration, forcing mpv to use another one, maybe bl-specific?

Do you have any idea? Thanks smile

Offline

#2 2024-06-12 03:08:39

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,550
Website

Re: Mpv ignores my config unless explicitly requested

bl-mpv is a wrapper round mpv with some configs added. (Supposed to be an improvement - in particular it brings up a pseudo-gui, where plain mpv would not.)
But there's nothing stopping you from launching mpv directly, which would ignore bl-mpv. I often do this myself, but I have no personal configs.

'mpv file.mp3' will play in the terminal, or without anything if launched from a menu,
while 'bl-mpv file.mp3' will open mpv's pseudo-gui and play the file there.

The reason mpv is not offered as a Debian alternative for bl-media-player is that bl-media-player is a BunsenLabs construction that mpv knows nothing about. But you can set bl-media-player to /usr/bin/mpv manually via the galternatives link in the menu, and you're not obliged to use bl-media-player anyway. It's set in the default file associations, but they can also be changed easily enough.

But launching mpv (not bl-mpv) directly should refer to ~/.config/mpv without having to explicitly set it in the command line. If you launch mpv in verbose mode you might get a hint what's happening.

In fact, bl-mpv should also respect settings in ~/.config/mpv. If that's not happening it needs looking into too.

Can you give me an example of a setting that's being ignored?

Last edited by johnraff (2024-06-12 04:15:38)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#3 2024-06-12 09:11:12

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,737

Re: Mpv ignores my config unless explicitly requested

mpv -v --log-file=/dev/null | grep conf 

should spit conf file locations, I get

[cplayer] Configuration: meson configure build -Dprefix=/usr -Dbuildtype=plain -Doptimization=plain
[cplayer] Configuration: meson configure build -Dprefix=/usr -Dbuildtype=plain -Doptimization=plain
[cplayer] Reading config file /etc/mpv/encoding-profiles.conf
[cplayer] Reading config file /home/b/.config/mpv/mpv.conf

which should give an idea on what's up.

Last edited by brontosaurusrex (2024-06-12 09:28:17)

Offline

#4 2024-06-12 09:16:36

yak
Member
Registered: 2022-12-01
Posts: 35

Re: Mpv ignores my config unless explicitly requested

Hi john and brontosaurusrex, thank you for you replies.

Now it's more clear what bl-mpv is. Actually I like the improvements that bl-mpv has, but it's having the same problem of mpv.

I tried to launch mpv in verbose mode and I generated some logs too, but there's nothing there. It reads my configuration correctly, but for some reason it just doesn't apply it.

Just to help you understand better, this is how mpv should look like according to my configuration:

mpv with my configuration correctly applied

and this is how it looks like instead, both launching it mpv and with bl-mpv:

how mpv look now

So the main problem is with the bottom bar, which is a box.

BUT!

I kind of found the problem, and I don't know if it's something which Bunsenlabs does, or maybe it's just Debian and BL has nothing to do about it (if that's the case, I'm genuinely sorry and I apologize for accusing you big_smile).
The thing is that I was using my mpv config on Arch and I wrote it using it.
I just found out that on Arch, on my old system at least, there's no /etc/mpv/mpv.conf, so it just loads my config and thats'it.

On BL/Debian that file exists instead, and it's apparently fighting with my config.
But just commenting a line there (21, specifically), it loads correctly.

Still this seems more like a workaround than a solution to me and it's a bit brutal since now bl-mpv doesn't create that beautiful gtk window anymore, so bl-mpv is the same as mpv now for some reason, but well...at least my configuration is loaded properly.

Last edited by yak (2024-06-12 09:18:22)

Offline

#5 2024-06-12 09:38:24

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,737

Re: Mpv ignores my config unless explicitly requested

I just found out that on Arch, on my old system at least, there's no /etc/mpv/mpv.conf, so it just loads my config and thats'it.

On BL/Debian that file exists instead, and it's apparently fighting with my config.

Not on my (pure Debian 12) machine.

apt-file list mpv | grep etc
# returns only:                                                                                                                      
mpv: /etc/mpv/encoding-profiles.conf

Not sure about bl.

edit: As for unexpected old boxy looking OSC, maybe there is something like:

script-opts=osc-layout=box,osc-seekbarstyle=slider,osc-deadzonesize=0,osc-minmousemove=3

somewhere in mpv.conf?

Last edited by brontosaurusrex (2024-06-12 09:50:41)

Offline

#6 2024-06-12 09:54:36

yak
Member
Registered: 2022-12-01
Posts: 35

Re: Mpv ignores my config unless explicitly requested

Ok, it has to be BL then. I'm 100% sure I have not created it

And yes, tha line I commented was

script-opts=osc-layout=box,osc-seekbarstyle=bar,osc-deadzonesize=0,osc-minmousemove=10,osc-vidscale=no,osc-scalewindowed=2.0,osc-scalefullscreen=2.0

but still, I don't get why it was overriding my configuration in ~. Shouldn't that be prioritized?

Last edited by yak (2024-06-12 10:02:48)

Offline

#7 2024-06-12 10:02:39

brontosaurusrex
Middle Office
Registered: 2015-09-29
Posts: 2,737

Re: Mpv ignores my config unless explicitly requested

I'am guessing it is and again guessing: your user conf doesn't talk about 'script-opts', so it gets merged. Or should I say: Nothing gets overwritten in this case.

Offline

#8 2024-06-12 10:06:49

yak
Member
Registered: 2022-12-01
Posts: 35

Re: Mpv ignores my config unless explicitly requested

Thank you!!!

I actually have script-opts, but your comment has made me realize that my config misses a line like that one I commented that specifies how to osc should look like.

Now I added it, and it works exactly like I wanted. Thank you very much.

Offline

#9 2024-06-13 04:28:03

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,550
Website

Re: Mpv ignores my config unless explicitly requested

BL puts these two files in /etc/mpv:
https://github.com/BunsenLabs/bunsen-co … /boron/mpv

User config will take priority, but settings here will be applied if the user file says nothing about it.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#10 2024-06-13 13:10:43

yak
Member
Registered: 2022-12-01
Posts: 35

Re: Mpv ignores my config unless explicitly requested

Yes, I got it now smile thank you.

Offline

Board footer

Powered by FluxBB