ModernH
March 25, 2026 Β· View on GitHub
A clean, cinematic On-Screen Controller (OSC) for mpv with animated overlay menus, seekbar thumbnails, chapter and playlist navigation, and smart episode title parsing.
Based on ModernX by cyl0, extended with overlay menus, chapter navigation, animated UI, and smart filename parsing.
πΈ Preview
Smooth animated overlay menus with seekbar thumbnails
πΌ Screenshots
β Why ModernH?
ModernH focuses on improving real-world usability over traditional OSC designs.
-
Designed for real media libraries
Instead of cycling through options blindly, ModernH uses menu-based navigation β making it much easier to handle:- TV series with many episodes
- Files with multiple audio tracks
- Files with multiple subtitles
-
Cleaner and more consistent UI
All menus follow a unified design system for better readability and navigation -
More control, less friction
Direct selection replaces repetitive cycling, reducing clicks and confusion
If you want a more polished and unified UI than stock ModernX, ModernH is designed for that.
π Requirements
- mpv 0.36 or newer
- Lua scripting enabled (default in mpv)
- thumbfast.lua β required for seekbar thumbnails (included)
Tested on mpv 0.41 (Windows, dev build).
Should work on mpv 0.36+.
β¨ Key Features
- Netflix-style bottom bar β sleek gradient background, smooth fade in/out
- Unified Menu Design β all menus follow the same visual style, consistent spacing, typography, and layout
- Animated overlay menus (menu-based navigation, no cycling) β click any icon to open a dark panel overlay with fade animation and a smooth animated focus bar:
- π Playlist β browse and jump to any file; two-line layout for TV series (episode title on line 1, show name + S01E02 on line 2)
- π΅ Audio Tracks β shows language tag, codec, channel count, and sample rate
- π¬ Subtitles β shows language and track title; includes an "Off" option
- π Chapters β timestamped chapter list; click any entry to jump directly
Note: Menus support keyboard navigation (β β Enter) and mouse click.
Mouse scroll wheel is not supported inside menus.
- Smart title display β automatically parses and cleans filenames for the title bar, Playlist and Audio track labels:
- TV series β
Show Name β’ S01E03 β’ Episode Title - Movies β
Movie Title (2023) - Strips release junk:
1080p,BluRay,x265,WEB-DL,REMUX, etc.
- TV series β
- Seekbar thumbnail previews β hover the seekbar to see a video frame preview (requires
thumbfast.lua) - Chapter markers on the seekbar β small triangles/ticks marks show where each chapter begins
- Right-click seekbar β jumps to the start of the chapter
- Chapter skip buttons β dedicated prev/next chapter buttons (auto-greyed when no chapters exist)
- Clickable timecodes β click the left time to toggle milliseconds; click the right time to toggle remaining vs. total duration
π Installation
β οΈ Important
Before installing ModernH, it's strongly recommended to back up your existing mpv configuration folder.
Your current setup (scripts, configs, fonts, etc.) may differ, and some settings in this project might not match your environment or preferences.
This is an early-stage release, so if something doesn't work as expected, you can easily restore your previous setup.
Example (Windows):
%APPDATA%\mpv\
π Merging with your existing setup
After copying the files, you donβt have to replace everything.
You can open your current mpv config and these files side by side, then:
- keep what already works for you
- copy only the settings or scripts you need
- adjust values based on your preferences
This way you can integrate ModernH without breaking your existing setup.
Step 1 β Find your mpv config folder
| OS | Path |
|---|---|
| Windows | %APPDATA%\mpv\ |
| Linux | ~/.config/mpv/ |
| macOS | ~/.config/mpv/ |
Step 2 β Place all files exactly as shown below
mpv/
βββ mpv.conf
βββ input.conf
βββ fonts/
β βββ Material-Design-Iconic-Font.ttf β Required for OSC icons
βββ scripts/
β βββ modernH.lua β This custom OSC implementation
β βββ thumbfast.lua β Seekbar thumbnail previews
β βββ autoload.lua β Auto-playlist from folder
βββ script-opts/
βββ osc.conf β OSC behavior & appearance
βββ stats.conf β Stats overlay style (i key)
Create the
fonts/,scripts/, andscript-opts/subfolders if they don't exist yet.
Step 3 β Disable the built-in OSC
Make sure mpv.conf contains:
osc=no
This disables mpv's built-in OSC so ModernH can replace it. ModernH also auto-disables it at runtime, but setting it explicitly prevents a brief flash on startup.
Note: If you're using the
mpv.confincluded in this repo, this is already set β no action needed.
That's it. Launch mpv, play a file, and move your mouse to see the OSC.
βοΈ What Each File Does
| File | Role |
|---|---|
modernH.lua | The OSC itself β draws the bar, menus, and buttons; parses titles; handles all interactions. Reads settings from script-opts/osc.conf. |
thumbfast.lua | Generates and shows thumbnail previews when hovering the seekbar. Drop-in, no configuration needed. |
autoload.lua | When you open a single file, silently loads all other compatible media from the same folder into a playlist so next/prev work. |
mpv.conf | Main mpv settings β video quality, audio output, subtitles, cache, screenshots, OSD font. |
input.conf | Keyboard and mouse bindings. Edit this to add or remap hotkeys. |
script-opts/osc.conf | Options for ModernH: hide timing, seekbar style, which buttons to show, language, and more. |
script-opts/stats.conf | Visual settings for the stats overlay (i key) β font and graph colors styled to match the OSC. |
fonts/Material-Design-Iconic-Font.ttf | Icon font used by ModernH for all control buttons. Required. Without it, every button renders as an empty box. |
π¨ Customization
All OSC settings live in script-opts/osc.conf. The full list of options and their defaults is in the user_opts table at the top of modernH.lua.
OSC options (script-opts/osc.conf)
# ββ Visibility ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
hidetimeout=800 # ms of no mouse movement before OSC hides (default: 1500)
# raise to e.g. 2000 if you want it to linger longer
fadeduration=200 # fade-out duration in ms β set to 0 for instant hide
showonpause=yes # keep OSC visible when paused
showwindowed=yes # show OSC in windowed mode
showfullscreen=yes # show OSC in fullscreen mode
# ββ Buttons βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
showtitle=yes # show the parsed title above the seekbar
volumecontrol=no # show mute button + volume slider (yes/no)
showjump=yes # show Β±jump buttons flanking play/pause
jumpamount=5 # jump duration in seconds (5, 10, and 30 get special icons)
jumpiconnumber=yes # use numbered icons for 5/10/30s jumps
# ββ Seekbar βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
seekbarhandlesize=0.3 # handle dot size, range 0.0β1.0 (smaller = cleaner look)
seekrange=yes # show buffered range as a lighter fill on the seekbar
seekbarkeyframes=yes # snap to keyframes while dragging for smoother scrubbing
# ββ Time display ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
timetotal=yes # right timecode shows total duration (no = shows remaining)
timems=no # show milliseconds by default
# ββ Scaling βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
scalewindowed=1.0 # OSC scale when windowed
scalefullscreen=1.0 # OSC scale when fullscreen
# ββ Language ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
language=eng # eng (English), chs (Chinese Simplified), pl (Polish)
Subtitle settings (mpv.conf)
sub-font="Segoe UI" # font name or full path to a .ttf file
# e.g. sub-font="C:/Windows/Fonts/arial.ttf"
sub-font-size=38 # larger = easier to read
sub-margin-y=40 # distance from the bottom edge in pixels
sub-border-size=1 # outline thickness (0 = no outline)
sub-shadow-offset=1 # drop shadow depth (0 = no shadow)
Volume settings (mpv.conf)
volume=70 # starting volume on launch (0β150)
volume-max=150 # maximum scrollable volume
# set to 100 to disable volume boosting above 100%
Screenshots (mpv.conf)
screenshot-format=png
screenshot-directory=~/Pictures/mpv
# Windows example:
# screenshot-directory=C:/Users/YourName/Screenshots
OSD font (mpv.conf)
The OSD is the small status text mpv shows (volume level, seek position, etc.) β separate from subtitles.
osd-font=Segoe UI
osd-font-size=26
β¨οΈ Keybindings
Defined in input.conf. Edit this file to remap or add any bindings.
| Input | Action |
|---|---|
| Left click | Play / Pause |
| Double click | Toggle fullscreen |
β / β arrow | Seek Β±5 seconds |
β / β arrow | Volume Β±5 |
Enter inside menu | Select item |
Esc inside menu | Close menu |
| Scroll wheel | Volume Β±1 |
| Seekbar | |
| Left-click | Seek to position (exact) |
| Right-click | Snap to start of the chapter |
| Hover | Show thumbnail preview |
| Timecodes (OSC) | |
| Click left time | Toggle millisecond display |
| Click right time | Toggle remaining / total duration |
| Overlay menus | |
| Click playlist / audio / subtitle / chapter icon | Open that overlay menu |
| Click outside menu | Close menu |
i / I | Toggle stats overlay |
Full key name reference: https://mpv.io/manual/stable/#input-conf-syntax
π Autoload Behavior
autoload.lua automatically fills the playlist with all compatible media from the same folder whenever you open a single file. This is what makes the next/prev playlist buttons functional across multiple files.
To customize it, create script-opts/autoload.conf:
# disabled=no # yes = disable autoload entirely
# videos=yes # include video files
# audio=yes # include audio files
# images=no # include image files
# same_type=yes # only load files of the same type as the one you opened
# directory_mode=lazy # lazy (default) | recursive (include subfolders) | ignore
# ignore_patterns=^~,^bak- # comma-separated lua patterns to skip
Note: Autoload only runs for local files. It won't activate for URLs or streams, and it skips if you already launched mpv with multiple files specified.
β οΈ Known Limitations
- Mouse scroll is not supported inside overlay menus (yet)
- Stats panel is not yet fully consistent with the main UI
π§ Troubleshooting
OSC buttons show as boxes or question marks
The icon font is missing or in the wrong place. Make sure Material-Design-Iconic-Font.ttf is inside the fonts/ subfolder of your mpv config directory (not directly in the config root).
No thumbnail previews on seekbar hover
Confirm thumbfast.lua is inside scripts/. Thumbnails require mpv 0.36+ and take a moment to generate on first hover β this is normal.
Title still shows the raw filename
The parser handles the most common patterns (SxxExx, 4-digit years, common release tags). For unusual filenames you can override the format in osc.conf:
title=${media-title} # use mpv's built-in metadata title instead
Files not auto-loading into a playlist
Autoload only works for local files (not URLs). If you open mpv with multiple files already on the command line or drag a folder, it detects a manually built playlist and skips.
Brief flash of the old OSC on startup
Add osc=no to mpv.conf if you haven't already. ModernH disables the built-in OSC at runtime, but without the mpv.conf setting it may flicker for one frame.
Using Linux or macOS?
The included mpv.conf is tuned for Windows (d3d11, wasapi, hwdec=auto-d3d11va-copy). Replace those lines with:
# Linux
gpu-api=vulkan
ao=pipewire # or pulse / alsa
hwdec=auto # vaapi for AMD/Intel, nvdec for NVIDIA
# macOS
gpu-api=metal
ao=coreaudio
hwdec=videotoolbox
π Credits
Based on ModernX, which is derived from mpv-osc-modern (LGPL v2.1).
- ModernX by cyl0 β OSC base this script is built on
- mpv-osc-modern by maoiscat β the original upstream
- thumbfast by po5 β seekbar thumbnail previews
- autoload.lua β official mpv auto-playlist script
- Material Design Iconic Font β icon font used for all OSC buttons
π€ Contributions
Contributions are welcome!
If you're interested in improving ModernH, help would be especially appreciated for:
-
π±οΈ Scroll support in long menus
(e.g. large playlists or chapter lists) -
π Stats menu redesign
Making it visually consistent with other ModernH menus -
β¨ General UI/UX improvements
Animations, layout refinements, or new ideas
If you have suggestions, improvements, or fixes β feel free to open an issue or submit a PR.
π License
This project includes code from other open-source projects under their respective licenses.
See LICENSE for details.
π Support
If you find ModernH useful, consider supporting its development:
- β Ko-fi: https://ko-fi.com/harkeshbhatia
No pressure β just using and sharing the project is already appreciated.
β Final Note
This is a personal refinement of ModernX, focused on:
- cleaner UI
- better usability
- consistent design
Expect ongoing updates and improvements.