Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
xfzv opened this issue Jan 12, 2023 · 4 comments

Comments

@xfzv
Copy link

xfzv commented Jan 12, 2023

I'm using the rewrite branch with latest commit (e0e50d7).

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:

2.mp4
@po5
Copy link
Owner

po5 commented Jan 14, 2023

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
Copy link
Author

xfzv commented Jan 14, 2023

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:

2.mp4
  • tree ~/.config/mpv:
/home/xfzv/.config/mpv
├── input.conf
├── script-opts
│   └── evafast.conf
└── scripts
    └── evafast.lua
  • input.conf:
- add speed -0.05
+ add speed 0.05
bs set speed 1
  • evafast.conf:
# 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
Copy link
Author

xfzv commented Jan 17, 2023

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

@xfzv xfzv mentioned this issue Apr 22, 2023
20 tasks
christoph-heinrich added a commit to christoph-heinrich/evafast that referenced this issue Jul 26, 2023
math.floor() can result in one value being off by 1 because one
was just barely below the whole integer while the other one was not.
(floating point numbers \o/)
Adding 0.5 for actual rounding avoids that problem.

Closes po5#9
po5 pushed a commit that referenced this issue Jul 26, 2023
math.floor() can result in one value being off by 1 because one
was just barely below the whole integer while the other one was not.
(floating point numbers \o/)
Adding 0.5 for actual rounding avoids that problem.

Closes #9
@po5 po5 closed this as completed Jul 26, 2023
@xfzv
Copy link
Author

xfzv commented Jul 26, 2023

🎉

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants