{"id":13835323,"url":"https://github.com/Zren/mpv-osc-tethys","last_synced_at":"2025-07-10T07:31:36.130Z","repository":{"id":37527044,"uuid":"471800706","full_name":"Zren/mpv-osc-tethys","owner":"Zren","description":"An OSC UI replacement for MPV with icons from the bomi video player. Also contains thumbnail preview and a picture-in-picture button.","archived":false,"fork":false,"pushed_at":"2024-04-30T00:11:07.000Z","size":307,"stargazers_count":187,"open_issues_count":18,"forks_count":13,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-11-20T20:39:04.614Z","etag":null,"topics":["mpv","mpv-osc","mpv-script"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Zren.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-19T20:03:44.000Z","updated_at":"2024-11-06T07:03:09.000Z","dependencies_parsed_at":"2024-01-15T19:43:19.741Z","dependency_job_id":"9bfc6f2a-c420-46e4-bac6-ec993c710e79","html_url":"https://github.com/Zren/mpv-osc-tethys","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Zren/mpv-osc-tethys","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zren%2Fmpv-osc-tethys","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zren%2Fmpv-osc-tethys/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zren%2Fmpv-osc-tethys/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zren%2Fmpv-osc-tethys/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Zren","download_url":"https://codeload.github.com/Zren/mpv-osc-tethys/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zren%2Fmpv-osc-tethys/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264545167,"owners_count":23625404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mpv","mpv-osc","mpv-script"],"created_at":"2024-08-04T14:00:59.403Z","updated_at":"2025-07-10T07:31:32.951Z","avatar_url":"https://github.com/Zren.png","language":"Lua","funding_links":[],"categories":["On Screen Controller","others"],"sub_categories":[],"readme":"# mpv-osc-tethys\n\nThis theme replaces [the built in `osc.lua`](https://github.com/mpv-player/mpv/blob/master/player/lua/osc.lua) shipped with [mpv](https://github.com/mpv-player/mpv).\n\n![](https://i.imgur.com/cYqWlw5.png)\n\nLocal files can show thumbnail previews (using a patched version of [mpv_thumbnail_script](https://github.com/TheAMM/mpv_thumbnail_script)).\n\n![](https://i.imgur.com/FegXl3W.png)\n\nPicture-In-Picture button to position in the corner, on top of other windows, and on all virtual desktops.\n\n![](https://i.imgur.com/Ynlog81.png)\n\n## Install\n\n(1) Copy `osc_tethys.lua`, `mpv_thumbnail_script_server.lua` and mpv's `autoload.lua` to\n\n* Windows: `%APPDATA%\\mpv\\scripts\\` (`C:\\Users\\USER\\AppData\\Roaming\\mpv\\scripts\\`)\n  1. Type `%APPDATA%` in the File Explorer address bar and hit enter.  \n    You should be in `C:\\Users\\USER\\AppData\\Roaming\\` where `USER` is your username.\n  2. Create the `C:\\Users\\USER\\AppData\\Roaming\\mpv\\scripts\\` folder if it doesn't exist.\n  3. View the following scripts and Save Page As (`Ctrl+S`). Save the files in the `...\\scripts\\` directory.\n      * https://raw.githubusercontent.com/Zren/mpv-osc-tethys/master/osc_tethys.lua\n      * https://raw.githubusercontent.com/Zren/mpv-osc-tethys/master/mpv_thumbnail_script_server.lua\n      * https://raw.githubusercontent.com/mpv-player/mpv/master/TOOLS/lua/autoload.lua\n  4. You should now have `C:\\Users\\USER\\AppData\\Roaming\\mpv\\scripts\\osc_tethys.lua`\n* Linux: `~/.config/mpv/scripts/`\n\n  ```sh\n  mkdir -p ~/.config/mpv/scripts/\n  cd ~/.config/mpv/scripts/\n  wget https://raw.githubusercontent.com/Zren/mpv-osc-tethys/master/osc_tethys.lua\n  wget https://raw.githubusercontent.com/Zren/mpv-osc-tethys/master/mpv_thumbnail_script_server.lua\n  wget https://raw.githubusercontent.com/mpv-player/mpv/master/TOOLS/lua/autoload.lua\n  ```\n\n(2) Edit `~/.config/mpv/mpv.conf` (`%APPDATA%\\mpv\\mpv.conf` on Windows) to disable the default `osc.lua` and improve the window.\n\n* `osc=no` will disable the default `osc.lua`\n* `border=no` will remove the window titlebar and frame. You can still drag a window by dragging the video.\n* `keep-open=yes` will keep the player open after the video has finished.\n* `keepaspect-window=no` will allow black borders around the video when maximized or half screen.\n\n```ini\nosc=no\nborder=no\nkeep-open=yes\nkeepaspect-window=no\n```\n\n(3) Edit `~/.config/mpv/input.conf` (`%APPDATA%\\mpv\\input.conf` on Windows) to rebind LEFT/RIGHT arrows to exactly 5s skips.\n\n```ini\n# Defaults: https://github.com/mpv-player/mpv/blob/master/etc/input.conf\n\n# Seek by exactly 5s instead of relative+keyframes 10s\nRIGHT seek  5 exact            # forward\nLEFT  seek -5 exact            # backward\nWHEEL_UP      seek  5 exact    # forward\nWHEEL_DOWN    seek -5 exact    # backward\n# Seek by exactly 30s instead of relative+keyframes 60s\nUP    seek  30 exact           # forward\nDOWN  seek -30 exact           # backward\n```\n\n(4) Close and reopen MPV to view the new Tethys theme!\n\n## Configuration\n\nIf you don't like any of the default colors/sizes, you can create a few text files to configure certain settings.\n\n#### tethys.conf\n\nA complete list of configuration keys can be found at the top of [`osc_tethys.lua`](osc_tethys.lua).\n\n* Windows: `%APPDATA%\\mpv\\script-opts\\tethys.conf`\n* Linux: `~/.config/mpv/script-opts/tethys.conf`\n\n```ini\n### Config\nshowPictureInPictureButton=yes\nshowSpeedButton=yes\n# Show name and shortcut of buttons on hover\nshowShortcutTooltip=yes\n# Show chapter above timestamp in seekbar tooltip\nshowChapterTooltip=yes\n# skipback/skipfrwd amount in seconds\nskipBy=5\n# RightClick skipback/skipfrwd amount in seconds\nskipByMore=30\n# \"exact\" (mordenx default) or \"relative+keyframes\" (mpv default)\nskipMode=exact\n# PictureInPicture 33% screen width, 10px from bottom right\npipGeometry=33%+-10+-10\n# PictureInPicture will show video on all virtual desktops\npipAllWorkspaces=yes\n\n### Sizes\n# 16:9 video thumbnail = 256x144\nthumbnailSize=256\nseekbarHeight=20\ncontrolsHeight=64\nbuttonTooltipSize=20\nwindowBarHeight=44\nwindowButtonSize=44\nwindowTitleSize=24\ncacheTextSize=20\ntimecodeSize=27\nseekbarTimestampSize=30\nseekbarTimestampOutline=1\nchapterTickSize=6\nwindowTitleOutline=1\n\n### Colors (uses GGBBRR for some reason)\n### Alpha ranges 0 (opaque) .. 255 (transparent)\ntextColor=FFFFFF\nbuttonColor=CCCCCC\nbuttonHoveredColor=FFFFFF\nbuttonHoveredRectColor=000000\n# Easily debug button geometry by setting buttonHoveredRectAlpha to 80\nbuttonHoveredRectAlpha=255\ntooltipColor=CCCCCC\nwindowBarColor=000000\n# windowBarAlpha (80 is mpv default) (255 morden default)\nwindowBarAlpha=255\nwindowButtonColor=CCCCCC\ncloseButtonHoveredColor=1111DD\nseekbarHandleColor=FFFFFF\nseekbarFgColor=483DD7\nseekbarBgColor=929292\nseekbarCacheColor=000000\nseekbarCacheAlpha=128\nchapterTickColor=CCCCCC\n```\n\n#### osc.conf\n\nA complete list of configuration keys inherited from `osc.lua` can [be found in the source code](https://github.com/mpv-player/mpv/blob/master/player/lua/osc.lua) or [its documentation](https://mpv.io/manual/master/#configurable-options).\n\nNote that tethys ignores a few options in `osc.conf` that are already covered by `tethys.conf`.\n\n* Windows: `%APPDATA%\\mpv\\script-opts\\osc.conf`\n* Linux: `~/.config/mpv/script-opts/osc.conf`\n\n```ini\n# Timestamp\n# Display total time instead of remaining time\ntimetotal=no\n# Display timecodes with milliseconds\ntimems=no\n\n# Whether to display the chapters/playlist at the OSD when left-clicking the next/previous OSC buttons, respectively.\nplaylist_osd=yes\nchapters_osd=yes\n\n# Duration of fade out in ms, 0 = no fade\nfadeduration=200\n\n# Minimum amount of pixels the mouse has to move between ticks to make the OSC show up. Default pre-0.21.0 was 3.\nminmousemove=0\n\n# auto=hide/show on mouse move\n# Also supports never and always\nvisibility=auto\n\n# Use a Unicode minus sign instead of an ASCII hyphen when displaying the remaining playback time.\nunicodeminus=no\n```\n\n#### mpv_thumbnail_script.conf\n\nA complete list of configuration keys for mpv_thumbnail_script can [be found in the source code](https://github.com/TheAMM/mpv_thumbnail_script/blob/master/src/options.lua) or [its documentation](https://github.com/TheAMM/mpv_thumbnail_script#configuration).\n\nNote that `thumbnailSize` in `tethys.conf` overrides `thumbnail_width` and `thumbnail_height`. Tethys also forces `mpv_no_sub=yes` and `mpv_no_config=yes` to make thumbnails easier to read.\n\n* Windows: `%APPDATA%\\mpv\\script-opts\\mpv_thumbnail_script.conf`\n* Linux: `~/.config/mpv/script-opts/mpv_thumbnail_script.conf`\n\n```ini\n# Automatically generate the thumbnails on video load, without a keypress\nautogenerate=yes\n\n# 1 hour, Only automatically thumbnail videos shorter than this (seconds)\nautogenerate_max_duration=3600\n\n# SHA1-sum filenames over this length\n# It's nice to know what files the thumbnails are (hence directory names)\n# but long URLs may approach filesystem limits.\nhash_filename_length=128\n\n# Use mpv to generate thumbnail even if ffmpeg is found in PATH\n# ffmpeg does not handle ordered chapters (MKVs which rely on other MKVs)!\n# mpv is a bit slower, but has better support overall (eg. subtitles in the previews)\nprefer_mpv=yes\n\n# Disable the built-in keybind (\"T\") to add your own\ndisable_keybinds=no\n\n# The thumbnail count target\n# (This will result in a thumbnail every ~10 seconds for a 25 minute video)\nthumbnail_count=150\n\n# The above target count will be adjusted by the minimum and\n# maximum time difference between thumbnails.\n# The thumbnail_count will be used to calculate a target separation,\n# and min/max_delta will be used to constrict it.\n\n# In other words, thumbnails will be:\n#   at least min_delta seconds apart (limiting the amount)\n#   at most max_delta seconds apart (raising the amount if needed)\nmin_delta=5\n# 120 seconds aka 2 minutes will add more thumbnails when the video is over 5 hours!\nmax_delta=90\n\n\n# Overrides for remote urls (you generally want less thumbnails!)\n# Thumbnailing network paths will be done with mpv\n\n# Allow thumbnailing network paths (naive check for \"://\")\nthumbnail_network=no\n# Override thumbnail count, min/max delta\nremote_thumbnail_count=60\nremote_min_delta=15\nremote_max_delta=120\n\n# Try to grab the raw stream and disable ytdl for the mpv subcalls\n# Much faster than passing the url to ytdl again, but may cause problems with some sites\nremote_direct_stream=yes\n```\n\n#### autoload.lua\n\n* Windows: `%APPDATA%\\mpv\\script-opts\\autoload.conf`\n* Linux: `~/.config/mpv/script-opts/autoload.conf`\n\n```ini\ndisabled=no\nimages=yes\nvideos=yes\naudio=yes\nignore_hidden=yes\n```\n\n## Notes\n\n* https://github.com/mpv-player/mpv/blob/master/player/lua/osc.lua\n* https://github.com/mpv-player/mpv/blob/master/TOOLS/lua/autoload.lua\n* https://github.com/Zren/mpvz/issues/13 (`osc_tethys.lua` Development Notes)\n* https://github.com/mpv-player/mpv/blob/master/player/lua/assdraw.lua\n* https://github.com/mpv-player/mpv/blob/master/sub/osd.c\n* https://github.com/libass/libass/wiki/ASSv5-Override-Tags\n* https://github.com/libass/libass/wiki/Libass'-ASS-Extensions\n* https://mpv.io/manual/master/\n* https://bomi-player.github.io/gallery.html (Tethys icon set designed by Kotus Works)\n\n## Other Themes\n\nI haven't tried these, but have used them as reference.\n\n* https://github.com/cyl0/MordenX\n* https://github.com/maoiscat/mpv-osc-morden\n* https://github.com/maoiscat/mpv-light-box\n* https://github.com/TheAMM/mpv_thumbnail_script\n* https://github.com/darsain/uosc\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZren%2Fmpv-osc-tethys","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FZren%2Fmpv-osc-tethys","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZren%2Fmpv-osc-tethys/lists"}