-
Notifications
You must be signed in to change notification settings - Fork 1
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 #8
base: master
Are you sure you want to change the base?
Conversation
Should make it easier to add new features
Does this work as expected for you @tomasklaen, @xfzv? |
This comment was marked as resolved.
This comment was marked as resolved.
Yes, all good here. Solves #2. |
I wrote my own little speed adjustment script thingy, so don't wait on me with this :) |
Please share that, always good to spread ideas (: |
It's just a dumb hold to speed up or toggle a speed up. Don't want to maintain it so here's just a pastebin: https://pastebin.com/acXpcVYR |
As far as I'm concerned, due to #2 , I've been using this along with Natural-Harmonia-Gropius/InputEvent:
until the rewrite is merged into the main branch. |
+ sign is relative to current time, - sign is relative to video end Former is useful for "speedup for n seconds" keybind Latter is useful for catching up on livestreams
Need to re-add rewinding
Current state of affairs. Slowdown with
The functionality that's there has been tested enough that I'm contemplating making this the default branch, until it's finished and gets merged. Will do after documentation is written. |
This is an accuracy tradeoff - not knowing the next sub right away can cause speed flicker but I haven't noticed real-world regressions
I have used this for about a week now and encountered two times where it would constantly set the speed to 2 (the original speed). Holding the forward button accelerates as it should and after letting go it decelerates again, but after reaching 2 it doesn't stop setting the speed to 2. As a result I can't change the speed because it will be immediately set to 2 again. Unfortunately I couldn't figure out how to trigger it, but it's annoying when it happens. Here is my conf in case it helps.
|
I've encountered this multiple times as well, and it killed my momentum. Haven't looked too much into it. |
What you describe seems similar to #9 Doesn't it? |
@xfzv Yes that's it, I didn't check issues because I didn't expect there to be one for a PR. |
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
This gets rid of text subtitle detection and our own empty subtitle check, since it didn't work with subs_lookahead for muxed subtitles (sub-text wasn't available straight away).
Previous regex would skip subtitles that contained empty lines but weren't empty. This is POSIX Extended RegEx, doesn't seem possible in plain POSIX or mpv's JS regex to match the start and end of a multiline string.
2c00ab2 removed our empty subtitle check, because |
I'd expect it to help here too. |
There is a better symbol to replace
local symbol = '▶▶'
if mp.get_property('osd-font') == 'mpv-osd-symbols' then symbol = '\u{E005}' end
mp.osd_message(symbol .. string.format(" x%.1f", current_speed))
|
Thanks for bringing this up. We can use the symbol regardless of the user's osd-font with the ass \fn tag. |
local ass_start = mp.get_property_osd("osd-ass-cc/0")
local ass_stop = mp.get_property_osd("osd-ass-cc/1")
local symbol = "{\\fnmpv-osd-symbols}\u{E005}"
mp.osd_message(ass_start .. symbol .. ass_stop .. string.format(" x%.1f", current_speed)) |
Still respects osd font for the main text As suggested by @verygoodlee #8 (comment)
Should make it easier to add new features. Much less dumb global state management required.
Finally closes #2. Closes #5. I've realized there probably is no downside to restoring original speed, didn't make an option to disable it.
Closes #1 through a script message to be used for input.conf commands like
; script-message-to evafast set-option speed_cap 5
.Closes #7.
All current functionality and dumb QoL stuff I could remember has been reimplemented.
It's not impossible I've missed edge cases.I have missed edge cases.speedup-target
is barely tested, but seems to work fine.Subtitle lookahead should be slightly more accurate.
To do:
1
's inspeed_transition()
, maybe use math instead of dumb recursionnext_sub_at
sub-start
for image-based subs andsub-text
for text-based subsflash_speed()
dropOnAVdesync
from speed-transition.luademuxer-readahead-secs
andcache-secs
(depending on current settings and/or automatically set them)