# IP Camera connection

**URL:** <https://forums.developer.nvidia.com/t/ip-camera-connection/108106>\
**Category:** Jetson Nano\
**Created:** [November 27, 2019, 12:00pm UTC](https://forums.developer.nvidia.com/t/ip-camera-connection/108106 "2019-11-27T12:00:55Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![H31NR1CH](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@H31NR1CH](https://forums.developer.nvidia.com/u/H31NR1CH)\
**Post date:** [November 27, 2019, 12:00pm UTC](https://forums.developer.nvidia.com/t/ip-camera-connection/108106/1 "2019-11-27T12:00:55Z")

</div>

I am having problems connecting my IP camera to my Jetson Nano, I have tried different terminal commands with no avail, but the same error keeps appearing in most cases:

```auto
gst-launch-1.0 rtspsrc location=rtsp://192.xxx.xxx.xxx:554/media/video1 ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! gtksink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://192.xxx.xxx.xxx:554/media/video1
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not get/set settings from/on resource.
Additional debug info:
gstrtspsrc.c(7507): gst_rtspsrc_retrieve_sdp (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
Server can not provide an SDP.
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

```

The error I am referring to it:

```auto
Server can not provide an SDP.

```

Any help would be appreciated

---

<div class="post-metadata">

**Author:** ![H31NR1CH](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@H31NR1CH](https://forums.developer.nvidia.com/u/H31NR1CH)\
**Post date:** [November 27, 2019, 12:05pm UTC](https://forums.developer.nvidia.com/t/ip-camera-connection/108106/2 "2019-11-27T12:05:31Z")

</div>

The other variant of command I tried was the following:

```auto
gst-launch-1.0 rtspsrc location=rtsp://192.xxx.xxx.xxx/user=user&password=password&channel=1&stream=0./ ! decodebin ! gtksink
[1] 12716
[2] 12717
[3] 12718
bash: !: command not found
[2]- Done password=password
[3]+ Done channel=1
user@user-desktop:~$ Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://192.xxx.xxx.xxx/user=user
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not get/set settings from/on resource.
Additional debug info:
gstrtspsrc.c(7507): gst_rtspsrc_retrieve_sdp (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
Server can not provide an SDP.
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
^C
[1]+ Exit 1 gst-launch-1.0 rtspsrc location=rtsp://192.xxx.xxx.xxx/user=user

```

But this variant keeps the command suspended

---

<div class="post-metadata">

**Author:** ![DaneLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/danelll/32/14043_2.png) [@DaneLLL](https://forums.developer.nvidia.com/u/DaneLLL)\
**Post date:** [November 28, 2019, 2:47am UTC](https://forums.developer.nvidia.com/t/ip-camera-connection/108106/3 "2019-11-28T02:47:45Z")

</div>

Hi,  
Looks like the URI is invalid. Could you check with the camera vendor to get correct URI?  
If the URI is correct, you can simply launch it in uridecodebin:

```auto
$ gst-launch-1.0 uridecodebin uri=rtsp://_IP_ADDRESS_ ! nvoverlaysink

```

---

<div class="post-metadata">

**Author:** ![H31NR1CH](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@H31NR1CH](https://forums.developer.nvidia.com/u/H31NR1CH)\
**Post date:** [November 28, 2019, 12:29pm UTC](https://forums.developer.nvidia.com/t/ip-camera-connection/108106/4 "2019-11-28T12:29:18Z")

</div>

Thank you for your feedback!  
This just gave a new error:

```auto
gst-launch-1.0 uridecodebin uri=rtsp://192.xxx.xxx.xxx:544/user=admin_password=password:real_stream ! nvoverlaysink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://192.168.1.11:544/user=admin_password:real_stream
ERROR: from element /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source: Could not open resource for reading and writing.
Additional debug info:
gstrtspsrc.c(7469): gst_rtspsrc_retrieve_sdp (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source:
Failed to connect. (Generic error)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

```

---

<div class="post-metadata">

**Author:** ![H31NR1CH](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@H31NR1CH](https://forums.developer.nvidia.com/u/H31NR1CH)\
**Post date:** [November 28, 2019, 1:04pm UTC](https://forums.developer.nvidia.com/t/ip-camera-connection/108106/5 "2019-11-28T13:04:06Z")

</div>

So I found an app which displays the right URI this time it shows a black screen quickly and then closes it:

```auto
gst-launch-1.0 rtspsrc location=rtsp://192.xxx.xxx.xxx:544/user=admin_password=xxxxxxxx_channel=1_stream=0.sdp?real_stream ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! gtksink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://192.xxx.xxx.xxx:544/user=admin_password=xxxxxxxxchannel=1_stream=0.sdp?real_stream
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not open resource for reading and writing.
Additional debug info:
gstrtspsrc.c(7469): gst_rtspsrc_retrieve_sdp (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
Failed to connect. (Generic error)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

```

---

<div class="post-metadata">

**Author:** ![DaneLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/danelll/32/14043_2.png) [@DaneLLL](https://forums.developer.nvidia.com/u/DaneLLL)\
**Post date:** [November 29, 2019, 1:50am UTC](https://forums.developer.nvidia.com/t/ip-camera-connection/108106/6 "2019-11-29T01:50:36Z")

</div>

Hi,  
You may need to figure out a valid URI first. Are you able to get help from the IP camera vendor? Or you may share the brand and model ID here and other users might have experience of using it.

---

<div class="post-metadata">

**Author:** ![H31NR1CH](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@H31NR1CH](https://forums.developer.nvidia.com/u/H31NR1CH)\
**Post date:** [November 29, 2019, 6:45am UTC](https://forums.developer.nvidia.com/t/ip-camera-connection/108106/7 "2019-11-29T06:45:37Z")

</div>

I used the software ONVIF found on source forge which displays the correct URI, as it actually showed a black screen for a second, so I am pretty sure the URI is fine. But the camera is XYTRON with the designation: XY-IP CAM36BF HK5.0MP POE

---

<div class="post-metadata">

**Author:** ![DaneLLL](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/danelll/32/14043_2.png) [@DaneLLL](https://forums.developer.nvidia.com/u/DaneLLL)\
**Post date:** [December 5, 2019, 9:23am UTC](https://forums.developer.nvidia.com/t/ip-camera-connection/108106/8 "2019-12-05T09:23:51Z")

</div>

Hi .  
Suggest you contact camera vendor to have it work with software decoder avdec\_h264. Once software decoder works, nvv4l2decoder shall work also.

---

<div class="post-metadata">

**Author:** ![jkjung13](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jkjung13/32/10943_2.png) [@jkjung13](https://forums.developer.nvidia.com/u/jkjung13)\
**Post date:** [December 5, 2019, 1:56pm UTC](https://forums.developer.nvidia.com/t/ip-camera-connection/108106/9 "2019-12-05T13:56:02Z")

</div>

Please refer to my blog post: [https://jkjung-avt.github.io/tx2-camera-with-python/](https://jkjung-avt.github.io/tx2-camera-with-python/)

You probably need to install the extra gstreamer libraries (for the ‘h264parse’ element) first.

```auto
$ sudo apt-get install gstreamer1.0-plugins-bad-faad \
                       gstreamer1.0-plugins-bad-videoparsers

```

In addition, I suggest you to use ‘omxh264dec’ (using the built-in hardware H.264 decoder) instead of ‘avdec\_h264’ on Jetson Nano.

---

<div class="post-metadata">

**Author:** ![H31NR1CH](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@H31NR1CH](https://forums.developer.nvidia.com/u/H31NR1CH)\
**Post date:** [December 5, 2019, 2:01pm UTC](https://forums.developer.nvidia.com/t/ip-camera-connection/108106/10 "2019-12-05T14:01:17Z")

</div>

Thank you for all your help, I found that the following works fine:

```auto
gst-launch-1.0 rtspsrc location=rtsp://192.xxx.xxx.xxx:554/user=user_password=password_channel=1_stream=0.sdp?real_stream latency=0 ! decodebin ! autovideosink

```

---

<div class="post-metadata">

**Author:** ![nadeemm](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/nadeemm/32/367020_2.png) [@nadeemm](https://forums.developer.nvidia.com/u/nadeemm)\
**Post date:** [October 15, 2021, 2:50am UTC](https://forums.developer.nvidia.com/t/ip-camera-connection/108106/11 "2021-10-15T02:50:30Z")

</div>

Closed on October 15, 2021, 2:50am UTC


