Connect to RTSP URL from OpenCV
I am currently working on a project that requires me to interface with an IP camera (Company name: sricam) using openCV 3.3.1. I am using sricam SP019 IP(Wireless) camera. I have been able to find the RTSP URL for my camera: "rtsp://IP_ADDRESS:554/onvif1" and also managed to play it in VLC and the onvifer Android app provided.
As an extra, the app also provided the following info -
- Encoding: H264
- Transport Protocol: RTP/RTSP/TCP
- RTSP port: 554
Issue: But I keep getting this error related to the Gstreamer library.-
GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed
What I have tried (and hasn't worked)-
Recompiling OpenCV from scratch ensuring FFMPEG and Gstreamer cmake Options are enabled(=ON). Also recompiled OpernCV versions 3.3.1 and 3.1.0 but didn't work.
Switching backends (ffmpeg and gstreamer) using flags in cv::VideoCapture( )
What I have tried (and has worked)-
- Using the VLC player: Media->Open Network stream commands, I can view the camera feed properly, which means the issue seems only in OpenCV side and not on the camera side.
- The big buck bunny wowza URL plays fine - rtsp://wowzaec2demo.streamlock.net/vo...
It would be extremely helpful if someone can just point me in the right direction as a minimum.
Thanks!