Critical Error reading RTSP stream from IP cameras

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Critical Error reading RTSP stream from IP cameras

malharjajoo

Hi,


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").
However, I am unable to open the RTSP stream using openCV VideoCapture interface.

Already tried ( and didn't help much )-

  1. I have posted in the openCV forum but have not received any reply yet.
     

  2. Tried the BigBuckBunny RTSP URL from website (https://www.wowza.com/html/mobile.html)
    and it works using openCV cv::VideoCapture().

  3. I managed to play my IP cameras RTSP stream in VLC and the onvifer Android app provided.

    The app also provided the following info - 
     - Encoding: H264
     - Transport Protocol: RTP/RTSP/TCP
     - RTSP port: 554


  4. I have also recompiled openCV from scratch enabling gstreamer and ffmpeg Cmake Flags (-D WITH_GSTREAMER=ON and -D WITH_FFMPEG=ON).


However, I still keep getting the error shown:  GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed


My question
It would be extremely helpful if someone could give a hint as to what's causing the error.

Thanks!


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Critical Error reading RTSP stream from IP cameras

Mark Howell
On 01/22/2018 04:36 AM, Jajoo, Malhar wrote:

Hi,


I am using sricam SP019 IP(Wireless) camera.
I have been able to find the RTSP URL for my camera: (<a class="moz-txt-link-rfc2396E" href="rtsp://IP_ADDRESS:554/onvif1">"rtsp://IP_ADDRESS:554/onvif1").
However, I am unable to open the RTSP stream using openCV VideoCapture interface.

Already tried ( and didn't help much )-

  1. I have posted in the openCV forum but have not received any reply yet.
     

  2. Tried the BigBuckBunny RTSP URL from website (https://www.wowza.com/html/mobile.html)
    and it works using openCV cv::VideoCapture().

  3. I managed to play my IP cameras RTSP stream in VLC and the onvifer Android app provided.

    The app also provided the following info - 
     - Encoding: H264
     - Transport Protocol: RTP/RTSP/TCP
     - RTSP port: 554


  4. I have also recompiled openCV from scratch enabling gstreamer and ffmpeg Cmake Flags (-D WITH_GSTREAMER=ON and -D WITH_FFMPEG=ON).


However, I still keep getting the error shown:  GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed


My question
It would be extremely helpful if someone could give a hint as to what's causing the error.

Thanks!



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

1) Try playing the RTSP stream in something like VLC (videolan.org) to make sure the camera is working


2) Try using gst-launch-1.0 at the command line to build a pipeline that plays your camera stream with just GStreamer; this would isolate it from any OpenCV issues (for which you may not find much help here).


something like:


$ gst-launch-1.0 -v rtspsrc location=<a class="moz-txt-link-freetext" href="rtsp://IP_ADDRESS:554/onvif1">rtsp://IP_ADDRESS:554/onvif1 ! rtph264depay ! avdec_h264 ! videoconvert ! xvimagesink


there are also more automatic/portable ways to do that with playbin, e.g.:


gst-launch-1.0 -v playbin uri=<a class="moz-txt-link-freetext" href="rtsp://IP_ADDRESS:554/onvif1">rtsp://IP_ADDRESS:554/onvif1


Cheers,


Mark.


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Critical Error reading RTSP stream from IP cameras

malharjajoo

Hi Mark,


Thanks a lot for your suggestion. I have been able to play the RTSP stream in VLC media player.



  1. For the 1st command you suggested,
    I have tried to construct a pipeline(based on some googling) -}

    gst-launch-1.0 -v rtspsrc location="<rtsp_url>" latency=10 ! rtph264depay ! h264parse ! omxh264dec ! videoconvert ! xvimagesink

    I keep getting the warning: No element "<some element>"  for some of the elements.
    I am currently looking into this issue. 

  2. For the 2nd command you suggested,
    I am able to play the file, but there is only audio. I see some errors on my console reporting that 
    I do not have H264 decoder or it cannot be found.

I am having quite some difficulty in resolving these as I'm having shortage of time + multimedia frameworks is not
the central focus of my project :( .

Any help will be greatly appreciated.

Best,
Malhar 






From: gstreamer-devel <[hidden email]> on behalf of Mark Howell <[hidden email]>
Sent: Monday, January 22, 2018 8:01:56 PM
To: [hidden email]
Subject: Re: Critical Error reading RTSP stream from IP cameras
 
On 01/22/2018 04:36 AM, Jajoo, Malhar wrote:

Hi,


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").
However, I am unable to open the RTSP stream using openCV VideoCapture interface.

Already tried ( and didn't help much )-

  1. I have posted in the openCV forum but have not received any reply yet.
     

  2. Tried the BigBuckBunny RTSP URL from website (https://www.wowza.com/html/mobile.html)
    and it works using openCV cv::VideoCapture().

  3. I managed to play my IP cameras RTSP stream in VLC and the onvifer Android app provided.

    The app also provided the following info - 
     - Encoding: H264
     - Transport Protocol: RTP/RTSP/TCP
     - RTSP port: 554


  4. I have also recompiled openCV from scratch enabling gstreamer and ffmpeg Cmake Flags (-D WITH_GSTREAMER=ON and -D WITH_FFMPEG=ON).


However, I still keep getting the error shown:  GLib-GObject-CRITICAL **: g_object_set: assertion 'G_IS_OBJECT (object)' failed


My question
It would be extremely helpful if someone could give a hint as to what's causing the error.

Thanks!



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

1) Try playing the RTSP stream in something like VLC (videolan.org) to make sure the camera is working


2) Try using gst-launch-1.0 at the command line to build a pipeline that plays your camera stream with just GStreamer; this would isolate it from any OpenCV issues (for which you may not find much help here).


something like:


$ gst-launch-1.0 -v rtspsrc location=rtsp://IP_ADDRESS:554/onvif1 ! rtph264depay ! avdec_h264 ! videoconvert ! xvimagesink


there are also more automatic/portable ways to do that with playbin, e.g.:


gst-launch-1.0 -v playbin uri=rtsp://IP_ADDRESS:554/onvif1


Cheers,


Mark.


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Critical Error reading RTSP stream from IP cameras

Mark Howell
On 01/22/2018 01:05 PM, Jajoo, Malhar wrote:

Hi Mark,


Thanks a lot for your suggestion. I have been able to play the RTSP stream in VLC media player.



  1. For the 1st command you suggested,
    I have tried to construct a pipeline(based on some googling) -}

    gst-launch-1.0 -v rtspsrc location="<rtsp_url>" latency=10 ! rtph264depay ! h264parse ! omxh264dec ! videoconvert ! xvimagesink

    I keep getting the warning: No element "<some element>"  for some of the elements.
    I am currently looking into this issue. 

  2. For the 2nd command you suggested,
    I am able to play the file, but there is only audio. I see some errors on my console reporting that 
    I do not have H264 decoder or it cannot be found.

I am having quite some difficulty in resolving these as I'm having shortage of time + multimedia frameworks is not
the central focus of my project :( .

Any help will be greatly appreciated.

Best,
Malhar 


Sounds like maybe your GStreamer installation does not have all these elements installed. That's not unusual, it's often broken up into multiple packages depending on the platform. I didn't catch whether you were linux, mac, windows etc.

h264parse, for example, is in gst-plugins-bad, go see if such a package is installed on your system, if not, find it.

You can look for information on individual elements (if they are present) with, for example:

$ gst-inspect-1.0 h264parse

Or list them all with:

$ gst-inspect-1.0

Or look for stuff mentioning h.264 with, e.g.:

$ gst-inspect-1.0 -a | grep h264

Last, come back with more specific error messages rather than just "some errors"

Cheers,

Mark.

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel