How to read in an image from a live web video stream?


I’m new to opencv and I got a problem I don’t know how to solve.

So I got a link to a livestream (something like this: and I want to load an image from the stream and save it into a Mat.

I know how to load in images from a webcam device but not how to do it from a web-live-stream.

Im working in Java but some C/ C++ or python Code will help me too.


unfortunately, your link is not a video url, but a html page, loading a js video player (clappr) and providing that with the “real” url. but good luck, parsing 783 lines of html to find out, how exactly !

however, if you only need single images, you can use:

VideoCapture("", CAP_FFMPEG);