community icon indicating copy to clipboard operation
community copied to clipboard

VideoBase self._update Support for 60 FPS Video

Open Sahil-pixel opened this issue 4 months ago • 2 comments

https://github.com/kivy/kivy/blob/a0f1753c6313cd68584c6aca3691c2380445d660/kivy/core/video/init.py#L85

Is this going forever if we create a VideoBased object?? If that is so. Then there is a possibility that kivy app becomes slow . We need to unschedule while not using video player .

Also should have some option to set 30 or 60 because some videos are 60 fps

Sahil-pixel avatar Aug 27 '25 13:08 Sahil-pixel

It seems that every VideoBase instance creates a permanent 30 FPS timer that never gets cleaned up. Clearly a bug.

This will definitely cause performance degradation over time, especially in apps that create/destroy video objects frequently. Maybe we could unschedule on the unload() method.

FilipeMarch avatar Aug 28 '25 19:08 FilipeMarch

@Sahil-pixel @FilipeMarch See: https://github.com/kivy/kivy/blob/a0f1753c6313cd68584c6aca3691c2380445d660/kivy/_clock.pyx#L190

The callback is stored as a weakref. If the video object goes out of scope the Clock is canceled. Deleting the Video object will also cancel the Clock.

@Sahil-pixel Looks like you have a feature request to support 60fps video. I suggest changing the title. Or closing this issue and creating a new one, with the feature request.

ElliotGarbus avatar Aug 29 '25 02:08 ElliotGarbus