title: Adding Video/s in an existing Tkinter Window
body: <p>I would like to add a looping video in a tkinter window. I have seen codes from here in stacksoverflow and online, and they seem to be about a Live Capture Video. in my case, I would like to import a video file to my existing Tkinter window, and if possible, keep it on loop. what modules do I need to import and how do I structure the code properly?</p>
  
  <p>I am gonna add some codes that I have used.. I thankfully give the credits to the original creators whoever they are. </p>
  
  <pre><code>import imageio
  from PIL import Image, ImageTk
  
  
  video_name = "vid.mp4"
  video = imageio.get_reader(video_name)
  
  
  def stream(label):
  
      for image in video.iter_data():
          frame_image = ImageTk.PhotoImage(Image.fromarray(image))
          label.config(image=frame_image)
          label.image = frame_image
  
  if __name__ == "__main__":
  
      root = Tk()
      my_label = Label(root)
      my_label.pack()
      thread = threading.Thread(target = stream, args=(my_label))
      thread.daemon = 1
      thread.start()
      root.mainloop()
  </code></pre>