I want to create an application which can display video stream from IP camera using Opencv and MFC, c++. I am able to get video from my IP camera over the lan, But wondering if its possible via internet.
1 | initial version |
I want to create an application which can display video stream from IP camera using Opencv and MFC, c++. I am able to get video from my IP camera over the lan, But wondering if its possible via internet.
2 | No.2 Revision |
I want to create an application which can display video stream from IP camera using Opencv and MFC, c++. I am able to get video from my IP camera over the lan, But wondering if its possible via internet.
Code I tried.
int main(int, char**) { cv::VideoCapture vcap; cv::Mat image;
// This works on a D-Link CDS-932L const std::string videoStreamAddress =
"http://admin:[email protected]:80/video.cgi?resolution=640x360&req_fps=50&.mjpg"; //const std::string videoStreamAddress = "http://admin:[email protected]:8088/mjpg/video.mjpg";
//open the video stream and make sure it's opened if(!vcap.open(videoStreamAddress)) { std::cout << "Error opening video stream or file" << std::endl; return -1; } for(;;) { if(!vcap.read(image)) { std::cout << "No frame" << std::endl; cv::waitKey(); } cv::imshow("Output Window", image); if(cv::waitKey(1) >= 0) break; } }
Get warning "Could not find codec parameter ".
3 | No.3 Revision |
I want to create an application which can display video stream from IP camera using Opencv and MFC, c++. I am able to get video from my IP camera over the lan, But wondering if its possible via internet.
Code I tried.
int main(int, char**) { cv::VideoCapture vcap; cv::Mat image;
// This works on a D-Link CDS-932L const std::string videoStreamAddress =
"http://admin:[email protected]:80/video.cgi?resolution=640x360&req_fps=50&.mjpg"; //const std::string videoStreamAddress = "http://admin:[email protected]:8088/mjpg/video.mjpg";
//open the video stream and make sure it's opened if(!vcap.open(videoStreamAddress)) { std::cout << "Error opening video stream or file" << std::endl; return -1; } for(;;) { if(!vcap.read(image)) { std::cout << "No frame" << std::endl; cv::waitKey(); } cv::imshow("Output Window", image); if(cv::waitKey(1) >= 0) break; } }
Get warning "Could not find codec parameter ".