Closed za4410 closed 7 years ago
I was able to reproduce this. The problem seems to be that mpv loads the lua scripts from the --script
option on initialization and does not accept later changes to that option. From what I can tell the only way to make this work ATM is to pass script='some_script.lua
to the MPV
contructor. Any options you pass there will be set before the mpv handle is initialized.
That will work! Right now when I pass script to MPV constructor it won't complain, but nothing happens either. Is this already supported?
I'll have to look into this some more. I just tested it and the lua script gets loaded properly, but the fullscreen
property does not seem to work from either lua or python when using libmpv.
I was able to reproduce that the fullscreen
property is a bit wonky on my fedora 25 but I was unable to reproduce it on debian sid running mpv v0.26.0. So I suspect that this behavior is in fact due to an upstream bug and I would suggest you to just try updating your mpv version to something really recent.
Due to a change in the options API you will also have to rename the script option in your python source code to scripts .
I'll close this issue for now. If there is anything left unclear, please go ahead and repoen it.
Just tried setting script property to a lua script:
player['script'] = "/path/to/test.lua"
It gives me this error:
RuntimeError: ('Generic error getting or setting mpv property', -11, (<MpvHandle object at 0x7f7e33d78a60>, b'options/script', b'/path/to/test.lua'))
It works by running mpv directly: mpv input.mov --script=/path/to/test.lua
The lua script is simply the one from mpv docs: