Youtube live stream
I am having problem with handling live streams from youtube using CV2. Local media files and youtube videos work fine, but issue is only with live streams....I receive the stream frames for a few second, then hangs on network for a while and then recovers for a few seconds and then hang again. The same issue happens regardless of video quality(even with 144p)
cap = cv2.VideoCapture()
cap.open(stream_url) # stream URL already extracted
ret, img = cap.read()
I already googled around, couldn't find any answers so far. Any hint?
the "stream_url" you're using, probably does not really point to a video stream, but to something else (e.g. a javascript player)
I double checked that with
the live video does play, but with breaks....hangs in cap.read() and returns after a while....looks like somekind of buffering issue.
Looks like issue with youtube-dl stream buffering issue in the background....having compiled OpenCV manually its showing some warnings of