Feature-rich minimalist proximity-based UI for MPV player.
LGPL-2.1 License
MPV_UOSC_ZIGGY
environment variable (#814) (9a02a60684a8701c8d4dfaa902fca5496671e87c) @nicoorefine
option to improve features at a cost of some performance (#816) (0d7825a4ad8ffb317ec901aafff53f8e65c12aa4) @tomasklaenflash-progress
command (efd6a55b20a6676c847a78f35a2595baa44fe003) @tomasklaenshow-in-directory
issue opening paths containing a comma (win) (#800) (78061a7dc6c366bfb28370f9299041fd0811762e) @Sneakpeakcsstoggle-ui
not hiding elements when border=yes
(bc9d20cb1ab535d79dd43f7c5d73040a81241d45) @tomasklaenkeybindings
and download-subtitles
menus were not using palette
search style (777ed2bb40d7d3b85877702ad0aacea63fc3e4e5) @tomasklaenFull Changelog: https://github.com/tomasklaen/uosc/compare/5.1.1...5.2.0
No changes have been made, only removed upx compression from binaries to silence false positive antivirus detection.
There are still some obscure antiviruses that find our binaries suspicious due to the way go packages them. I think the only way to solve that would be to sign them (not 100% sure though), but I'm not paying to work on free stuff. If anyone is bothered by this, and would be willing to donate a code signing certificate, let me know.
If you want to check the binaries are safe, the code is in src/ziggy
, and you can build them yourself by running tools/build ziggy
and compare.
Published by tomasklaen 12 months ago
Available under the Download option in subtitles
menu or with a direct download-subtitles
command is a new menu for downloading subtitles for current file.
The service we use is Open Subtitles, which has a 5 downloads per day limit for unauthenticated IPs. Authentication bumps this to 10, which is not much of a difference and adds a lot of hassles, so it's not implemented at this time. If you need to download more than 5 subs per day, you should probably just deal with it in the browser beforehand so you don't have to fiddle with the menu every time a new file starts.
Implementation will hash the current file and send the hash to Open Subtitles so you can search even with empty query and if your file is known, you'll get subtitles exactly for it.
Subtitles will be downloaded to the same directory as currently opened file, or ~~/subtitles
(folder in your mpv config directory) if playing a URL.
Default border radius and menu padding was bumped a bit to better fit/match styles of environments uosc usually finds itself in (windows, gnome, macos,...). To revert it back where it was before, set this in your uosc.conf
:
menu_padding=2
border_radius=2
The release size is now ~6 MB. This is because we are limited in what we can do in mpv's lua scripting environment, and to work around this, we now include a small binary tool (one for each platform), that we call to handle stuff we can't do in lua. Currently this means searching & downloading subtitles, accessing clipboard data, and in future might improve self updating, and potentially other things.
Other scripts usually choose to go the route of adding python scripts and requiring users to install the runtime. I don't like this as I want the installation process to be as seamless and as painless as possible. I also don't want to contribute to potential python version mismatch issues, because one tool depends on 2.7, other latest 3, and this one 3.9 only and no newer (real world scenario that happened to me), now have fun reconciling this. Depending on external runtimes can be a mess, and shipping a stable, tiny, and fast binary that users don't even have to know about is imo more preferable than having unstable external dependencies and additional installation steps that force everyone to install and manage hundreds of megabytes big runtimes in global PATH.
And the reason we don't split the release into uosc-{platform}.zip
that only includes binaries for the concerned platform is that then you wouldn't be able to sync your mpv config between platforms and everything just work. And the binaries are small, this is not a problem.
play-pause
control shorthand (1f26c3ec23208a2498d469d3de861c27fcb9407f) @tomasklaenmenu_padding
option (e5a16032636c8be2e8db8707535613bb73182e77) @tomasklaenpalette
option with search_style
(13eb2dc137873e15f3ce8a32527bf3963a7d2ce3) @tomasklaencontrols
to configurable opacity
properties (bd068c9cd09d6505e32098402329932a05f8c81c) @tomasklaenplaylist_position
to configurable opacity
properties (9c087efbb5a2225362f174306673573fb96859ab) @tomasklaendelete-file-prev
not working as intended (#726) (d49f385f7dd89d23f4b008405cea579238f40678) @christoph-heinrichctrl+backspace
pressed while input is empty (55789e1d325d53e5792195514cc998cb0ac66055) @tomasklaenmanual
pause indicator initializes as static
when launched with --pause
(16f61eb497f4f0fc3f0bd3a780630d111db6a45b) @tomasklaendist
directory (c173641ea54e22168b4013a0395b02519434725d) @tomasklaenborder_radius
from 2
to 4
(18e81c27f4cbf0fa7e4f730c8cc1c38e51d53d85) @tomasklaenFull Changelog: https://github.com/tomasklaen/uosc/compare/5.0.0...5.1.0
Published by tomasklaen about 1 year ago
5.0 comes with some breaking changes.
Our directory structure has changed. If you're updating manually, you should delete uosc_shared
and uosc.lua
in your scripts
folder before installing 5.0, which is only a single uosc
folder now.
Alternatively, you can use one of the new install commands in readme, and it'll take care of that for you.
A lot of config options have been added, changed, or removed and replaced with new ones that are more compact and provide more customization (color
, opacity
, ...).
I recommend just downloading the new uosc.conf
file and reconfiguring it again.
All menus in uosc are now searchable. Just start typing!
Though this disables the ability to toggle the menu with the same key, if the key is just a single letter. You can disable menu_type_to_search
option, and use ctrl+f
or /
to search instead.
For script developers: menu API now includes search related options, as well as on_search
callbacks for you to implement searching on your end.
A new command uosc/keybinds
now displays a command palette of all active key bindings. You can search through it to find commands/shortcuts, and what shortcut/commands they're bound to, and of course call it.
A new command uosc/update
, which will make uosc re-install itself to update.
It's a bit tricky to make this work, and as a result doesn't work in all environments. See update
command documentation for details.
When defining your own menus in input.conf
, there's now a new syntax for adding un-selectable titles and separators:
# #! Section > Title
# #! Section > ---
Localization has been added for: de
, es
, fr
, ro
, ru
, zh-hans
. Though not all are up to date.
To control which language you want to see we detect mpv's slang
config, but you can configure it with a more fine grained priority list with uosc's languages
option. See more in default uosc.conf
file.
Added idle and audio indicators (graphics/text in the middle of screen). All can be disabled with the new disable_elements
option.
Resetting by clicking on speed has been moved from primary to secondary click. This is to match the same behavior now also available on volume.
You can now control stuff like animation length (including disabling animations) and border radius with animation_duration
and border_radius
options.
Fixed touch input event handling.
If you're using uosc's API for creating menus for your scripts, there have been some changes. Your stuff still works, just a bit differently, and might need adjustments. Mainly:
get-version
to detect uosc. This message is gone. uosc now instead sends a global uosc-version <version>
message as the first thing while initializing, which you're probably already listening for. In practice, all you should need to do is just remove get-version
call from your script.menu-open
and menu-update
was removed (menu-open
would toggle, menu-update
would open if not already), and there's now menu-close
command. To know when you should call close or update, you can check mp.get_property_native('user-data/uosc/menu/type')
to see if any menu and of what type is currently open, with a fallback of uosc-menu-type
property on mp.get_property_native('shared-script-properties')
for older mpv versions.add-intl-directory
APi for scripts to extend localization @tomasklaenselectable
and align
options @tomasklaentop_bar_flash_on
option @tomasklaenshow_hidden_files
option @tomasklaensearch_submenus
prop to menus (#655) @tomasklaenwindowed
and fullscreen
added to available element persistency states @tomasklaeninputs
command to display a palette menu with all active keybindings (#665) @tomasklaenborder_radius
option @tomasklaenanimation_factor
option to control animation speed @tomasklaeninput.conf
(#681) @tomasklaenanimation_factor
option to animation_duration
@tomasklaendisable_elements
option and disable-elements
script message (#695) @tomasklaenctrl
to alt
@tomasklaenupdate
command to update uosc (#700) @tomasklaenget-version
in favor of early uosc-version
broadcast (#714) @christoph-heinrichinputs
command to keybinds
@tomasklaenescape
and backspace
behavior in menus (#719) @tomasklaenen
locale not working (#526) @natural-harmonia-gropiusinput.conf
@tomasklaenadd-intl-directory
API @tomasklaenmp.get_script_directory()
instead of relative paths @tomasklaenXDG_CONFIG_HOME
(#595) @evantjprev
commands now play previously played file even when shuffle is enabled @tomasklaentitle-bar
state of mpv (#643) @dyphiresearch_suggestion
submitting externally handled searches @tomasklaencue
to audio types (#662) @xfzvsbv
to subtitle types (#663) @dyphiresearch_submenus
inheritance, missing docs, and ass_safe_title
cache not clearing @tomasklaenuser-data/uosc/menu/type
backwards compatibility, and being nil means closed (#673) @christoph-heinrichinput.conf
was empty @tomasklaendelete-file-prev
command @tomasklaenitable_has
for text wrapping (#646) @christoph-heinrichcomma_split
where appropriate @tomasklaenpaused
from default timeline_persistency
@tomasklaenFull Changelog: https://github.com/tomasklaen/uosc/compare/4.7.0...5.0.0
Published by tomasklaen over 1 year ago
osd-margin-*
(#499) @christoph-heinrich
This should push other osd things like console out of persistent uosc elements.
ac3
to audio types (#468) @xfzvimage
disposition returning false positives @tomasklaenshow-submenu
message @tomasklaenThis was causing event binding spam in verbose logging.
autohide
un-registering cursor events when menu is open @tomasklaenautohide
timer @tomasklaenautohide
related tweaks and fixes @tomasklaenFull Changelog: https://github.com/tomasklaen/uosc/compare/4.6.0...4.7.0
Published by tomasklaen over 1 year ago
use_trash
option (#394) @dyphiredestination_time
option and deprecated total_time
(#399) @Michaelshow-submenu-blurred
message listener @tomasklaen00:
from timestamps in durations shorter than an hour @tomasklaenmedia_types
option into video_types
, audio_types
, and image_types
@tomasklaenautoload_types
option @tomasklaenctrl+enter
in file menus will load selected directory @tomasklaenctrl+click
in file menus behave just like ctrl+enter
does @tomasklaenon_close
command to menu API (#449) @christoph-heinrichdts
to media_types
(#398) @xfzvmouse-pos
can be nil (#418) @christoph-heinrichFull Changelog: https://github.com/tomasklaen/uosc/compare/4.5.0...4.6.0
Published by tomasklaen almost 2 years ago
text_width()
ignoring global font_bold
option @tomasklaenopen-config-directory
not opening correct folder on windows @tomasklaenFull Changelog: https://github.com/tomasklaen/uosc/compare/4.4.0...4.5.0
Published by tomasklaen almost 2 years ago
set-min-visibility
message listener @tomasklaentimeline_cache
option to disable cache indicators @tomasklaenspinner
icon for menus @tomasklaenass_safe_title
(#328) @christoph-heinrichControls
on Timeline.enabled
changes @tomasklaenFull Changelog: https://github.com/tomasklaen/uosc/compare/4.3.0...4.4.0
Published by tomasklaen about 2 years ago
flash-ui
binding and flash-elements
message @tomasklaenclick_threshold
and click_command
options @tomasklaen
This deprecates
pause_on_click_shorter_than
option!
external
hint for tracklist menu (#289) @dyphiretoggle
and cycle
controls work with external properties @tomasklaen@
in control badge props from prefix to suffix for consistency @tomasklaenosd-align-*
properties messing up the UI (#286) @hooke007font_bold
was enabled @tomasklaenfont_bold=yes
@tomasklaenclick_threshold
descrition and top bar subtitle offset @tomasklaenshuffle
control and option descriptions @tomasklaenFull Changelog: https://github.com/tomasklaen/uosc/compare/4.2.0...4.3.0
Published by tomasklaen about 2 years ago
editions
menu, editions
control and has_many_editon
disposition (#277) @dyphireclosing
in ending chapter range patterns @tomasklaentoggle-elements <elements>
message @tomasklaentoggle-{element}
script bindings.osd-*
properties messing up the UI @tomasklaenFull Changelog: https://github.com/tomasklaen/uosc/compare/4.1.0...4.2.0
Published by tomasklaen about 2 years ago
idle
disposition (#271) @dyphire*_persistency
support idle
(#274) @hooke007Full Changelog: https://github.com/tomasklaen/uosc/compare/4.0.1...4.1.0
Published by tomasklaen about 2 years ago
Full Changelog: https://github.com/tomasklaen/uosc/compare/4.0.0...4.0.1
Published by tomasklaen about 2 years ago
A huge update that brings controls bar, thumbnails, textures, UI polish, and tons of other features!
uosc now requires multiple files to be installed, so grab the uosc.zip
archive below with all of the requirements instead of just downloading the script from repository.
It's also a good idea to re-download the default config file and reconfigure your uosc. A lot has changed.
Note: to get thumbnails, you need to install thumbfast.
show-menu
message handler @tomasklaenget-version
message handler @tomasklaenshow-menu
api @tomasklaenaudio-device
command (#140) @hooke007size_min
is bigger than 0
@tomasklaenosc-margins
shared-script-property (#166) @christoph-heinrichcontrols
bar @tomasklaenupdate-menu
API @tomasklaen*_font_scale
options into one font_scale
@tomasklaentext_border
option @tomasklaenhas_sub
and has_chapter
dispositions (#207) @dyphiretimeline_chapters
option into timeline_chapters_opacity
@tomasklaenitems
, load-audio
, load-video
commands @tomasklaenpeek-{x}
commands to toggle-{x}
@tomasklaenhas_many_*
disposition types @tomasklaenchapter_ranges
serialization @tomasklaentop_bar_title_opacity
option @tomasklaenshuffle
and autoload
options @tomasklaenmenu-blurred
command @tomasklaenbuffered_time_threshold
option @tomasklaenchapter_range_patterns
option @tomasklaenactive
and selected_index
menu API @tomasklaencolor_
prefixes from options @tomasklaenFull Changelog: https://github.com/tomasklaen/uosc/compare/3.1.2...4.0.0
Published by tomasklaen about 2 years ago
With this, setting
osc=no
inmpv.conf
is theoretically not needed anymore, but just to be safe we are going to keep it as a recommended installation step.
Full Changelog: https://github.com/tomasklaen/uosc/compare/3.1.1...3.1.2
Published by tomasklaen about 2 years ago
R script-message-to uosc show-submenu "Utils > Aspect ratio"
time_precision
option @tomasklaen
Use to display sub second precision in timeline timestamps. For example, setting to
2
will produce00:00:00.42
.
If there is no context menu defined in
input.conf
and user callsuosc/menu
binding, there will now be a pre-configured menu with common actions.
Full Changelog: https://github.com/tomasklaen/uosc/compare/3.0.0...3.1.0
line
. Line is semantically and visually the most appropriate way to represent current time. Doing it with a bar was sub-optimal as it collides with chapter and cached ranges so there was just too many bars on top of each other, making it harder to tell what's going on.timeline_line_width=2
to control the width in windowed modetimeline_line_width_fullscreen=3
to control the width in fullscreen modetimeline_line_width_minimized_scale=10
to scale the line 10x when the timeline is minimized so the position is more visibletimeline_style=bar
.timeline_step
, speed_step
, and volume_step
. Set these values to negative to flip the direction. (#87) @christoph-heinrichspeed_step_is_factor=yes
(#108) @christoph-heinrichui_scale
option (#91) @christoph-heinrichdefault_directory=~/
option that controls the default location of open-file
menu when triggered without any open file, or when watching a stream# ignore #! Folder title >
(#101) @christoph-heinrichmenu_min_width=260
, menu_min_width_fullscreen=360
, and menu_parent_opacity=0.4
options (#115) @christoph-heinrichtimeline_chapters_width=6
option to control the width of each chapter display format (#119) @po5chapters
and chapters_opacity
options renamed to timeline_chapters
and timeline_chapters_opacity
Full Changelog: https://github.com/tomasklaen/uosc/compare/2.17.0...3.0.0
Added
default_directory
option - if there is no file open, this is the open-file menu directory that will be used. ~/
by default.Older change logs are available here: CHANGELOG.md