Capturing the https youtube videostream with OpenCV

Hi to everyone! I am trying to find the way how to capture httsp youtube video stream using OpenCV 4.5.2 (C++). Could anybody please show a small code example of how to do it? Thabk you

This way doesnt work:
cv::VideoCapture source("https://youtu.be/7yihZkFqFrQ");

that’s a complex problem.

if you’re lucky, ffmpeg can do it. opencv’s videocapture can use ffmpeg.

test with standalone ffmpeg. that means without OpenCV. IF that works, try with opencv.

1 Like

the url is unfortunately NOT a Video stream,
but a html web page, which in turn loads a js video player,
which actually loads a stream.

you’ll have to parse html first, to retrieve the resp. data, ggl will tell you how to do that

Yes, it doesn’t help