Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

Get Frame Over RTSP using Opencv and gStreamer

$
0
0
My aim is to get frame from ip camera over rtsp and apply motion detection. I had OpenCV 2.4.9 in my machine and I tried to get frames from the ipcam by using VideoCapture class. But I get "error while decoding MB" error .I was able to grab frames but they were corruped. I google the error and find [this topic](http://answers.opencv.org/question/34012/ip-camera-h264-error-while-decoding/). After that, I have downloaded and and build OpenCV 3.0 with gStreamer and without ffmpeg support as suggested. Again I tried to get frame with this straight forward code, but I cannot open the stream. VideoCapture cap; cap.open("rtsp://admin:12345@xxx.xxx.xxx.xxx:554/Streaming/Channels/1?transportmode=unicast&profile=Profile_1"); Mat frame; if (!cap.isOpened()) cout << "Cannot open video frame" << endl; cvNamedWindow("camera", CV_WINDOW_AUTOSIZE); while (true) { if (!cap.read(frame)) break; imshow("ARH camera", frame); cvWaitKey(50); } I think, I am missing something but I cannot solve the problem. What is the problem here? Any ideas? Regards.

Viewing all articles
Browse latest Browse all 41027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>