Imagine that I have video in a directory of a website and not in a tag, example: www.site.com/video.mp4, how can I play this video using python + tkinter?
Imagine that I have video in a directory of a website and not in a tag, example: www.site.com/video.mp4, how can I play this video using python + tkinter?
In python, you can play videos with OpenCV . I've never used it to play videos stored remotely, but if you can, just download the video (inside the app itself) to the application location and run it, below an example of documentation :
# Playing Video from file
import numpy as np
import cv2
cap = cv2.VideoCapture('vtest.avi')
while(cap.isOpened()):
ret, frame = cap.read()
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
cv2.imshow('frame',gray)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
cap.release()
cv2.destroyAllWindows()
If the video is in a service on the network, we have livestreamer which is a lib (CLI) that allows the capture of streams of services like youtube, dailymotion, etc., and you can run in a VLC type player or developed by you.