mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.25k stars 2.9k forks source link

[win]Some error in osc.conf and stats.conf #7733

Closed kesdoputr closed 4 years ago

kesdoputr commented 4 years ago

Important Information

Provide following Information:

Hello, i try newest windows build 152b0e2 And found the chapter list font size is much bigger then before

With previous version 4e94b21 https://i.imgur.com/qi1gA4C.jpg With newest verion 152b0e2 https://i.imgur.com/027hcZm.jpg

There is no change in my config. How can i config if i want back to the orginal font size? Thanks for your reading.

kesdoputr commented 4 years ago

below is the setting about osd in my config

osd-bar-align-x=0
osd-bar-align-y=0.6
osd-bar-h=2.625
osd-border-size=2
osd-border-color="#B21D2021"
osd-color="#CCFBF1C7"
osd-duration=2000
osd-font=MingLan_UI
osd-font-size=35
osd-margin-x=20
osd-margin-y=15
osd-scale-by-window=no

It seems the chapterlist osd scaled even i set osd-scale-by-window=no In the newest build.

kesdoputr commented 4 years ago

When i use the newest build with --no-config, i see no error in cmd window.

When i use my config, i see these error below

[input] Unknown key 'script-binding' at <api>:1
 to boolean! Can't convert no
' for key 'vidscale' .conf:5 error converting value 'no

It seems the setting vidscale=no in my osc.conf not work. But i don't know the first error means, even i remove my mpv.conf and input.conf, the error message still exist. [input] Unknown key 'script-binding' at <api>:1

Thanks for your reading.

kesdoputr commented 4 years ago

The error [input] Unknown key 'script-binding' at <api>:1 seems about the setting in stats.conf, and below is my setting

key_oneshot=
key_toggle=ctrl+i
key_page_1=i
key_page_2=
key_page_3=I
key_page_4=
font=MingLan_UI
font_mono=MingLan_UI
font_size=9
font_color=2FBDFA
border_size=0.5
border_color=282828
alpha=30
plot_bg_border_color=1D24CC
plot_bg_color=282828
plot_color=C7F1FB

I just need the toggle hotkey so i let key_oneshot no key binding and it cause the error. If i give it a keybind the error disapper.

And i also found key_page_1~key_page_4 is no action when i press the hotkey when stats show. If i delete key_page_1~key_page_4, the default key 1~4 is work, but if i give then a setting,these key get no action.

key_page_1=q
key_page_2=w
key_page_3=e
key_page_4=r
Argon- commented 4 years ago

The script-binding makes no sense with regard to your last error. You most likely have multiple problems/errors.

As for the key_page keys, you misunderstand how they work. The manual explicitly mentions:

Key bindings for page switching while stats are displayed.

key_page_1 to key_page_4 are bindings that only work/are applied while the stats are currently being displayed. Your setting key_page_2= explicitly deletes the keybinding. That's why it doesn't work.

but if i give then a setting,these key get no action.

Can't reproduce. Works for me.

kesdoputr commented 4 years ago

Well, i try it again, the same result. ●The error about script-binding only show when i set key_oneshot=, when i give a key to key_oneshot or delte the line, the error disapper. ●I know the key_page key is work only on stats displayed, and i have set all the key_page keys with

key_oneshot=k
key_toggle=ctrl+i
key_page_1=q
key_page_2=w
key_page_3=e
key_page_4=r

I press ctrl+i or k to show the stats, then i press q w e r, all no action.

Same setting is work on 0510 build (4e94b21), but not work on 0517 build (152b0e2) on https://sourceforge.net/projects/mpv-player-windows/files/64bit/

And how about the problem with the vidscale=no? I see error even if i set to default vidscale=yes, the error disapper only when i delete this line. https://i.imgur.com/AgfU1LF.png with below setting in osc.conf

boxalpha=150
deadzonesize=1
scalewindowed=1.5
scalefullscreen=1.5
vidscale=yes
windowcontrols=no
Argon- commented 4 years ago

●The error about script-binding only show when i set key_oneshot=, when i give a key to key_oneshot or delte the line, the error disapper.

This is to be expected. When you want i to be ignored, put ignore i into input.conf. When you want i to be used for something else, bind it to something else.

I press ctrl+i or k to show the stats, then i press q w e r, all no action.

This configuration works for me on current master, this includes 152b0e2a8cb0f3c93de163a39e9c665cb515923f.

And how about the problem with the vidscale=no?

It shouldn't happen. Works for me.

kesdoputr commented 4 years ago

Well, i have no ability to build myself, i just can only wait next build to see if it's fixed.

Can you help to try use the build on below link, keep your config, and see if still works for you? https://sourceforge.net/projects/mpv-player-windows/files/64bit/

I an confused because it's all ok on commit 4e94b21 but get error on 152b0e2 There must be some change cause the error between them.

Anyway, thanks for your read and reply.

BTW. About stats, i can assign i to another action, but the key_page keys never work if i assign a key , i can only let them work by delete these lines and use the default 1~4 And the problem vidscale can't be solved when i use the build with 152b0e2

kesdoputr commented 4 years ago

In addition, i try again about the vidscale, when i set vidscale=no in osc.conf I will get error and the option not work.

But when i delete this line and use mpv --script-opts=osc-vidscale=no to play file I get no error and the option works.

Well, maybe there just some wrong on this build, maybe everything will ok on next build. (I just found the 152b0e2 x86 build will crash when switch from fullscreen/window for several times)

Argon- commented 4 years ago

Can you help to try use the build on below link, keep your config, and see if still works for you?

No, I don't have a Windows machine.

Well, i have no ability to build myself, i just can only wait next build to see if it's fixed.

Considering everything you've said so far, I'm pretty sure there is no problem with the scripts themselves. You have the same/similar problem in various config files, yet it works when you supply those options via command line. I suspect you are doing something wrong when editing your config files. But I can only guess because you (purposefully?) deleted the issue template and never provided any of the information necessary to actually solve the problem.

kesdoputr commented 4 years ago

Well my osc.conf jsut have six lines

boxalpha=150
deadzonesize=1
scalewindowed=1.5
scalefullscreen=1.5
vidscale=no
windowcontrols=no

And just the line vidscale=no have problem,i have try three computers that the error is the same with 152b0e2 build, i have attach a log file with my original config file which is all ok with 4e94b21 build. log.txt osc.conf.txt stats.conf.txt

Argon- commented 4 years ago

Looks like you have a carriage return appended to that "no".

kesdoputr commented 4 years ago

Additional info: if i delete all other line, osc.conf just have vidscale=no Then the error disapper. But the error occur again if i just block other line with #

vidscale=no
#boxalpha=150
#deadzonesize=1
#scalewindowed=1.5
#scalefullscreen=1.5
#windowcontrols=no

Well, i believe script has no problem, maybe the windows build indeed have some mistake when he build the newest release. The error message never occur on the previous build 4e94b21 , only occur on 152b0e2. I didn't change my config, just replace the exe and the error occurs.

Now i first back to use 4e94b21, waiting he's next build. Anyway, thanks for your reading and reply.

avih commented 4 years ago

This could be a side effect of @shinchiro applying this patch by @wm4 https://github.com/mpv-player/mpv/issues/7704#issuecomment-628070478

Looking at it closely, player/lua/options.lua does io.open(conffile, "r") which I think on windows reads it as text and strips \r before \n, but the modified fopen here https://github.com/wm4/libinsanity/blob/master/microsh%E2%80%A6/fs_io.c#L365: always adds "b" which means it's opened as binary and so the \r are not stripped and parsing the values (especially boolean which is compared strictly to yes or no) fails.

kesdoputr commented 4 years ago

@avih Thanks for you information, i will also ask shinchiro to help check if it's the reason.

ghost commented 4 years ago

options.lua should definitely strip it.

avih commented 4 years ago

options.lua should definitely strip it.

Agreed, but maybe the io wrappers also shouldn't add "b" unconditionally, at least when used to patch Lua?

As this would affect user scripts as well, and I didn't try it out but it might also keep \r at source scripts which lua itself loads.

ghost commented 4 years ago

No. Text mode is utter bullshit. It's a very good property of the wrappers to forcefully disable text mode.

ixxbxxx commented 4 years ago

I am not sure if this is related but since about a few days back, my logs are showing:

[ 0.067][w][osc] Invalid setting "slimbox " for layout [ 0.067][w][osc] Invalid setting "bar " for seekbarstyle

And yes, the OSC has reverted to the default since these 2 options are being ignore in osc.conf. WIndows 10 user here.

My osc.conf: layout=slimbox seekbarstyle=bar

avih commented 4 years ago

I am not sure if this is related

It's not only related, it's exactly the same issue.

bitingsock commented 4 years ago

As a temporary fix for Windows in Notepad++ Edit>EOL Conversion>Unix (LF) Then save the file.

kesdoputr commented 4 years ago

As a temporary fix for Windows in Notepad++ Edit>EOL Conversion>Unix (LF) Then save the file.

Thanks for the solution, i try to convert my osc.conf and stats.conf Then all error disapper.

hooke007 commented 4 years ago

https://github.com/mpv-player/mpv/issues/7733#issuecomment-630992128

I met with the same problem. It works in the 0510 version, but shows " Invalid setting " on the console in 0517 version.

kesdoputr commented 4 years ago

Problem still exist on mpv-x86_64-20200524-git-685bd6a.7z Now seems the only solution is chagne the EOL char to UNIX

hooke007 commented 4 years ago

Problem still exist on mpv-x86_64-20200524-git-685bd6a.7z Now seems the only solution is chagne the EOL char to UNIX

Thanks, that is also the only solution what I took.