I have never written VC++ apps and now i am assigned a task of capturing IP camera and saving as files on the harddisk.
i was surfing for last 2 days but cant find any suitable link or code for the same.
the sample code i found on the net, captures webcam but nothing relevent to reading video streams on rtsp protocols with credentials.
please help me for this.. Thanks & Regards
user2727765
The below is the code snippet which accesses a public ip camera, which works fine for me.
int main(int argc, char *argv[])
{
Mat frame;
namedWindow("video", 1);
VideoCapture cap("http://66.184.211.231/mjpg/video.mjpg");
while ( cap.isOpened() )
{
cap >> frame;
if(frame.empty()) break;
imshow("video", frame);
if(waitKey(30) >= 0) break;
}
return 0;
}
来源:https://stackoverflow.com/questions/18892370/ip-camera-video-streaming-using-opencv-in-vc