2

I am trying to play an MP4 video inside Tkinter, I've tried using a module called "tkvideo", everything worked just fine until I resized the video, the video started playing in slow motion. It seems that the author is aware of this bug but they don't know how to resolve the issue, as this was a side-project for their former university assignment. It seems that the video speed depends on the resolution. Does anyone know any other way to play a video inside of Tkinter? I've searched everywhere, but nothing I found worked for me.

I'm using Windows 10 with Python 3.9.

TermitCG
  • 21
  • 1
  • 1
    it's gonna be pretty hard because `tkinter` is slow, you can try out `cv` library and somehow combine it with `tkinter`, otherwise not much you can do – Matiiss Oct 09 '21 at 12:47
  • You can try an example [tkvlc.py](https://github.com/oaubert/python-vlc/blob/master/examples/tkvlc.py) using `vlc`. – acw1668 Oct 09 '21 at 13:26
  • And if you have trouble installing `vlc`, see [" No module named 'vlc' " - trouble importing VLC with Python](https://stackoverflow.com/q/68967074/16775594). – Sylvester Kruin Oct 09 '21 at 16:15
  • That said, using `tkinter` with `vlc` is an okay solution, but I recommend using a different toolkit, like PyQt or Gtk. For example, Flowblade is a very capable movie editor, and it uses Python Gtk! (and no, I am not affiliated with Flowblade; I just looked at its source code ;-)). – Sylvester Kruin Oct 09 '21 at 17:08
  • Use tkvideoplayer module – Zaid Ahmad Nov 25 '22 at 16:39

0 Answers0