po5 / evafast

mpv script for hybrid fastforward and seeking
41 stars 1 forks source link

[rewrite branch] Playback speed get stuck at some point and cannot be changed until closing mpv #9

Closed xfzv closed 1 year ago

xfzv commented 1 year ago

I'm using the rewrite branch with latest commit (https://github.com/po5/evafast/commit/e0e50d7eb05d741983d31f5defdc0ffa6d1f3755).

To reproduce (it can take a few tries, at least for me):

  1. Play a file
  2. Keep pressing RIGHT to trigger the script and release RIGHT
  3. At some point, after returning to original playback speed, try to adjust the playback speed manually (add speed) : the playback speed is stuck forever

Here's a video showing the issue. I set playback speed to x1.6, then trigger evafast so that playback speed reaches x3.5 (my speed_cap value), and release RIGHT. The speed gradually goes back to x1.6 and when I try to adjust it with my keybindings (add speed), the playback speed is stuck to x1.6 until I close mpv:

https://user-images.githubusercontent.com/78810647/212137942-29955cda-6959-412c-ae00-5028bcbd1dda.mp4

po5 commented 1 year ago

Options:
speed_increase=0.1
speed_decrease=0.1
speed_interval=0.05
speed_cap=3.5

Attempt to reproduce:
file with no subtitles
set speed 1.6
hold hybrid key until we reach 3.5
wait until we reach 1.6
add speed 0.05

Works fine here.

xfzv commented 1 year ago

Hmm, that's strange. I've just tried again with a minimal mpv config and could reproduce, although I can't seem to find a consistent pattern to do so. It eventually occurs after adjusting speed and pressing RIGHT a couple of times.

Here, playback speed get stuck at x1.00 when doing a regular seek with RIGHT:

https://user-images.githubusercontent.com/78810647/212471162-160ae26d-c228-4b2b-a6d5-d264e089642a.mp4

- add speed -0.05
+ add speed 0.05
bs set speed 1
# How far to jump on press
seek_distance=5

# Playback speed modifier, applied once every speed_interval until cap is reached
speed_increase=0.1
speed_decrease=0.1

# At what interval to apply speed modifiers
speed_interval=0.05

# Playback speed cap
speed_cap=3.5

# Playback speed cap when subtitles are displayed, 'no' for same as speed_cap
subs_speed_cap=1.6

# Multiply current speed by modifier before adjustment (exponential speedup)
# Use much lower values than default e.g. speed_increase=0.05, speed_decrease=0.025
multiply_modifier=no

# Show current speed on the osd (or flash speed if using uosc)
show_speed=yes

# Show current speed on the osd when toggled (or flash speed if using uosc)
show_speed_toggled=yes

# Show seek actions on the osd (or flash timeline if using uosc)
show_seek=no

# Look ahead for smoother transition when subs_speed_cap is set
lookahead=yes
xfzv commented 1 year ago

Just to confirm that the issue is gone after switching to the master branch.

xfzv commented 1 year ago

:tada:

Seems to be fixed for good on my end. Thank you!