Ask Your Question

Revision history [back]

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?