po5 / evafast

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

Rewind Counterpart #7

Open Cananbolt opened 1 year ago

Cananbolt commented 1 year ago

This script is really unique, and really useful. I was wondering if it would be possible to have a rewind variant of this script?

po5 commented 1 year ago

Playing videos in reverse is a mess because codecs weren't designed for it, and mpv wasn't either.
https://mpv.io/manual/master/#options-play-dir

I've never played around with switching it at runtime, wonder how viable it is.

Cananbolt commented 1 year ago

I understand, thanks for explaining it to me. Hopefully one day it becomes possible.

po5 commented 1 year ago

Setting it at runtime actually works decently well, at least on my setup. (It's buggy but not as bad as I expected)

xfzv commented 1 year ago

I'm playing around with the rewind feature. It works pretty well for me as well, very cool.

I was trying to use these keybindings (along with Natural-Harmonia-Gropius/InputEvent):

LEFT    seek -5                                  #@click
LEFT    script-binding evafast/evafast-rewind    #@press

but the second one wouldn't work. Then I realized that this does both (seek with a single press, rewind when pressed continuously):

LEFT    script-binding evafast/evafast-rewind
po5 commented 1 year ago

I do want to add a keybind for toggling rewind mode. soontm And better documentation is on the roadmap (:

xfzv commented 1 year ago

@po5

I'm having an issue fter updating to https://github.com/po5/evafast/commit/7de120b3fc55a105174836096ec0a10803b97271.

I'm using the following keybindings (with Natural-Harmonia-Gropius/InputEvent):

RIGHT    seek 5                                      #@click
RIGHT    script-binding evafast/speedup              #@press
RIGHT    script-binding evafast/slowdown             #@release

I'm using speed_cap=3.5. If I release RIGHT before speed reaches 3.5, then the speed returns to the original value as expected. However, if I keep RIGHT pressed until speed reaches 3.5, then, when releasing RIGHT, speed is stuck at 3.5.

Note that it doesn't occur with all files, at least for me.

I know this is still a WIP but I thought I would let you know.

po5 commented 1 year ago

@xfzv Should be fixed in 20ced3a28c4010974742a8915aed8cc387523bb3.
You miss out on some QoL features by not using the hybrid keybind directly: Speed correction halting when changing its direction (e.g. pressing right while we are slowing down from the last press and slowdown isn't finished), speed resetting instantly on seek.

I could make speed resets on seek work, but will have to be careful to not interfere with other changes to the speed.

Is there any reason why you're reimplementing evafast's hybrid key through InputEvent?

xfzv commented 1 year ago

@xfzv Should be fixed in https://github.com/po5/evafast/commit/20ced3a28c4010974742a8915aed8cc387523bb3.

Can confirm it's fixed with https://github.com/po5/evafast/commit/20ced3a28c4010974742a8915aed8cc387523bb3, thank you.

You miss out on some QoL features by not using the hybrid keybind directly: Speed correction halting when changing its direction (e.g. pressing right while we are slowing down from the last press and slowdown isn't finished), speed resetting instantly on seek.

I could make speed resets on seek work, but will have to be careful to not interfere with other changes to the speed.

Is there any reason why you're reimplementing evafast's hybrid key through InputEvent?

You're right. I can't remember why I did this.. it makes no sense indeed. :disguised_face: