Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

RTSP stream with OpenCV

Hello,

I am trying to access the RTSP stream from my Bosch IP cam. I have checked if I can open the stream in ffplay and VLC. It works in both.

I receive the following error: warning: Could not find codec parameters (../../modules/highgui/src/cap_ffmpeg_impl.hpp:540). The camera is streaming with a h264 codec.

I am working in windows with a self compiled version of OpenCV 2.4.5. I also tried MPEG-4 SH++ as coded but same error message.

Does anybody have an idea what could be the error?

Open RTSP stream with OpenCVresults in an error.

Hello,

I am trying to access the RTSP stream from my Bosch IP cam. I have checked if I can open the stream in ffplay and VLC. It works in both.

I receive the following error: warning: Could not find codec parameters (../../modules/highgui/src/cap_ffmpeg_impl.hpp:540). The camera is streaming with a h264 codec.

I am working in windows with a self compiled version of OpenCV 2.4.5. I also tried MPEG-4 SH++ as coded but same error message.

Does anybody have an idea what could be the error?

Code:

    CvCapture *camera = cvCreateFileCapture("rtsp://10.10.4.28");

if (camera == NULL) {
    printf("camera is null, aborting...");
    return -1;
}

IplImage *img = cvQueryFrame(camera);

cvNamedWindow( "myWindow", CV_WINDOW_AUTOSIZE );
cvShowImage( "myWindow", img );