• Stars
    star
    170
  • Rank 218,187 (Top 5 %)
  • Language
    Lua
  • Created about 2 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An OSC UI replacement for MPV with icons from the bomi video player. Also contains thumbnail preview and a picture-in-picture button.

mpv-osc-tethys

This theme replaces the built in osc.lua shipped with mpv.

Local files can show thumbnail previews (using a patched version of mpv_thumbnail_script).

Picture-In-Picture button to position in the corner, on top of other windows, and on all virtual desktops.

Install

(1) Copy osc_tethys.lua, mpv_thumbnail_script_server.lua and mpv's autoload.lua to

(2) Edit ~/.config/mpv/mpv.conf (%APPDATA%\mpv\mpv.conf on Windows) to disable the default osc.lua and improve the window.

  • osc=no will disable the default osc.lua
  • border=no will remove the window titlebar and frame. You can still drag a window by dragging the video.
  • keep-open=yes will keep the player open after the video has finished.
  • keepaspect-window=no will allow black borders around the video when maximized or half screen.
osc=no
border=no
keep-open=yes
keepaspect-window=no

(3) Edit ~/.config/mpv/input.conf (%APPDATA%\mpv\input.conf on Windows) to rebind LEFT/RIGHT arrows to exactly 5s skips.

# Defaults: https://github.com/mpv-player/mpv/blob/master/etc/input.conf

# Seek by exactly 5s instead of relative+keyframes 10s
RIGHT seek  5 exact            # forward
LEFT  seek -5 exact            # backward
WHEEL_UP      seek  5 exact    # forward
WHEEL_DOWN    seek -5 exact    # backward
# Seek by exactly 30s instead of relative+keyframes 60s
UP    seek  30 exact           # forward
DOWN  seek -30 exact           # backward

(4) Close and reopen MPV to view the new Tethys theme!

Configuration

If you don't like any of the default colors/sizes, you can create a few text files to configure certain settings.

tethys.conf

A complete list of configuration keys can be found at the top of osc_tethys.lua.

  • Windows: %APPDATA%\mpv\script-opts\tethys.conf
  • Linux: ~/.config/mpv/script-opts/tethys.conf
### Config
showPictureInPictureButton=yes
showSpeedButton=yes
# Show name and shortcut of buttons on hover
showShortcutTooltip=yes
# Show chapter above timestamp in seekbar tooltip
showChapterTooltip=yes
# skipback/skipfrwd amount in seconds
skipBy=5
# RightClick skipback/skipfrwd amount in seconds
skipByMore=30
# "exact" (mordenx default) or "relative+keyframes" (mpv default)
skipMode=exact
# PictureInPicture 33% screen width, 10px from bottom right
pipGeometry=33%+-10+-10
# PictureInPicture will show video on all virtual desktops
pipAllWorkspaces=yes

### Sizes
# 16:9 video thumbnail = 256x144
thumbnailSize=256
seekbarHeight=20
controlsHeight=64
buttonTooltipSize=20
windowBarHeight=44
windowButtonSize=44
windowTitleSize=24
cacheTextSize=20
timecodeSize=27
seekbarTimestampSize=30
seekbarTimestampOutline=1
chapterTickSize=6
windowTitleOutline=1

### Colors (uses GGBBRR for some reason)
### Alpha ranges 0 (opaque) .. 255 (transparent)
textColor=FFFFFF
buttonColor=CCCCCC
buttonHoveredColor=FFFFFF
buttonHoveredRectColor=000000
# Easily debug button geometry by setting buttonHoveredRectAlpha to 80
buttonHoveredRectAlpha=255
tooltipColor=CCCCCC
windowBarColor=000000
# windowBarAlpha (80 is mpv default) (255 morden default)
windowBarAlpha=255
windowButtonColor=CCCCCC
closeButtonHoveredColor=1111DD
seekbarHandleColor=FFFFFF
seekbarFgColor=483DD7
seekbarBgColor=929292
seekbarCacheColor=000000
seekbarCacheAlpha=128
chapterTickColor=CCCCCC

osc.conf

A complete list of configuration keys inherited from osc.lua can be found in the source code or its documentation.

Note that tethys ignores a few options in osc.conf that are already covered by tethys.conf.

  • Windows: %APPDATA%\mpv\script-opts\osc.conf
  • Linux: ~/.config/mpv/script-opts/osc.conf
# Timestamp
# Display total time instead of remaining time
timetotal=no
# Display timecodes with milliseconds
timems=no

# Whether to display the chapters/playlist at the OSD when left-clicking the next/previous OSC buttons, respectively.
playlist_osd=yes
chapters_osd=yes

# Duration of fade out in ms, 0 = no fade
fadeduration=200

# Minimum amount of pixels the mouse has to move between ticks to make the OSC show up. Default pre-0.21.0 was 3.
minmousemove=0

# auto=hide/show on mouse move
# Also supports never and always
visibility=auto

# Use a Unicode minus sign instead of an ASCII hyphen when displaying the remaining playback time.
unicodeminus=no

mpv_thumbnail_script.conf

A complete list of configuration keys for mpv_thumbnail_script can be found in the source code or its documentation.

Note 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.

  • Windows: %APPDATA%\mpv\script-opts\mpv_thumbnail_script.conf
  • Linux: ~/.config/mpv/script-opts/mpv_thumbnail_script.conf
# Automatically generate the thumbnails on video load, without a keypress
autogenerate=yes

# 1 hour, Only automatically thumbnail videos shorter than this (seconds)
autogenerate_max_duration=3600

# SHA1-sum filenames over this length
# It's nice to know what files the thumbnails are (hence directory names)
# but long URLs may approach filesystem limits.
hash_filename_length=128

# Use mpv to generate thumbnail even if ffmpeg is found in PATH
# ffmpeg does not handle ordered chapters (MKVs which rely on other MKVs)!
# mpv is a bit slower, but has better support overall (eg. subtitles in the previews)
prefer_mpv=yes

# Disable the built-in keybind ("T") to add your own
disable_keybinds=no

# The thumbnail count target
# (This will result in a thumbnail every ~10 seconds for a 25 minute video)
thumbnail_count=150

# The above target count will be adjusted by the minimum and
# maximum time difference between thumbnails.
# The thumbnail_count will be used to calculate a target separation,
# and min/max_delta will be used to constrict it.

# In other words, thumbnails will be:
#   at least min_delta seconds apart (limiting the amount)
#   at most max_delta seconds apart (raising the amount if needed)
min_delta=5
# 120 seconds aka 2 minutes will add more thumbnails when the video is over 5 hours!
max_delta=90


# Overrides for remote urls (you generally want less thumbnails!)
# Thumbnailing network paths will be done with mpv

# Allow thumbnailing network paths (naive check for "://")
thumbnail_network=no
# Override thumbnail count, min/max delta
remote_thumbnail_count=60
remote_min_delta=15
remote_max_delta=120

# Try to grab the raw stream and disable ytdl for the mpv subcalls
# Much faster than passing the url to ytdl again, but may cause problems with some sites
remote_direct_stream=yes

autoload.lua

  • Windows: %APPDATA%\mpv\script-opts\autoload.conf
  • Linux: ~/.config/mpv/script-opts/autoload.conf
disabled=no
images=yes
videos=yes
audio=yes
ignore_hidden=yes

Notes

Other Themes

I haven't tried these, but have used them as reference.

More Repositories

1

plasma-applet-eventcalendar

QML
450
star
2

ResizeYoutubePlayerToWindowSize

Userscript: Moves the YouTube video to the top of the website and fill the window with the video player.
JavaScript
152
star
3

plasma-applet-tiledmenu

QML
136
star
4

plasma-applet-commandoutput

Python
84
star
5

plasma-applets

This monolithic repo has been broken up into individual repos for each widget.
84
star
6

chrome-extension-imagus

"Mirror" of the official Imagus source hosted on Google Drive
JavaScript
57
star
7

plasma-applet-todolist

QML
55
star
8

Netbeans-Themes

Themes for the Java IDE Netbeans.
Java
46
star
9

plasma-wallpapers

QML
45
star
10

mpvz

Qt5/QML based GUI for libmpv similar to Bomi
QML
44
star
11

plasma-applet-volumewin7mixer

Python
37
star
12

Towny

Plugin for Bukkit. Resident-Town-Nation heirarchy alongside a grid-based protection system.
Java
37
star
13

breeze-alphablack

Breeze Light theme with minor improvements and a black panel/titlebar.
Python
35
star
14

plasma-applet-win7showdesktop

Python
25
star
15

PyQuassel

Python
24
star
16

plasma-applet-githubissues

QML
21
star
17

atom-windows-context-menu

JavaScript
19
star
18

plasma-applet-presentwindows

QML
16
star
19

plasma-applet-sysmonitordash

QML
13
star
20

plasma-applet-gitlabissues

QML
12
star
21

zren.github.io

HTML
12
star
22

plasma-applet-alphablackcontrol

QML
11
star
23

kwin-tabbox-thumbnail_grid

Thumbnail Grid was merged upstream into KDE Plasma 5.18
QML
10
star
24

plasma-applet-lib

Various reuseable files for developing a plasma widget.
QML
9
star
25

quassel-pushbullet

PushBullet Notifications for Quassel IRC.
JavaScript
6
star
26

plasma-applet-volumeslider

QML
6
star
27

plasma-applet-condensedweather

QML
5
star
28

NewTabRecentBookmarks

Firefox addon + Chrome extension to display recent bookmarks and pinned folders on the new tab page.
JavaScript
5
star
29

RecentBookmarksPopup

Firefox addon + Chrome extension to display recent bookmarks in toolbar icon popup.
JavaScript
5
star
30

plasma-applet-simpleweather

QML
4
star
31

atom-package-manager-commands

CoffeeScript
4
star
32

chrome-extension-stylish

JavaScript
4
star
33

QmlDevTools

A QML Inspector based on the Firefox Web Inspector
QML
4
star
34

nixshot

Tool to capture a screenshot, optionally crop it, then upload it, and finally copy it's url to the clipboard.
QML
4
star
35

gitz

Simple Git History using PyGTK (gitk replacement)
Python
3
star
36

plasma-applet-systraytimer

QML
3
star
37

quassel-mobile

A simple webapp to read quassel's recent logs, targeted for mobile use.
HTML
2
star
38

SublimeMisc

Python
2
star
39

jsPaint

Simple Paint App using JQuery that saves to Imgur
JavaScript
2
star
40

HexChatThemeEditor

JavaScript
2
star
41

Bukkit-Plugins

Assortment of plugins for Bukkit
Java
2
star
42

plasma-applet-kdeconnectdevice

QML
2
star
43

pyTactics

A python attempt at a FF Tactics-esque game.
Python
2
star
44

plasma-applet-batterytime

QML
2
star
45

Towny-hMod

A town plugin for a hModed Minecraft server.
Java
2
star
46

TuringAltModules

Some modules for Turing (Programming language).
Turing
2
star
47

atom-a-package-loader

Load slow loading atom packages in the background.
CoffeeScript
2
star
48

kwin-script-sticky-window-snapping-orig

Fork of Flupp/sticky-window-snapping. Video Preview =>
JavaScript
2
star
49

xShade

Random functions as a Bukkit Plugin
Java
1
star
50

plasma-applet-dailyforecast

QML
1
star
51

plasma-applet-bugzilla

QML
1
star
52

aurorae-localmenu

C++
1
star
53

plasma-lookandfeel-alphablack

JavaScript
1
star
54

CellWar

Event driven war plugin for Bukkit
Java
1
star
55

try_git

1
star
56

plasma-applet-terminalupdate

QML
1
star
57

quassel-utils

Misc utils for Quassel IRC
Python
1
star
58

plasma-applet-sidecalendar

QML
1
star
59

flask-examples

Examples for the flask micro framework.
Python
1
star
60

plasma-awc2

temp repo, will be deleted soon
C++
1
star
61

vminecraft-plugin

Home of the vMinecraft bukkit/hMod plugin and everything else I make
Java
1
star
62

yakuake-sodadark-thintitlebar

Shell
1
star
63

Questioner

A simple management of questions, and reactions to answers given.
Java
1
star
64

plasmoid-helloworldplugin

C++
1
star