Open geextahslex opened 3 months ago
this is already possible with --load-scripts=no
then explicitly load scripts with --scripts=foo.lua:bar.lua:...
Please read the manual
Okay I tried this and the script isn't loading
load-scripts=no
script=cycle-denoise.lua
--script
doesn't work at runtime. This can be done with
profile-cond=foo
input-commands=load-script C:\foo\bar.lua
But this will load a new instance of the script each time the profile condition becomes truthy. So it is better to modify the script. For autocrop.lua you can just disable it with script-opts-append=autocrop-auto=no
.
I am looking for a universal solution for all scripts, not only for autocrop.
This also doesn't work
input-commands=load-script C:\Program Files (x86)\MPV\portable_config\scripts\cycle-denoise.lua
You need to quote paths with spaces.
Sorry I don't know what you mean by "quote paths with spaces". You mean like this?
input-commands=load-script "C:\Program Files (x86)\MPV\portable_config\scripts\cycle-denoise.lua"
Use single quotes to avoid escaping \
.
like this? This still doesn't work ^^'
input-commands=load-script 'C:\Program Files (x86)\MPV\portable_config\scripts\cycle-denoise.lua'
Yes, that should work. Check the console log.
Here:
Update mpv.
This will load the script once:
[foo]
profile-cond=cond and not p['user-data/foo-loaded']
input-commands=load-script foo.lua; no-osd set user-data/foo-loaded 1
Does someone know why autocrop isn't working here? Profile is active, I can see the hue change.
[OSC2]
profile-cond=width / height >=1.77 and width / height <2 and get("video-params/primaries") == "bt.2020"
profile-restore=copy
hue=50
input-commands=load-script 'C:\Program Files (x86)\MPV\gucio\autocrop.lua'
no error message and profile is applied
Expected behavior of the wanted feature
Hi, I would like to have control over if and which scripts are loaded. Handle scripts like shaders, don't load all of them automatically at startup but let the user choose which one you need with a profile-condition, like you can do with glsl shaders. For example I don't need thumbnails for local files and vice versa, I don't need autocrop on youtube videos etc. Loading scripts with mp.command isn't reliable as often the scripts don't work at all or as expected, when they are in a different location than the default one. The way it is now it's all or nothing.
Thank you :)
Alternative behavior of the wanted feature
No response
Log File
No response
Sample Files
No response