mpv/TOOLS/lua
wm4 77f309c94f vo_gpu, options: don't return NaN through API
Internally, vo_gpu uses NaN for some options to indicate a default value
that is different depending on the context (e.g. different scalers).
There are 2 problems with this:

1. you couldn't reset the options to their defaults
2. NaN is a damn mess and shouldn't be part of the API

The option parser already rejected NaN explicitly, which is why 1.
didn't work. Regarding 2., JSON might be a good example, and actually
caused a bug report.

Fix this by mapping NaN to the special value "default". I think I'd
prefer other mechanisms (maybe just having every scaler expose separate
options?), but for now this will do. See you in a future commit, which
painfully deprecates this and replaces it with something else.

I refrained from using "no" (my favorite magic value for "unset" etc.)
because then I'd have e.g. make --no-scale-param1 work, which in
addition to a lot of effort looks dumb and nobody will use it.

Here's also an apology for the shitty added test script.

Fixes: #6691
2019-10-25 00:25:05 +02:00
..
README.md TOOLS/lua/README: link to list of user scripts on wiki 2016-03-18 22:07:30 +01:00
acompressor.lua acompressor.lua: Convert to use mp.options and lavfi filter bridge 2017-08-07 11:42:20 +02:00
ao-null-reload.lua
audio-hotplug-test.lua command: drop "audio-out-detected-device" property 2017-10-09 15:48:47 +02:00
autocrop.lua TOOLS/autocrop.lua: fix cropdetect black limit for 10-bit videos 2017-08-17 20:43:25 +01:00
autodeint.lua TOOLS/lua/autodeint: update to lavfi-bridge 2017-08-21 18:12:10 +01:00
autoload.lua autoload.lua: Configurable autoload types 2019-10-02 12:48:56 +02:00
command-test.lua player: "subprocess" command should stop immediately in idle mode 2019-10-04 16:30:48 +02:00
cycle-deinterlace-pullup.lua
nan-test.lua vo_gpu, options: don't return NaN through API 2019-10-25 00:25:05 +02:00
observe-all.lua TOOLS/lua/observe-all: explicitly observe all options 2016-09-23 20:49:23 +02:00
ontop-playback.lua
pause-when-minimize.lua
skip-logo.lua skip-logo.lua: fix skipping in the first two frames 2019-10-08 21:26:43 +02:00
status-line.lua TOOLS/lua/status-line: improve and update 2017-08-04 09:07:37 +01:00

README.md

mpv lua scripts

The lua scripts in this folder can be loaded on a one-time basis by adding the option

--script=/path/to/script.lua

to mpv's command line.

Where appropriate, they may also be placed in ~/.config/mpv/scripts/ from where they will be automatically loaded when mpv starts.

This is only a small selection of internally maintained scripts. Some of them are just for testing mpv internals, or serve as examples. An extensive user-edited list of 3rd party scripts is available here:

https://github.com/mpv-player/mpv/wiki/User-Scripts

(Anyone can add their own scripts to that list.)