Coder Social home page Coder Social logo

uosc's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

uosc's Issues

Unable to bring up widgets after seeking

When following the steps below uosc's widgets won't be shown as long as the cursor stays within the window. Moving the cursor outside the window resets the widget responsiveness.

Steps to reproduce:

  • Set autohide=yes and title=yes
  • Seek without using the uosc (e.g. arrow keys) and don't have a widget active
  • Move cursor to any widget location without leaving the window borders

Pause indicator

Display something when pausing/unpausing.

It's something I want but can see it being distracting for some, there should be a toggle.

Crash from cached ranges display

[uosc] 
[uosc] stack traceback:
[uosc]  [C]: in function 'format'
[uosc]  mp.assdraw:28: in function 'coord'
[uosc]  mp.assdraw:54: in function 'line_to'
[uosc]  mp.assdraw:74: in function 'rect_cw'
[uosc]  [string "/home/eva/.config/mpv/scripts/uosc.lua"]:1430: in function <[string "/home/eva/.config/mpv/scripts/uosc.lua"]:1370>
[uosc]  (...tail calls...)
[uosc]  [string "/home/eva/.config/mpv/scripts/uosc.lua"]:2052: in function 'cb'
[uosc]  mp.defaults:346: in function 'process_timers'
[uosc]  mp.defaults:515: in function 'dispatch_events'
[uosc]  mp.defaults:488: in function <mp.defaults:487>
[uosc]  [C]: in ?
[uosc]  [C]: in ?
[uosc] Lua error: mp.assdraw:28: bad argument #3 to 'format' (not a number in proper range)

https://github.com/darsain/uosc/blob/1cf60b1813c463384149ed2fb7b6da1cae1adad3/uosc.lua#L1427-L1430

I believe this happens when a video is cached beyond the end perceived by mpv e.g. videos with mistagged duration in container info.

Disable w/s bindings for menu navigation

Hitting the same key that was bound to uosc/subtitles twice selects the next entry in the list instead of closing it.

Audio, video, chapter, and playlist menus toggle (which I also find more intuitive).

I use s to open the subtitle menu, but because w/s are bound to navigate in the list, I can't hit s again to close the menu or open it while anothr menu is open. Can I disable the default bindings for w/s navigation?

"uosc/delete-file-quit" fails to delete file

In my setup, the command merely quits the file; it doesn't delete it. Anyone having the same issue?

SHIFT+DEL   script-binding uosc/delete-file-quit

Tested on:

  • Windows 7
  • mpv 20200510-git-4e94b21

Increase title (bar) size

In relation to #15, since I don't need window controls but want to see the title, I would like to increase its font size so I can read it better, especially in fullscreen mode.

Crash when using ab loop (playing livestream)

When I'm watching a live stream with streamlink and I press "l" to create the ab loop it crashes the UI.

[  32.652][d][cplayer] Run command: ab-loop, flags=73, args=[]
[  32.652][v][cplayer] Set property: ab-loop-a -> 1
[  32.658][w][uosc] 
[  32.658][w][uosc] stack traceback:
[  32.658][w][uosc] 	[string "C:/ProgramData/chocolatey/lib/mpv.install/too..."]:1576: in function 'maybe'
[  32.658][w][uosc] 	[string "C:/ProgramData/chocolatey/lib/mpv.install/too..."]:2129: in function 'cb'
[  32.658][w][uosc] 	mp.defaults:351: in function 'process_timers'
[  32.658][w][uosc] 	mp.defaults:520: in function 'dispatch_events'
[  32.658][w][uosc] 	mp.defaults:493: in function <mp.defaults:492>
[  32.658][w][uosc] 	[C]: at 0x00a92de0
[  32.658][w][uosc] 	[C]: at 0x00a917f0
[  32.658][f][uosc] Lua error: [string "C:/ProgramData/chocolatey/lib/mpv.install/too..."]:1576: bad argument #1 to 'ipairs' (table expected, got nil)
[  32.658][d][uosc] Exiting...

Small request: Shift+mouseclick in menu - keep UI open

Hi Darsain!

Again, awesome UI, been working on it constantly it feels like for days now. Love it!
Would it be possible to add something like if you shift click an item in the menu it triggers that action but doesn't close the UI?
Would really help when you want to compare shaders and other settings to not lose the UI and being able to swap back and forth quickly.

Btw, spoke to the mpv thumbnail creator and he didn't answer, so i guess no luck on getting that working sadly.

Anyway, cheers!

Add playlist rearrangment shortcuts

I don't think I'll ever be so masochistic to implement drag & drop, but adding shortcuts to arrange playlist should be easy. No time for it now though, so making this issue as a non-critical to-do.

Hide UI when cursor is autohidden

So I wanted to implement this, but I can't find any event or other hook that would notify me when mpv hides the cursor hovering the video due to inactivity.

If anyone knows about an event like that, please let me know.

I think it would also be possible to get cursor autohide timing setting, and set up a timer with this value on last mouse_move event, but this feels too dirty, and would require canceling/restarting timer on every mouse_move. I really don't like this and will leave it as a last resort option.

Menu with extra symbol at the end of the text

Menu

More of a compatibility issue than an actual error:

After some digging, apparently my input.conf has Windows format EOL (CRLF) instead of the Linux EOL (LF).

After converting my file to Linux EOL, all menu titles can display correctly.

Add menu for editions

Editions are a seldomly used feature in Matroska files, since they require ordered chapters โ€“ an almost unknown magic โ€“, but they exist.

Definitely not a priority for me, as I can easily cycle editions with a native mpv binding (which happens very rarely), but for the sake of completeness I thought I should mention this.

Title bar appears when opening a file and doesn't go away until I move the mouse

The title bar of uosc appears when I open a file in any file browser/from terminal and doesn't go away until I move my mouse. It doesn't matter where my mouse is when I start video playback, it still appears until I move my mouse. Is there anyway to make it so that it doesn't appear when I load a file and only triggers on mouse over?

I'm on linux.

Below is everything from my uosc.conf relating to the top bar. I have border=no in my mpv.conf.

top_bar=no-border
top_bar_size=60
top_bar_size_fullscreen=66
top_bar_persistency=
top_bar_controls=no
top_bar_title=yes

Show title without window controls

I run mpv on i3 in floating mode and window decorations disabled (by i3) and I need mpv's borders. I don't have a need for the window controls, since I use a key binding to close windows and the other two buttons do nothing, but I would like to see the title of the video when hovering the top area. This doesn't seem to be possible at the moment.

TL;DR show title with border but no window controls

Is it possible to set the activation area for the time bar

sorry for my poor english

In the new version, the time bar and search bar have been merged. I must only activate the time bar when I fast forward

In the old version, I can fast forward by clicking the mouse when the display time bar is not activated by setting

In the old version, my configuration file can be written like this

seekbar_size=100
seekbar_size_fullscreen=200
seekbar_opacity=0
seekbar_chapters=
seekbar_chapters_opacity=0.8

progressbar_size=1.5
progressbar_size_fullscreen=3
progressbar_opacity=1
progressbar_chapters=lines-bottom
progressbar_chapters_opacity=1

Show current chapter

I've had the desire to know the title of the current chapter for a while now, but I never figured out a good solution to that. In the past, I used the stats rendering (i), but that is hard to parse at a glance. Now I use the uosc's chapters menu, which is a significant improvement, but maybe it would make sense to add the current chapter to the title display?

I could see the media title and the chapter name be separated by a sequence like | or a newline, depending on how #15 develops, i.e. whether showing a multi-line title could even be considered. If not, there is the question of whether the separator is clear enough from a UX perspective or whether it could have been part of the title as well.

Ambiguous tracks in audio track selection

Different audio tracks can become indistinguishable in files with multiple audio tracks of the same language. Often, those tracks contain different formats, channel layouts or sample rates which could be displayed in addition to the language of the track.

An example of this being implemented in the track selection in mpv.net:
example

This would make track selection much easier (in certain cases).

Incompatibility with Syncplay's chat feature

Syncplay is a media playback synchronization program, you can use mpv with it. They have a chat feature, allowing you to type and display messages directly in mpv's window, but it seems to break uosc rendering.

I use newest uosc, mpv build 0.32.0, syncplay 1.6.4a on Windows.

Steps to reproduce this bug:

  1. Install Syncplay, choose mpv as a player, enable chat input and/or output in settings.
  2. Open a video in a room, and display the UI by interacting with the player.
  3. The playback bar seems to be higher than it should be, and the volume bar parts from its frame.

Screenshot of the issue:
https://ptpimg.me/hvjnv1.png

The problem doesn't arise if chat output is turned off, and chat input is set to 'bottom' or 'middle' in Syncplay.
I don't know if this is an issue with how syncplay handles things, and if this is even fixable, but I cannot seem to find a workaround (the chat function is quite crucial to me), and I really like the uosc UI.

Allow thumbnail script and some tweaks

Hi,
love to UI, sleek and addictive to tinker with.
I see that you don't have a built in thumbnail script (and that's fine ofc!) but would it be possible to make it so that i.e https://github.com/marzzzello/mpv_thumbnail_script works in your UI? As it is now nothing shows but the thumbnail scripts works in the background and if i disable your UI the script has generated the thumbs and shows them as expected. Maybe an option in uosc.conf? Having a seekbar with thumbnail preview is really a must have for me at least.

Please add an option to not concatenate menu items (if possible). I have built a menu where i swap a lot of shaders around and i need an option to go back to default mpv settings in each sub menu. Have renamed copies of the identical shader files as of now to make it so that i get around this but and option to allow this would be golden.

Is there a way to run more then one command for one menu item? Since i have a lot of shaders for different uses, i would like to remove and append some of them when i use my #! Preset > Anime or #! Preset > Live Action. Ideally when i press my preset for Anime i would like to queue several glsl-shaders remove and a few glsl-shaders append to make it more dynamic.

Lastly, the dimming of the movie when i open up the menu, is there a way to disable that? If i swap filers, or change brightness its really hard to see the difference when the screen lights up again. It's a good looking feature but hopefully you can make it optional :)

That's all i can think of right now, awesome stuff man, am glad i stumbled across a link to your UI from r/mpv
//Martin

frame-step still flashes icon under certain conditions

On the latest version, frame-step can cause the pause/play icon to flash, if you hold down the corresponding shortcut for a long enough period. As you hold it down, the 'play' icon will eventually flash. Once you let it go, the 'pause' icon will then flash.
Is this intended behavior?
Strangely, this does not happen with frame-step-back.
Also, on certain short videos, frame-step will flash the pause/play icon even if you simply tap on the key once. (I can provide the video, if you want to investigate it further. But I believe these two issues are probably intertwined.)

Crash in large playlist menus

Reproduction steps:

  • Open a playlist with enough items to enable scrolling
  • Scroll down a bit
  • Drag & drop a new file onto mpv
  • Close out of the menu with the mouse by clicking blank space in the (now empty, regardless of actual state) playlist

Logs:

[uosc] 
[uosc] stack traceback:
[uosc]  [string "/home/eva/.config/mpv/scripts/uosc.lua"]:1038: in function 'open_selected_item'
[uosc]  [string "/home/eva/.config/mpv/scripts/uosc.lua"]:1054: in function <[string "/home/eva/.config/mpv/scripts/uosc.lua"]:1051>
[uosc]  (...tail calls...)
[uosc]  [string "/home/eva/.config/mpv/scripts/uosc.lua"]:2658: in function 'dispatch_event_to_elements'
[uosc]  [string "/home/eva/.config/mpv/scripts/uosc.lua"]:2663: in function 'cb_down'
[uosc]  mp.defaults:103: in function 'fn'
[uosc]  mp.defaults:60: in function 'handler'
[uosc]  mp.defaults:365: in function 'handler'
[uosc]  mp.defaults:495: in function 'call_event_handlers'
[uosc]  mp.defaults:529: in function 'dispatch_events'
[uosc]  mp.defaults:488: in function <mp.defaults:487>
[uosc]  [C]: in ?
[uosc]  [C]: in ?
[uosc] Lua error: [string "/home/eva/.config/mpv/scripts/uosc.lua"]:1038: attempt to index local 'item' (a nil value)

This is the line in question
https://github.com/darsain/uosc/blob/d8e31af78c7dd5ba400623fef608637304d5a5a3/uosc.lua#L1035

Exception on startup 'bad argument to format'

Used to work until yesterday, but since then I get this traceback on startup:

      uosc:
      uosc: stack traceback:
      uosc: 	[C]: in function 'format'
      uosc: 	mp.assdraw:28: in function 'coord'
      uosc: 	mp.assdraw:54: in function 'line_to'
      uosc: 	mp.assdraw:74: in function 'rect_cw'
      uosc: 	/home/fichte/.config/mpv/scripts/uosc.lua:1264: in function </home/fichte/.config/mpv/scripts/uosc.lua:1177>
      uosc: 	(...tail calls...)
      uosc: 	/home/fichte/.config/mpv/scripts/uosc.lua:1751: in function 'cb'
      uosc: 	mp.defaults:346: in function 'process_timers'
      uosc: 	mp.defaults:506: in function 'dispatch_events'
      uosc: 	mp.defaults:479: in function <mp.defaults:478>
      uosc: 	[C]: in ?
      uosc: 	[C]: in ?
      uosc: Lua error: mp.assdraw:28: bad argument #3 to 'format' (not a number in proper range)

mpv 0.32, Arch Linux, no uosc.conf

Is there a way to modify the response area?

Like the script progressbar.lua

The first setting hover-zone-height= in torque-progressbar.conf
can modify the response area.

It allows me to adjust a large area above the progress bar.

Then I can set the progress height to 5 or smaller and it doesn't affect my operation.

Just like in the picture, click on the mouse location to adjust the progress.
Although not what you see is what you get.
1

How to add windows minimize and close animation?

Is it possible to add windows minimize and close animation to this osc?
I love this osc but I am a little bit not used to the top_bar.
When I click on closing or minimizing the window, it has no animation, while the original mpv's osc has it.
So I wonder if the animation can be added or not.

some small suggestions

Hi!

Again awesome work man! Using it everyday :)

  1. When you are in a sub menu, and you want to change to another submenu that's in another option. Please make it so that you can go directly there just by pressing the link in the main menu. Right now when you do that, you get back to the main menu as expected but you have to click again on the option that you wanted to visit. Just smoother this way , can make it an option perhaps?

  2. When you click an item in the menu, if that sub menu has like 2 options, wouldn't it be easier if those pops out to the right at the height of where the mouse cursor already is?

  3. Would it be possible to show the value you already have licked on and is active? Say i have options for something and i have just enabled that. I get back again to the menu and would be nice to "see" that its active. Might be a stretch but would be nice.

Cheers!

mpvnet compability

hi I am using mpvnet and your script doesn't seem to be working with it. I already followed the instructions oh the read.md but nothing.

Prefix remaining time with a minus sign

Currently, the remaining time is rendered exactly like the elapsed time: with a positive duration. To prevent ambiguity with a rendering of "total time" (which uosc doesn't do, atm, but can be seen in other video players), I suggest prepending a minus sign to the remaining time to make this clearer.

PS: "Sorry" for opening so many issues, but I wanted to defer my feature requests to a point after which I have used this tool for a longer time to better evaluate it. And while some are related, they are should still be considered separately.
Thanks for the cool script.

Installation instructions are too short

In your README you write that the file uosc.lua has to be copied into the scripts folder. I do not have such a folder. "man lua" does not mention it either.

I think this is an end user program, and end users tend not to know anything about lua (like me). So the description should be mor comprehensive.

Follow the "--title" option

With border=no in mpv.conf it seems that uosc won't change it's window title according to --title= config.

Show playlist index and size indicator

I would like to see the playlist index and the size of the playlist in front of the video title in the top bar, but only if there are 2 or more items in the playlist.

Option to behave as normal osc without proximity

While the proximity is functioning properly and I did not encounter issues with it,
I would like to have the option that all elements appear on mouse movement, exactly as the normal OSC.
So it would behave like the normal OSC but with the advantages of uosc.

Command to flash pause indicator

Similar to flash-timeline, flash-volume, and flash-speed.
I would like to only display the pause indicator when pressing specific keys.

Extremely sluggish when using fullscreen, 3840x2160, 23.976 Hz

Strange but very annoying issue:

When playing a UHD video on a monitor with 3840x2160 resolution and low refresh rate (e.g.23.976 Hz or 24 Hz), the UOSC interface becomes extremely sluggish and even faulty, when the player is in full screen mode! When I move the mouse near an element, it sometimes takes several seconds until it appears! If I keep moving the mouse, the element won't appear at all! Also, fading out stutters extremely (meaning it fades a bit, stops fading for a second or two, fades some more, stops again, etc.) and sometimes object don't even fade out completely but stay visible forever.

When exiting full screen and running the video in a window that covers the whole screen, it works perfectly fine! So it can't be a performance issue (CPU is at 1%, GPU at 30% during playback).

Also, when I set the monitor to 60 Hz and play the same video, the interface runs perfectly smooth! This seems so strange because at 60 Hz, the system load should be even higher.

So why does UOSC not work correctly in low screen refresh rates? When both the video and the screen run at 24 Hz, it should even work smoother than if the rates mismatch...

Thanks!

Add a simple window border

An option to add a simple border overlay of customizable thickness and color around the window when no-border is detected in mpv.

Update chapter menu dynamically as playback progresses

The playlist menu updates itself when a new file is being placed (or the playlist is modified through adding items, although it does not resize). It would be neat if one could leave the chapter menu open and it would update the selected item automatically as the playback recahes the next chapter.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.