if this is a recent version of opencv, this might work:
Mat frame; namedWindow("video", 1); VideoCapture cap("http://150.214.93.55/mjpg/video.mjpg"); while ( cap.isOpened() ) { cap >> frame; if(frame.empty()) break; imshow("video", frame); if(waitKey(30) >= 0) break; }
anyway, opencv seems to insist that the url should end with ".mjpg" (dot mjpg), so if it isn't, add a dummy parameter to it, for example: my/fancy/url?type=.mjpg
source share