1

I'm trying connect to my IP Camera as follows:

const string sourceIPcam = "http://192.168.25.112:202/videostream.cgi? user=admin&pwd=admin&resolution=32";

Mat frame;
VideoCapture cap(sourceIPcam);

namedWindow("IP Video Camera", CV_WINDOW_AUTOSIZE);

if (!cap.isOpened())
{
    cout << "Could not open the camera " << sourceIPcam << endl;
    return -1;
}

When running the above code I get the following error:

[mp3 @ 023f3980] Header missing
[mp3 @ 023f3980] Header missing
[mp3 @ 023f3980] Header missing
[mp3 @ 023f3980] Header missing
warning: Could not find codec parameters (../../modules/highgui/src/cap_ffmpeg_i
mpl.hpp:556)
init done
opengl support available

Any help would be appreciated.

user1818765
  • 23
  • 1
  • 5
  • I see a space in the const sourceIPcam between videostream.cgi? and user=admin. This might cause the problem? – wmk Sep 20 '15 at 20:16
  • try connecting to the camera using VLC, and then use the same string. – Miki Sep 21 '15 at 07:25
  • Related: http://stackoverflow.com/questions/20613453/warning-could-not-find-codec-parameters-modules-highgui-src-cap-ffmpeg-i , http://code.opencv.org/issues/2474 , http://stackoverflow.com/questions/3735823/ffmpeg-not-finding-codec-parameters/3735933#3735933 – Miki Sep 21 '15 at 07:28
  • Hi Folks, thanks for trying to help. I fixed the problem with the following connection string: – user1818765 Sep 22 '15 at 12:20
  • Hi Folks, thanks for trying to help. I fixed the problem with the following connection string: const string sourceIPcam = "http://192.168.25.112:202/videostream.cgi?user=admin&pwd=admin01&resolution=640x480&.mjpg"; So, I was missing the "&.mjpg" part. – user1818765 Sep 22 '15 at 12:27

0 Answers0