Open RTSP stream results 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 );
You might also check this: http://answers.opencv.org/question/3664/ip-network-camera-access/
Thanks, I didn't know about that option! This would be a backup for when don't get the stream working.