uosc
Feature-rich minimalist proximity-based UI for MPV player.
Most notable features:
- UI elements hide and show based on their proximity to cursor instead of every time mouse moves. This gives you 100% control over when you see the UI and when you don't. Click on the preview above to see it in action.
- Set min timeline size to make an always visible discrete progress bar.
- Build your own context menu with nesting support by editing your `input.conf` file.
- Configurable controls bar.
- Fast and efficient thumbnails with [thumbfast](https://github.com/po5/thumbfast) integration.
- UIs for:
- Loading external subtitles.
- Selecting subtitle/audio/video track.
- Selecting stream quality.
- Quick directory and playlist navigation.
- Mouse scroll wheel does multiple things depending on what is the cursor hovering over:
- Timeline: seek by `timeline_step` seconds per scroll.
- Volume bar: change volume by `volume_step` per scroll.
- Speed bar: change speed by `speed_step` per scroll.
- Just hovering video with no UI widget below cursor: your configured wheel bindings from `input.conf`.
- Transform chapters into timeline ranges (the red portion of the timeline in the preview).
- And a lot of useful options and commands to bind keys to.
[Changelog](https://github.com/tomasklaen/uosc/releases).
## Download
- [`uosc.zip`](https://github.com/tomasklaen/uosc/releases/latest/download/uosc.zip) - main archive with script and its requirements
- [`uosc.conf`](https://github.com/tomasklaen/uosc/releases/latest/download/uosc.conf) - configuration file with default values and documentation
## Installation
1. Extract `uosc.zip` into your mpv config directory.
_List of all the possible places where it can be located is documented here: https://mpv.io/manual/master/#files_
On Linux and macOS these terminal commands can be used to install or update uosc and thumbfast (if wget and unzip are installed):
```sh
mkdir -pv ~/.config/mpv/script-opts/
rm -rf ~/.config/mpv/scripts/uosc_shared
wget -P /tmp/ https://github.com/tomasklaen/uosc/releases/latest/download/uosc.zip
unzip -od ~/.config/mpv/ /tmp/uosc.zip
rm -fv /tmp/uosc.zip
wget -NP ~/.config/mpv/scripts/ https://raw.githubusercontent.com/po5/thumbfast/master/thumbfast.lua
```
2. **uosc** is a replacement for the built in osc, so that has to be disabled first.
In your `mpv.conf` (file that should already exist in your mpv directory, if not, create it):
```config
# required so that the 2 UIs don't fight each other
osc=no
# uosc provides its own seeking/volume indicators, so you also don't need this
osd-bar=no
# uosc will draw its own window controls if you disable window border
border=no
```
3. To configure **uosc**, create a `script-opts/uosc.conf` file, or download `uosc.conf` with all default values from the link above, and save into `script-opts/` folder.
4. **OPTIONAL**: To have thumbnails in timeline, install [thumbfast](https://github.com/po5/thumbfast). That's it, no other step necessary, **uosc** integrates with it seamlessly.
5. **OPTIONAL**: If the UI feels sluggish/slow while playing video, you can remedy this a lot by placing this in your `mpv.conf`:
```config
video-sync=display-resample
```
Though this does come at the cost of a little bit higher CPU/GPU load.
#### What is going on?
**uosc** places performance as one of its top priorities, so how can the UI feel slow? Well, it really isn't, **uosc** is **fast**, it just doesn't feel like it because when video is playing, the UI rendering frequency is chained to its frame rate, so unless you are the type of person that can't see above 24fps, it _will_ feel slow, unless you tell mpv to resample the video framerate to match your display. This is mpv limitation, and not much we can do about it on our side.
## Options
All of the available **uosc** options with their default values and documentation are in the provided `uosc.conf` file.
To change the font, **uosc** respects the mpv's `osd-font` configuration.
## Navigation
These bindings are active when any **uosc** menu is open (main menu, playlist, load/select subtitles,...):
- `up`, `down` - select previous/next item
- `left`, `right` - back to parent menu or close, activate item
- `enter` - activate item
- `esc` - close menu
- `wheel_up`, `wheel_down` - scroll menu
- `pgup`, `pgdwn`, `home`, `end` - self explanatory
- `ctrl+up/down` - move selected item in menus that support it (playlist)
- `del` - delete selected item in menus that support it (playlist)
- `shift+enter`, `shift+right` - activate item without closing the menu
- `ctrl+enter`, `ctrl+click` - force activate an item, even if it's a submenu. In practical terms: activates a directory instead of navigation to its contents.
Click on a faded parent menu to go back to it.
## Commands
**uosc** provides various commands with useful features to bind your preferred keys to. These are all unbound by default.
To add a keybind to one of this commands, open your `input.conf` file and add one on a new line. The command syntax is `script-binding uosc/{command-name}`.
Example to bind the `tab` key to peek timeline:
```
tab script-binding uosc/toggle-ui
```
Available commands:
#### `toggle-ui`
Makes the whole UI visible until you call this command again. Useful for peeking remaining time and such while watching.
There's also a `toggle-elements