mpv_scripts icon indicating copy to clipboard operation
mpv_scripts copied to clipboard

AutoSpeedWin fails to start with incompatible type error

Open RickDB opened this issue 6 years ago • 5 comments

After a Windows reinstall I also updated MPV to latest version:

https://sourceforge.net/projects/mpv-player-windows/rss?path=/64bit

Now it seems there's a either a core MPV change breaking it or missing something:

[ 1.973][e][autospeedwin] Command subprocess: argument args has incompatible type.

Used the same script folder and settings as before so that has remained unchanged:

script-opts=autospeed-nircmd=true,autospeed-speed=false,autospeed-dwidth=3840,autospeed-dheight=2160,autospeed-rates="23;23.976;24;50;60",autospeed-estfps=true,autospeed-exitrate=60,autospeed-monitor=0,autospeed-osdkey=y

Nircmdc 64-bit is located in: C:\Windows\nircmdc.exe

Any help on this would be appreciated :)

RickDB avatar Oct 28 '19 12:10 RickDB

I'm not sure, haven't used mpv on windows in a couple of years, maybe someone can track down the mpv commit which caused this issue and we can fix this script?

kevinlekiller avatar Nov 14 '19 00:11 kevinlekiller

hello, I am getting the same problem, seems to have to do with the autospeed-rates argument--if i remove all other arguments, no errors until that argument is added

ghost avatar Nov 17 '19 19:11 ghost

I did some digging why this started happening and it seems that _global.utils.subprocess doesn't like being passed numbers in the args table values. Wrapping all the numeric values in the two nircmd calls with tostring seems to fix the issue.

Hilzu avatar Dec 09 '19 19:12 Hilzu

That indeed fixes it 👍 Gist if anyone wants to compare or make a pull request:

https://gist.github.com/RickDB/18f64c9170f8ee531bfe2acaf816ddaf

RickDB avatar Dec 09 '19 22:12 RickDB

Damnit lol spent an hour figuring this out myself just now and came here to post it and it's already here

octopushugger avatar Apr 23 '22 19:04 octopushugger