How to read Youtube live stream using openCV python?
1 answer
I'm sure you already know the answer, but I'll be in charge of others looking for the same topic. You can do this using Pafy. First you need
import pafy
Then add this
url = "https://www.youtube.com/watch?v=_9OBhtLA9Ig"
video = pafy.new(url)
best = video.getbest(preftype="mp4")
capture = cv2.VideoCapture()
capture.open(best.url)
And it should be.
+1
source to share