This is a simple library to play video files in tkinter. This library also provides the ability to play, pause, skip and seek to specific timestamps.
import tkinter as tk
from tkVideoPlayer import TkinterVideo
root = tk.Tk()
videoplayer = TkinterVideo(master=root, scaled=True)
videoplayer.load(r"samplevideo.mp4")
videoplayer.pack(expand=True, fill="both")
videoplayer.play() # play the video
root.mainloop()
read the documentation here
Please immediately upgrade to the latest version if you are using version 1.3 or below
This example source code can be found here
Other libraries you might be interested in:
-
tkstylesheet - Helps you style your tkinter application using stylesheets.
-
tkTimePicker - An easy-to-use timepicker.
-
PyCollision - Helps you draw hitboxes for 2d games.