mpv/TOOLS/lua
wm4 9cfeafa89e video: add vf_fingerprint and a skip-logo script
skip-logo.lua is just what I wanted to have. Explanations are on the top
of that file. As usual, all documentation threatens to remove this stuff
all the time, since this stuff is just for me, and unlike a normal user
I can afford the luxuary of hacking the shit directly into the player.

vf_fingerprint is needed to support this script. It needs to scale down
video frames as part of its operation. For that, it uses zimg. zimg is
much faster than libswscale and generates more correct output. (The
filter includes a runtime fallback, but it doesn't even work because
libswscale fucks up and can't do YUV->Gray with range adjustment.)

Note on the algorithm: seems almost too simple, but was suggested to me.
It seems to be pretty effective, although long time experience with
false positives is missing. At first I wanted to use dHash [1][2], which
is also pretty simple and effective, but might actually be worse than
the implemented mechanism. dHash has the advantage that the fingerprint
is smaller. But exact matching is too unreliable, and you'd still need
to determine the number of different bits for fuzzier comparison. So
there wasn't really a reason to use it.

[1] https://pypi.org/project/dhash/
[2] http://www.hackerfactor.com/blog/index.php?/archives/529-Kind-of-Like-That.html
2019-09-19 20:37: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 TOOLS/autoload: Fixed broken "disabled" option 2018-06-23 13:23:07 +01:00
command-test.lua player: make various commands for managing external tracks abortable 2018-05-24 19:56:35 +02:00
cycle-deinterlace-pullup.lua
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 video: add vf_fingerprint and a skip-logo script 2019-09-19 20:37:05 +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.)