dexeonify / mpv-config

My personal mpv config and user scripts. :)
69 stars 7 forks source link

Some ideas #2

Closed asianmusicguy closed 2 years ago

asianmusicguy commented 2 years ago

@dexeonify was not sure where to put this or how to contact you outside of Git but I have a friend who loves mpv but is frustrated by lack of OSC volume controls and i know the main mpv team is hardline against it how much work would it take could we do it with you coding and me testing or?

dexeonify commented 2 years ago

Is the volume indicator not enough? Or does your friend need actual buttons to adjust the volume? image

How about changing the keybind to make the scroll wheel adjust the volume? So that it's the same keybind with VLC.

main mpv team is hardline against it how much work would

Yea I'm not sure about that. If the professionals complain that it's too much work, it is probably not in my level either. Do note I'm not a Lua programmer, I just modify some code and look at the documentation every now and then.

asianmusicguy commented 2 years ago

Well is not that it’s a lot of work they ju seem against it adding bindings as suggested might work but it would be cool if we could figure out how to add one

dexeonify commented 2 years ago

adding bindings as suggested might work but it would be cool if we could figure out how to add one

In input.conf, add/modify the following:

WHEEL_UP            add volume 2
WHEEL_DOWN          add volume -2
dexeonify commented 2 years ago

I noticed something interesting when I was fiddling with the OSC code: If you scroll your mouse wheel up and down while hovering above the volume icon, it will increment the volume by -5/+5!

Anyways, here's a mock-up: image

How should you mute? Currently, you mute by left-clicking on the volume button. But with these volume controls, left-clicking increases/decreases the volume.

asianmusicguy commented 2 years ago

@dexeonify M ?

dexeonify commented 2 years ago

^ There's the commit. Click the menu (...) > View file > Raw to download and replace the existing modernx.lua.

Alternatively, modernx.zip.

asianmusicguy commented 2 years ago

@dexeonify what was changed? because npw the buttons are squared out as if it didn't load the fonts

dexeonify commented 2 years ago

Have you seen the comment in #3? Basically, you have to install my icon font for the OSC icons.

asianmusicguy commented 2 years ago

ooooooh ok

asianmusicguy commented 2 years ago

@dexeonify at smaller screen sizes the buttons don't fit this is a 480p wmv rip of the movie Joy luck club i made a long time ago image it resolves at full screen though

dexeonify commented 2 years ago

Seems like a mpv.net issue. mpv correctly resizes the OSC based on the window size. This and the seeking issue (https://github.com/cyl0/MordenX/issues/6#issuecomment-1046269099) are only available on mpv.net...

asianmusicguy commented 2 years ago

@dexeonify also my imput confih currently looks like this for volume so what do i need to change

asianmusicguy commented 2 years ago

the plus and minus became dots when i pasted

dexeonify commented 2 years ago

No, the keybinds in input.conf don't affect the OSC's own keybind. Currently, I hardcoded the volume controls to increment the volume by -2/+2. Would you like to change that?

asianmusicguy commented 2 years ago

no its fine

dexeonify commented 2 years ago

at smaller screen sizes the buttons don't fit this is a 480p wmv rip of the movie Joy luck club i made a long time ago

Found the option that caused it. In mpv.conf, remove osc-scalewindowed=1.5 in script-opts =, so it becomes:

script-opts = osc-hidetimeout=2000,console-scale=1

That will make the OSC smaller though. Alternatively, you can change the value to below 1.5, like osc-scalewindowed=1.25 if you want to make it slightly bigger.

dexeonify commented 2 years ago

Feel free to close this issue after both issues are verified as fixed :)

asianmusicguy commented 2 years ago

@dexeonify I still want it to be auto kist fit better when videos are smaller?

dexeonify commented 2 years ago

This is a limitation of mpv's OSC rendering unfortunately, it uses ASS to render the OSC. It can't dynamically reduce the padding when there's no space left. I could reduce the padding manually, but even then, if you open a vertical video (e.g. TikTok video), the OSC icons will clash together.

Does changing the scaling not help? It was intended to be used at osc-scalewindowed=1.

asianmusicguy commented 2 years ago

@dexeonify little confused in the modernx post you said remove scale window from mpv.cong so i did so where do i add script-opts = osc-hidetimeout=2000,console-scale=1 ?

dexeonify commented 2 years ago

Originally, you will find this line in mpv.conf:

script-opts = osc-scalewindowed=1.5,osc-hidetimeout=2000,console-scale=1

After you remove osc-scalewindowed=1.5, it becomes

script-opts = osc-hidetimeout=2000,console-scale=1

So no, you don't have to add it or anything. Is that clear?

asianmusicguy commented 2 years ago

@dexeonify Im starting to discover as we do this that literly the only good thing about MPV.net is the context meny could we not just make one for mpv proper ?

dexeonify commented 2 years ago

could we not just make one for mpv proper ?

There's a related user script here: https://gitlab.com/carmanaught/mpvcontextmenu Seems like setting it up takes a bit of effort, I haven't look into it yet.

literly the only good thing about MPV.net is the context meny

Are you sure you don't need any other GUI mpv.net provides? E.g. Config/Input Editor, file explorer integration, media search etc.

dexeonify commented 2 years ago

Closing this issue for inactivity. A summary of what we've discussed so far: