# Problem with displaying h264 stream from web camera on Jetson Nano

**URL:** <https://forums.developer.nvidia.com/t/problem-with-displaying-h264-stream-from-web-camera-on-jetson-nano/111372>\
**Category:** DeepStream SDK\
**Created:** [February 3, 2020, 4:19pm UTC](https://forums.developer.nvidia.com/t/problem-with-displaying-h264-stream-from-web-camera-on-jetson-nano/111372 "2020-02-03T16:19:46Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![f.kozlov](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@f.kozlov](https://forums.developer.nvidia.com/u/f.kozlov)\
**Post date:** [February 3, 2020, 4:19pm UTC](https://forums.developer.nvidia.com/t/problem-with-displaying-h264-stream-from-web-camera-on-jetson-nano/111372/1 "2020-02-03T16:19:46Z")

</div>

Hello,

I’m trying to play stream from web camera

```auto
gst-launch-1.0 playbin uri=rtsp://<cam_ip>

```

When i set 264 in camera setting my Jetson Nano can’t play it. It stops after this logs

```auto
0:00:08.782972175 31492 0x7fac069450 WARN omx gstomx.c:2826:plugin_init: Failed to load configuration file: Valid key file could not be found in search dirs (searched in: /home/mm/.config:/etc/xdg as per GST_OMX_CONFIG_DIR environment variable, the xdg user config directory (or XDG_CONFIG_HOME) and the system config directory (or XDG_CONFIG_DIRS)
Opening in BLOCKING MODE 
0:00:08.796601468 31492 0x7fac069450 WARN v4l2 gstv4l2object.c:4408:gst_v4l2_object_probe_caps:<nvv4l2decoder0:src> Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
0:00:08.796662927 31492 0x7fac069450 WARN v4l2 gstv4l2object.c:2370:gst_v4l2_object_add_interlace_mode:0x7f8022a700 Failed to determine interlace mode
NvMMLiteOpen : Block : BlockType = 261 
NVMEDIA: Reading vendor.tegra.display-size : status: 6 
NvMMLiteBlockCreate : Block : BlockType = 261

```

Although it works on my PC.

It also works fine (both PC and Jetson) when i set 265 codec on camera setting.

---

<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:** [February 4, 2020, 2:49am UTC](https://forums.developer.nvidia.com/t/problem-with-displaying-h264-stream-from-web-camera-on-jetson-nano/111372/2 "2020-02-04T02:49:17Z")

</div>

Hi,  
Please try following suggestion first and update test result.  
[https://devtalk.nvidia.com/default/topic/1070706/deepstream-sdk/managing-unstable-rtsp-stream/post/5424688/#5424688](https://devtalk.nvidia.com/default/topic/1070706/deepstream-sdk/managing-unstable-rtsp-stream/post/5424688/#5424688)

---

<div class="post-metadata">

**Author:** ![f.kozlov](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@f.kozlov](https://forums.developer.nvidia.com/u/f.kozlov)\
**Post date:** [February 4, 2020, 1:59pm UTC](https://forums.developer.nvidia.com/t/problem-with-displaying-h264-stream-from-web-camera-on-jetson-nano/111372/3 "2020-02-04T13:59:06Z")

</div>

I’ve tried

```auto
gst-launch-1.0 uridecodebin uri=rtsp://<cam_ip> ! nvoverlaysink sync=false

```

and result is the same

---

<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:** [February 5, 2020, 2:00am UTC](https://forums.developer.nvidia.com/t/problem-with-displaying-h264-stream-from-web-camera-on-jetson-nano/111372/4 "2020-02-05T02:00:42Z")

</div>

Hi,  
It looks like rtsp://\<cam\_ip\> is not valid. You may check with the web came vendor to get valid uri.

---

<div class="post-metadata">

**Author:** ![f.kozlov](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@f.kozlov](https://forums.developer.nvidia.com/u/f.kozlov)\
**Post date:** [February 5, 2020, 3:11pm UTC](https://forums.developer.nvidia.com/t/problem-with-displaying-h264-stream-from-web-camera-on-jetson-nano/111372/5 "2020-02-05T15:11:38Z")

</div>

But it works fine on my PC with the same rtsp://\<cam\_ip\>  
I tried vlc media player and gstreamer.  
I set GST\_DEBUG=_FACTORY_:4 and found out that nvv4l2decoder is not created on desktop version  
And nvv4l2decoder is the last created element on Jetson. Gstreamer stops atfer creating it.  
May be I could get more information out of it

---

<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:** [February 6, 2020, 2:00am UTC](https://forums.developer.nvidia.com/t/problem-with-displaying-h264-stream-from-web-camera-on-jetson-nano/111372/6 "2020-02-06T02:00:38Z")

</div>

Hi,  
Please set ‘export GST\_DEBUG=_FACTORY_:4’ and share what elements are picked by uridecodebin. We can then construct the pipelines with specified elements instead of using uridecodebin. This should give some more information in debugging.

---

<div class="post-metadata">

**Author:** ![f.kozlov](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@f.kozlov](https://forums.developer.nvidia.com/u/f.kozlov)\
**Post date:** [February 6, 2020, 9:11am UTC](https://forums.developer.nvidia.com/t/problem-with-displaying-h264-stream-from-web-camera-on-jetson-nano/111372/7 "2020-02-06T09:11:34Z")

</div>

That’s what I get from

```auto
gst-launch-1.0 uridecodebin uri=rtsp://192.168.0.112 ! nvoverlaysink sync=false

```

```auto
0:00:00.055142959 26380 0x5586c54330 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "uridecodebin"
0:00:00.088922112 26380 0x5586c54330 WARN omx gstomx.c:2826:plugin_init: Failed to load configuration file: Valid key file could not be found in search dirs (searched in: /home/mm/.config:/etc/xdg/xdg-unity:/etc/xdg as per GST_OMX_CONFIG_DIR environment variable, the xdg user config directory (or XDG_CONFIG_HOME) and the system config directory (or XDG_CONFIG_DIRS)
0:00:00.089480926 26380 0x5586c54330 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "nvoverlaysink"
0:00:00.089869319 26380 0x5586c54330 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "pipeline"
Setting pipeline to PAUSED ...
0:00:00.099921287 26380 0x5586c54330 INFO GST_ELEMENT_FACTORY gstelementfactory.c:359:gst_element_factory_create: creating element "rtspsrc" named "source"
0:00:00.102516286 26380 0x5586c54330 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "rtspreal"
0:00:00.103697872 26380 0x5586c54330 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "rtspwms"
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://admin:mm123q513P@192.168.0.112
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
0:00:00.677641187 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "udpsrc"
0:00:00.679870502 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "udpsrc"
Progress: (request) SETUP stream 0
0:00:00.722604623 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:359:gst_element_factory_create: creating element "rtpbin" named "manager"
0:00:00.724077569 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "rtpsession"
0:00:00.725285145 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "rtpssrcdemux"
0:00:00.727742172 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "rtpstorage"
0:00:00.729666950 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "funnel"
0:00:00.729908100 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "funnel"
0:00:00.732224083 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "udpsink"
0:00:00.733339366 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "fakesrc"
0:00:00.734621214 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "udpsink"
0:00:00.735854259 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "udpsrc"
0:00:00.736865633 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "udpsrc"
0:00:00.737850652 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "udpsrc"
Progress: (request) SETUP stream 1
0:00:00.771482303 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "rtpsession"
0:00:00.771762100 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "rtpssrcdemux"
0:00:00.771913770 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "rtpstorage"
0:00:00.772077211 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "funnel"
0:00:00.772167421 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "funnel"
0:00:00.775097635 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "udpsink"
0:00:00.775657385 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "fakesrc"
0:00:00.776492975 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "udpsink"
Progress: (open) Opened Stream
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Progress: (request) Sending PLAY request
Progress: (request) Sending PLAY request
Progress: (request) Sent PLAY request
0:00:05.849997897 26380 0x5586cc8000 WARN rtspsrc gstrtspsrc.c:5427:gst_rtspsrc_reconnect:<source> warning: Could not receive any UDP packets for 5,0000 seconds, maybe your firewall is blocking it. Retrying using a tcp connection.
WARNING: from element /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source: Could not read from resource.
Additional debug info:
gstrtspsrc.c(5427): gst_rtspsrc_reconnect (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source:
Could not receive any UDP packets for 5,0000 seconds, maybe your firewall is blocking it. Retrying using a tcp connection.
0:00:05.995034552 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:359:gst_element_factory_create: creating element "rtpbin" named "manager"
0:00:05.996702866 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "rtpsession"
0:00:05.997339857 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "rtpssrcdemux"
0:00:05.997626634 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "rtpstorage"
0:00:05.998151592 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "funnel"
0:00:05.998614153 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "funnel"
0:00:06.038498375 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "rtpsession"
0:00:06.038928123 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "rtpssrcdemux"
0:00:06.039195108 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "rtpstorage"
0:00:06.039452456 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "funnel"
0:00:06.039635481 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "funnel"
0:00:06.182385840 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "rtpjitterbuffer"
0:00:06.183618990 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "rtpptdemux"
0:00:06.209510749 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "rtpjitterbuffer"
0:00:06.209740753 26380 0x5586cc8000 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "rtpptdemux"
0:00:08.166509656 26380 0x7fac054a30 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "decodebin"
0:00:08.167748899 26380 0x7fac054a30 INFO GST_ELEMENT_FACTORY gstelementfactory.c:359:gst_element_factory_create: creating element "typefind" named "typefind"
0:00:08.171021515 26380 0x7fac054850 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "decodebin"
0:00:08.171265687 26380 0x7fac054850 INFO GST_ELEMENT_FACTORY gstelementfactory.c:359:gst_element_factory_create: creating element "typefind" named "typefind"
0:00:08.182127150 26380 0x7fac054a30 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "rtph264depay"
0:00:08.182823154 26380 0x7fac054850 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "rtppcmudepay"
0:00:08.185042468 26380 0x7fac054a30 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "h264parse"
0:00:08.185646438 26380 0x7fac054850 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "mulawdec"
0:00:08.186870421 26380 0x7fac054a30 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "capsfilter"
0:00:08.192606471 26380 0x7fac054a30 INFO GST_ELEMENT_FACTORY gstelementfactory.c:361:gst_element_factory_create: creating element "nvv4l2decoder"
Opening in BLOCKING MODE 
0:00:08.198403356 26380 0x7fac054a30 WARN v4l2 gstv4l2object.c:4408:gst_v4l2_object_probe_caps:<nvv4l2decoder0:src> Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
0:00:08.198477107 26380 0x7fac054a30 WARN v4l2 gstv4l2object.c:2370:gst_v4l2_object_add_interlace_mode:0x7f8c076f10 Failed to determine interlace mode
NvMMLiteOpen : Block : BlockType = 261 
NVMEDIA: Reading vendor.tegra.display-size : status: 6 
NvMMLiteBlockCreate : Block : BlockType = 261

```

---

<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:** [February 6, 2020, 9:36am UTC](https://forums.developer.nvidia.com/t/problem-with-displaying-h264-stream-from-web-camera-on-jetson-nano/111372/8 "2020-02-06T09:36:22Z")

</div>

Hi,  
It is most likely an issue in network:

```auto
0:00:05.849997897 26380 0x5586cc8000 WARN rtspsrc gstrtspsrc.c:5427:gst_rtspsrc_reconnect:<source> warning: Could not receive any UDP packets for 5,0000 seconds, maybe your firewall is blocking it. Retrying using a tcp connection.
WARNING: from element /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source: Could not read from resource.
Additional debug info:
gstrtspsrc.c(5427): gst_rtspsrc_reconnect (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source:
Could not receive any UDP packets for 5,0000 seconds, maybe your firewall is blocking it. Retrying using a tcp connection.

```

Please check if there is farewall or other network security check. Looks like Jetson Nano does not receive any video/audio stream.

---

<div class="post-metadata">

**Author:** ![f.kozlov](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@f.kozlov](https://forums.developer.nvidia.com/u/f.kozlov)\
**Post date:** [February 6, 2020, 9:42am UTC](https://forums.developer.nvidia.com/t/problem-with-displaying-h264-stream-from-web-camera-on-jetson-nano/111372/9 "2020-02-06T09:42:10Z")

</div>

Hi,  
It’s ok, my camera is working by tcp. Uridecodebin retrys with tcp connection. I just don’t know how to specify using tcp in the first place

---

<div class="post-metadata">

**Author:** ![TomNVIDIA](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/tomnvidia/32/14181_2.png) [@TomNVIDIA](https://forums.developer.nvidia.com/u/TomNVIDIA)\
**Post date:** [October 12, 2021, 4:18pm UTC](https://forums.developer.nvidia.com/t/problem-with-displaying-h264-stream-from-web-camera-on-jetson-nano/111372/10 "2021-10-12T16:18:29Z")

</div>


