celluloid icon indicating copy to clipboard operation
celluloid copied to clipboard

Keybinds are subject to incorrect autorepeat when seeking

Open 0n-s opened this issue 1 year ago • 7 comments

Overview Description: Oh boy, so this is a fun one.

"autorepeat" here is keyboard autorepeat, i.e. when you hold down a key & it just types it over & over.

When e.g. seeking later into the video with e.g. →, while Celluloid is seeking, it doesn't seem to realize that I've actually released the key during that process. Due to my very speedy autorepeat settings, this causes seeks to be arbitrarily multiplied depending on how much time it takes to actually do the seek. IOW, it thinks I've entered → more than once, as if I had been holding it down the whole time during that one seek. At least, this is what I believe it's doing; it's practically not there with default autorepeat settings (these are the same for nearly every desktop & WM out there).

(as an aside: is Celluloid's input processing on a different thread? If not, that's probably the culprit)

Steps to Reproduce: Set your keyboard autorepeat delay & interval very low & high, respectively. This'll make it easier to hit the problem. Then throttle Celluloid's CPU usage, to make seeks slower.

  1. Seek in a video 5 seconds with the → or ← key a bunch of times.

Actual Results: The seek will randomly go much further into the video than it did before, in a manner that cannot be explained by mpv's seeks snapping to keyframe boundaries.

Expected Results: The seek should only trigger once.

Version: 0.27

Additional Information:

0n-s avatar Sep 12 '24 05:09 0n-s

Also was a problem for me using version 0.24. I'm just going back to 0.21 as I seek a lot on an external HDD which seems to cause this problem a whole lot. 0.21 doesn't seem to have this issue at all.

LinuxSteely avatar Jan 08 '25 19:01 LinuxSteely

I'm having this issue too: pressing the forward key once will forward the video, not just once, but multiple times—sometimes up to six times. I have two PCs using Wayland/Arch Linux, and the error is present on both. It's preventing me from using Celluloid, so I fall back to mpv (I mentioned it as Celluloid is based on mpv).

ARKye03 avatar Jan 12 '25 06:01 ARKye03

Is the problem still reproducible if you add video-timing-offset=0 to your config file?

gnome-mpv avatar Jan 12 '25 22:01 gnome-mpv

Quick note: I'm disabled: problems with focus, thinking, memory... anything brain related Also: The config file settings reset any time I switch versions making switching back and forth quite annoying and difficult for me.

I can't tell if I reproduced it with or without video-timing-offset=0 now...

I tried seeking a bunch with and without the setting on 0.21 and 0.24 but I only can notice I like 0.21 better but can't tell why (disability: memory, thinking). I also can't tell if the setting make 0.24 better or worse. Seems like repeat is triggering way too fast, only the quickest tap doesn't repeat but I'm not sure (disability memory, focus). Going back to 0.24 and seeking did remind me that the playlist will steal focus when using the arrow keys...? Maybe ctrl is needed? I'm almost out of energy now (disability). Can't try 0.27

I tried creating a large file on my External HDD while playing a file from the same partition but could only get the video to freeze with no auto-repeat... Did I try that with or without the setting? Crap, I can't do any more for weeks maybe (disability). Hopefully someone with a working brain can help.

LinuxSteely avatar Jan 13 '25 01:01 LinuxSteely

Is the problem still reproducible if you add video-timing-offset=0 to your config file?

The issue persists after adding this line to the config file, which is empty and only has this line. I have added this config file in Celluloid to be used.

ARKye03 avatar Jan 13 '25 01:01 ARKye03

Having this problem without even changing autorepeat settings. Although I just tried setting video-timing-offset=0 and it seems to work. It mostly manifests while the video itself is playing.

JohnTheCoolingFan avatar Feb 23 '25 23:02 JohnTheCoolingFan

I attest the same problem here. Annoying, can't seek video properly.

Perhaps a concurrency bug?

torresjrjr avatar Nov 18 '25 07:11 torresjrjr