how to use OpenCV 2.3.1 to connect to IP Camera?
<p>I'm using openCV 2.3.1 to connect to IP Camera.</p>

<p>Here is my code</p>

<pre><code>#include "../../../OpenCV/include/opencv/cv.h"
#include "../../../OpenCV/include/opencv/highgui.h"

CvCapture *camera = cvCreateFileCapture("http://usr:pass@ip:port/nphMotionJpeg?resolution=320x240&amp;Quality=Standard");
    if (camera == NULL)
        printf("camera is null\n");
    else
        printf("camera is not null");

    cvNamedWindow("img");
    int d = cvWaitKey(10);
    while (d != atoi("q"))
    {
        d = cvWaitKey(10);
        double t1 = (double)cvGetTickCount();
        IplImage *img = cvQueryFrame(camera);
        double t2=(double)cvGetTickCount();
        printf("time: %gms  fps: %.2g\n",(t2-t1)/(cvGetTickFrequency()*1000.), 1000./((t2-t1)/(cvGetTickFrequency()*1000.)));
        cvShowImage("img",img);
    }
    cvReleaseCapture(&amp;camera);
</code></pre>

<p>But above cvCreateFileCapture() function always return null, but if i use cvCreateFileCapture("video.avi") is ok, please explain to me why?</p>

<p>I have read many threads about this issue on stackoverflow.com, but i dont have any way to solve this problem yet.</p>

<p>I'm using OpenCV 2.3.1, and I have built it with ffmpeg (i'm not sure this, but i had opencv_ffmpeg.dll on my folder after build it).</p>
