Repository navigation
hookdial v0.1.0
First release. hookdial turns the tunable values in your mpv shaders into on-screen sliders and reloads a shader when you save it.
Install: unzip hookdial-v0.1.0.zip into mpv's scripts folder, so you get scripts/hookdial/main.lua. Then press Alt+h in mpv. It needs mpv 0.39 or newer.
What it does
- Sliders for every
//!PARAMin your active shaders, applied live throughglsl-shader-opts, onvo=gpu-nextandvo=gpu. - Sliders for numeric
#definelines in shaders without//!PARAM. Your files are never modified; hookdial loads a tuned copy instead. - Hot reload (w in the menu, or
script-binding hookdial/watch), and a one-shothookdial/reload. - Per-shader presets (s, l and d in the menu), stored in
~~/script-opts/hookdial-presets.json. - Compile errors on screen, with the shader name and the line in your file.
- An API for other scripts, input.conf and JSON IPC:
set,step,reset, preset commands and a published list of every shader's values. See docs/api.md.
Known limitations (manual)
- Tested on Windows only, with mpv 0.42. Linux and macOS should work; please report problems.
- A binding that toggles a shader by its path stops matching once hookdial has loaded a tuned copy of it.
- Shaders that use CONSTANT, DYNAMIC or
uintparams, or calllinearize()/delinearize()(many CRT shaders), run only onvo=gpu-next. Onvo=gputhey are marked "needs vo=gpu-next". - mpv keeps every reloaded shader version in memory until the video output restarts, a few KB each. A fix is proposed upstream in mpv-player/mpv#18920.
MIT licensed.