Problem connecting multiple IP-Cameras C++

asked 2014-03-07 01:44:49 -0600

Ričards gravatar image

Hello.

I am experiencing problems connecting to two IP-Cameras simultanously using VideoCapture object. For some time I am able to receive frames normally, but after some time (about few seconds), the camera was connected first, starts to return empty frames. Also this error message is displayed [mjpeg @ 0x7fe888008c00] overread 8. If I connect only one camera, then everything works fine.

My steps are as follows:

//Declare video capture objects for camera streams:

VideoCapture streamCam1; VideoCapture streamCam2;

// open camera streams for specified ip addre; streamCam1.open(address1); streamCam2.open(address2);

// loop for capturing frames from camera, and visualizing them while(((waitKey(1))&0xFF)!=27){ streamCam1>>image1; streamCam2>>image2; imshow("CAM1", image1); imshow("CAM2", image2); }

Thank You.

edit retag flag offensive close merge delete