/mpv-config

My mpv config

Primary LanguageGLSL

mpv-config

Screenshot1 Screenshot2 Screenshot3

In progress

  • Add deinterlace. Remove auto-deinterlace script. Add footnote that shows if video current video is interlaced.
  • Use new action buttons to increase/decrease color properties.
  • Deband custom button appears even if deband is off. Clicking it turns deband on.
  • Clean up menu creation function.
  • Update README.md pictures. At least try to make less commits or try using another branch before merging into main. (I think that's how it works?)
  • Work on uosc-subtitle-settings.lua. Make hint values disappear if different from mpv defaults, instead of mpv.conf's defaults. Replace radio buttons with active state. Clean up code logic.
  • Test if audio-normalize-downmix has an effect on sofalizer.

Theme

This mpv config is meant to be as minimal as possible, while providing clean and consistent looking features. OSD text is removed as much as possible.

Minimal but fancy is the goal.

Scripts

  • sofalizer Virtual surround sound.
  • uosc The on-screen-controller that creates the entire UI. Modified to remove show-text commands.
  • auto-deinterlace_let-a-only Forces deinterlace on interlaced video.
  • auto-save-state Saves time position every 5 seconds.
  • autoload Adds files in current directory to playlist.
  • evafast Hold/click left/right arrow for "hybrid fastforward and seeking." Config uses version that supports rewind. Modified to remove uosc flash-element options (the options were buggy).
  • memo Saves history. Modified title and page button text.
  • quality-menu Shows web quality versions (video/audio). Modified title.
  • thumbfast Shows thumbnails.
  • webtorrent-mpv-hook Streams torrents (have to add this one yourself).

I made these uosc menu scripts myself (any code with a lot of comments means I used AI and don't understand it much). Don't worry though I understand 98 percent of the script and bug tested a lot.

  • [uosc-screenshot] Menu to take screenshot with/without subs.
  • [uosc-subtitles] Menu for subtitle settings.
  • [uosc-video-settings] Menu for video settings.

Bug: Won't notice unless you look for it. Sometimes menu does not update (especially with updating the sub delay/anything that can be increased/decreased or toggled) until mouse stops hovering over button that updated menu (then it updates correctly). Might be an issue with how I coded menu updates or uosc itself.

uosc-video-settings.lua

This script could use a little more optimization. I don't know if I coded the menu updates properly, but it works pretty well. The script syncs with external changes. For example, toggling a shader or anything listed in the menu (deband, aspect ratio, etc) using a keybind shows live changes in the menu. Anything that's a reset/default button goes back to what mpv started with (like shaders) or the defaults of the video (like aspect ratio).

Buttons can be added for aspect ratio, deband, and shader profiles by using uosc-video-settings.conf.

If using a keybind to toggle a shader, use the shader_path (default: ~~/shaders) to prevent activating shaders twice. If the amount of shaders in the list changes, you messed up something in the uosc-video-settings.conf's shader profile syntax or used the wrong path in input.conf to toggle a shader.

Shaders

Audio filters

The script uses "[dynaudnorm=f=250:g=31:p=0.5:m=5:r=0.9:b=1]" I heard that the way dynaudorm works is that it compresses audio, so change it if you don't like that.

Here are a few audio filters I kind of tested but didn't settle on.

  • "dynaudnorm=g=5:f=250:r=0.9:p=0.5"
  • "[loudnorm=I=-16:TP=-3:LRA=4]"
  • "pan="stereo|FL=0.707FC+0.3FL+0.1BL+0.1LFE|FR=0.707FC+0.3FR+0.1BR+0.1LFE""
  • "pan="stereo|FL < 1.0FL + 0.707FC + 0.707BL|FR < 1.0FR + 0.707FC + 0.707BR""
  • "[loudnorm=i=-14:lra=7:tp=-2]"

Goals

  • Post on Reddit about my config so people actually use my config and I can get feedback.
  • Work on uosc-subtitles. Rename to uosc-subtitle-settings. Add options to override ASS subs. Add options to move subs. Possibly fonts section or just add every option available to subs (blur, border, etc) but it might be too much bloat.
  • Add options to set the increase/decrease steps for each color setting.
  • Hide primary and secondary sub-pos values if default.
  • Optimize video aspect updates.
  • Add radio buttons to show which shader profile is being used.
  • Maybe add .conf for uosc-screenshot.lua.
  • Maybe adjust playlist opacity of the thing on the top left.

Feedback

  • If there is a way to disable OSD messages from uosc without modifying the script, let me know.
  • If you would like toggles for audio filters like the shader toggles, let me know.
  • Let me know if sofalizer should be added to audio filters first (before dynaudorm filter) or if it does not really matter.
  • Let me know about shader profiles you use and other cool shaders.

Inspiration

Things that bother me

  • sub-margin-y can't be set to 49.5.
  • The bug I mentioned about menu updates.
  • No option in uosc to disable OSD text.