PaulleDemon / tkVideoPlayer

Video player for tkinter.
MIT License
83 stars 25 forks source link

Flickering in Loop Example #32

Open CodeYan01 opened 1 year ago

CodeYan01 commented 1 year ago

https://github.com/PaulleDemon/tkVideoPlayer/assets/65320293/696c2a86-f6ac-4fd4-a0e0-9ae59a4c1f39

I assume this is because tkinter events are queued, so there's a delay when replaying the video (as it has to process other events first before the callback is called)

Here's the video I used, which is small and just 10 fps (initially used 25 fps with the same issue).

https://github.com/PaulleDemon/tkVideoPlayer/assets/65320293/dd14d235-b94b-4492-ae70-00429a729b03

I believe the loop function should just be integrated into the widget rather than making the user add an event callback for looping. It is also necessary that the last frame is not discarded when the video ends.