#include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <iostream> int main(int, char**) { cv::VideoCapture vcap; cv::Mat image; const std::string videoStreamAddress = "rtsp://admin:888888@192.168.199.174:10554/udp/av0_0"; if (!vcap.open(videoStreamAddress)) { std::cout << "Error opening video stream or file" << std::endl; return -1; } cv::namedWindow("Output Window"); for (;;) { if (!vcap.read(image)) { std::cout << "No frame" << std::endl; cv::waitKey(); } cv::imshow("Output Window", image); if (cv::waitKey(1) >= 0) break; } }