Jetson Orin Error with RTSP stream from Dahua camera: [gstreamer] gstDecoder::Capture() -- a timeout occurred waiting for the next image buffer

Hello Experts,

I’m trying to set up a webrtc stream using the following command from dusty-nv/jetson-inference:

video-viewer "rtsp://login:pass/172.21.40.10:554/cam/realmonitor?channel=1&subtype=0" --input-codec=h264 webrtc://@:8555/output --output-codec=h264

However, i got this error [gstreamer] gstDecoder::Capture() -- a timeout occurred waiting for the next image buffer. I initially suspected an issue with the RTSP link structure due to a previous problem reported authentication problems with RTSP related to having gstreamer1.0-plugins-ugly installed, but after removing gstreamer1.0-plugins-ugly, I’m now facing a different error: .

$ video-viewer "rtsp://login:pass@172.21.40.10/profile" --input-codec=h265 webrtc://@:8555/output --output-codec=h265
URI -- missing/invalid IP port from rtsp://login:pass@172.21.40.10/profile, default to port 554
[gstreamer] initialized gstreamer, version 1.16.3.0
[gstreamer] gstDecoder -- creating decoder for login
Opening in BLOCKING MODE 
NvMMLiteOpen : Block : BlockType = 261 
NVMEDIA: Reading vendor.tegra.display-size : status: 6 
NvMMLiteBlockCreate : Block : BlockType = 261 
[gstreamer] gstDecoder -- failed to discover stream info
[gstreamer] gstDecoder -- resource discovery and auto-negotiation failed
[gstreamer] gstDecoder -- pipeline string:
[gstreamer] rtspsrc location=rtsp://login:pass@172.21.40.10/profile latency=10 ! queue ! rtph265depay ! nvv4l2decoder name=decoder enable-max-performance=1 ! video/x-raw(memory:NVMM) ! nvvidconv name=vidconv ! video/x-raw ! appsink name=mysink sync=false
[video]  created gstDecoder from rtsp://login:pass-2021@172.21.40.10/profile
------------------------------------------------
gstDecoder video options:
------------------------------------------------
  -- URI: rtsp://login:pass@172.21.40.10/profile
     - protocol:  rtsp
     - location:  login
     - port:      554
  -- deviceType: ip
  -- ioType:     input
  -- codec:      H265
  -- codecType:  v4l2
  -- frameRate:  0
  -- numBuffers: 4
  -- zeroCopy:   true
  -- flipMethod: none
  -- loop:       0
  -- latency     10
------------------------------------------------
[gstreamer] gstEncoder -- detected board 'NVIDIA Orin Nano Developer Kit'
[gstreamer] gstEncoder -- hardware encoder not detected, reverting to CPU encoder
[gstreamer] gstEncoder -- pipeline launch string:
[gstreamer] appsrc name=mysource is-live=true do-timestamp=true format=3 ! x265enc name=encoder bitrate=4000 speed-preset=ultrafast tune=zerolatency key-int-max=30 insert-vui=1 ! video/x-h265 ! rtph265pay config-interval=1 ! application/x-rtp,media=video,encoding-name=H265,clock-rate=90000,payload=96 ! tee name=videotee ! queue ! fakesink
[gstreamer] gstEncoder -- failed to create pipeline
[gstreamer]    (no property "insert-vui" in element "encoder")
[gstreamer] failed to create encoder pipeline
[gstreamer] gstEncoder -- failed to create encoder engine
video-viewer:  failed to create output stream
jetson@linux:~/jetson-inference/utils/python/examples$ video-viewer "rtsp://login:pass@172.21.40.10/profile" --input-codec=h264 webrtc://@:8555/output --output-codec=h264
URI -- missing/invalid IP port from rtsp://login:pass@172.21.40.10/profile, default to port 554
[gstreamer] initialized gstreamer, version 1.16.3.0
[gstreamer] gstDecoder -- creating decoder for admin
Opening in BLOCKING MODE 
NvMMLiteOpen : Block : BlockType = 261 
NVMEDIA: Reading vendor.tegra.display-size : status: 6 
NvMMLiteBlockCreate : Block : BlockType = 261 
[gstreamer] gstDecoder -- failed to discover stream info
[gstreamer] gstDecoder -- resource discovery and auto-negotiation failed
[gstreamer] gstDecoder -- pipeline string:
[gstreamer] rtspsrc location=rtsp://login:pass@172.21.40.10/profile latency=10 ! queue ! rtph264depay ! nvv4l2decoder name=decoder enable-max-performance=1 ! video/x-raw(memory:NVMM) ! nvvidconv name=vidconv ! video/x-raw ! appsink name=mysink sync=false
[video]  created gstDecoder from rtsp://login:pass@172.21.40.10/profile
------------------------------------------------
gstDecoder video options:
------------------------------------------------
  -- URI: rtsp://login:pass@172.21.40.10/profile
     - protocol:  rtsp
     - location:  login
     - port:      554
  -- deviceType: ip
  -- ioType:     input
  -- codec:      H264
  -- codecType:  v4l2
  -- frameRate:  0
  -- numBuffers: 4
  -- zeroCopy:   true
  -- flipMethod: none
  -- loop:       0
  -- latency     10
------------------------------------------------
[gstreamer] gstEncoder -- detected board 'NVIDIA Orin Nano Developer Kit'
[gstreamer] gstEncoder -- hardware encoder not detected, reverting to CPU encoder
[gstreamer] gstEncoder -- pipeline launch string:
[gstreamer] appsrc name=mysource is-live=true do-timestamp=true format=3 ! x264enc name=encoder bitrate=4000 speed-preset=ultrafast tune=zerolatency key-int-max=30 insert-vui=1 ! video/x-h264 ! rtph264pay config-interval=1 ! application/x-rtp,media=video,encoding-name=H264,clock-rate=90000,payload=96 ! tee name=videotee ! queue ! fakesink
[gstreamer] gstEncoder -- failed to create pipeline
[gstreamer]    (no element "x264enc")
[gstreamer] failed to create encoder pipeline
[gstreamer] gstEncoder -- failed to create encoder engine
video-viewer:  failed to create output stream

I’ve also tried using a different valid RTSP link ‘rtsp://login:pass@172.21.40.10/profile’ without the ‘&’ character, and it works fine .

Any insights into what might be causing this timeout error and how to resolve it would be greatly appreciated. Thank you!

Hi,
It sounds similar to the topics:
Deepstream 5.1 Test 3 RTSP Camera INPUT - #3 by DaneLLL
Python Bindings for DeepStream not working with RTSP stream - #8 by DaneLLL

Maybe the URI is not correctly read. Please try gst-launch-1.0 command to clarify whether the failure occurs only when running video-viewer

Thank you for your input.

I’ve validated the URI using various tools like ffmpeg and vlc to ensure its correctness. However, when I execute the gst-launch-1.0 command, I still encounter the same error message. Interestingly, upon removing gstreamer1.0-plugins-ugly, the gst-launch-1.0 command executes successfully.

Nevertheless, I face a new issue when running the videoOutput object in video-viewer: (no element x264enc). I’ve attempted various string structures for the URI like replacing & with \&, but none have proven successful.

Hi,
Orin Nano does not have hardware encoder so you have to use software encoder. Please run the commands and see if the plugin is shown:

$ rm ~/.cache/gstreamer-1.0/registry.aarch64.bin
$ gst-inspect-1.0 x264enc

Hi,
When I run the commands I get this result (after removing gstreamer1.0-plugins-ugly):

$ gst-inspect-1.0 x264enc
$ No such element or plugin 'x264enc'

Is there an alternative I can install to make the x264enc plugin work without requiring gstreamer1.0-plugins-ugly to be installed.

thanks

Hi,
x264enc

The software encoder is in ugly package. If you cannot use it, it seems like there is no other alternative.

Or you may consider use jetson_multimedia_api. We have a sample demonstrating h264 encoding through ffmpeg.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.