mpv icon indicating copy to clipboard operation
mpv copied to clipboard

osc: show time remaining on tooltip as well

Open CounterPillow opened this issue 5 years ago • 4 comments

If a user chooses to see the remaining time instead of total time by clicking on the timestamp on the right of the seekbar, also show the remaining time as an additional piece of information in the seekbar hover tooltip.

The rationale for this is that remaining time is affected by changes in playback speed, which means it's useful for e.g. knowing when a break is in a lecture recording you're watching at 1.33 speed without doing a bunch of math in your head.

If the remaining time mode isn't enabled, the seekbar still behaves as usual.

Additional background: due to certain global events right now, I am spending a lot of time watching lecture recordings at home at >1.0 speeds. Because of general boredom, this leads me to frequently check how much of the lecture is left, and as the video doesn't cut off precisely when the lecture ends but usually later, I've become unreasonably good at dividing things by 4 and multiplying them by 3 in my head. Sadly, this is not on the curriculum, so my newly acquired skill is more of a distraction to myself than a genuine asset. Hopefully this change allows me to stop doing this calculation every 5 minutes as I contemplate when to get my next IV administered one litre bag of coffee.

CounterPillow avatar Oct 01 '20 12:10 CounterPillow

I don't think this PR shows the number you want it to show. See this as an example, both with --speed=1.0 (default). It appears that you're printing the "time remaining" on the seekbar as relative to the current playback position, and not relative to playback end position.

Forward from cursor Backward from cursor

Mouse is not shown in both screenshots, but you can figure out where it is by where the tooltip is rendered.

Traneptora avatar Oct 02 '20 12:10 Traneptora

That's the intended behaviour. The question I was asking myself is "how long until this point in the video?"

CounterPillow avatar Oct 02 '20 14:10 CounterPillow

Ah, I see, in that case it appears to be working as intended, although I'm guessing many users might be confused by the intention. Most people seeing a negative number on the seekbar will assume that's until end of file from the position on the seekbar, not until the seekbar position from the current playback time.

Traneptora avatar Oct 03 '20 00:10 Traneptora

Please rebase

kasper93 avatar May 05 '24 13:05 kasper93