Link to home
Start Free TrialLog in
Avatar of chemicalx001
chemicalx001

asked on

ip camera in opencv?

Hi! So I have a foscam FI9821EP ip camera that i am trying to use inside opencv.

this code pops up a window, then closes it instantly. The http link works in firefox, but opencv doesn't like it for some reason.

Mat frame;
namedWindow("video", 1);
VideoCapture cap("http://192.168.1.90:88/cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr=xxx&pwd=xxx&.mjpg");
while (cap.isOpened())
{
    cap >> frame;
    if (frame.empty()) break;

    imshow("video", frame);
    if (waitKey(30) >= 0) break;
}


Any help greatly appreciated!

thanks.
ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chemicalx001
chemicalx001

ASKER

the issue was with ffmpeg, as in the answer, follow my link to get instruction.