Error Running Deepstream Apps Jetson Orin Nano

Hardware Platform (Jetson Orin Nano [Developer Kit])

DeepStream 6.2

Jetpack 5.1.1 (rev 1)

Hi,

I have recently been experimenting with the DeepStream apps found here https://github.com/NVIDIA-AI-IOT/deepstream_python_apps and reading the DeepStream Documentation https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_plugin_gst-nvstreammux.html
I have used one of the python examples and made modifications to it to encode using software X264 encoding however am having trouble getting any of the examples running on the Jetson Orin Nano getting gstreamer errors related to linkage of pipelines. Some of the apps work fine if no inference is done (i.e. encoding pipeline without streammux or nvinfer elements) however they fail to work when incorporating these gstreamer elements.
I created one example to read in from a CSI camera that works without streammux and nvinfer but when those elements are added it fails to work with the pipeline.

Successful run no nvinfer or streammux

python3 deepstream_test1_csi_out.py -i argus://0 -c X264 -nvs 0 -p 5000 -hst 192.168.1.100  
input argus://0
codec X264
bitrate 4000000
port 5000
host 192.168.1.100
framerate 30
height 720
width 1280
streammux 0
Creating Pipeline 
 
Creating Elements: .... 

Creating Source
Creating Video Converter 

Creating Streammux 
 
Creating pgie 
 
Creating nvvidconv 

Creating nvosd 
 
Creating x264enc
Creating rtph264pay 
 
Playing cam argus://0 
Adding elements to Pipeline 

Linking elements in the Pipeline 


 *** DeepStream: Launched RTSP Streaming at rtsp://192.168.1.100:5005/ds-test ***


dot file is generated as "test.dot" in current directory 

Starting pipeline 

0:00:00.306054784 10643      0xc5200f0 WARN                 nvinfer gstnvinfer.cpp:677:gst_nvinfer_logger:<primary-inference> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::initialize() <nvdsinfer_context_impl.cpp:1170> [UID = 1]: Warning, OpenCV has been deprecated. Using NMS for clustering instead of cv::groupRectangles with topK = 20 and NMS Threshold = 0.5
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3840 x 2160 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 22.250000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 22.250000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 1 
   Output Stream W = 1920 H = 1080 
   seconds to Run    = 0 
   Frame Rate = 59.999999 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
WARNING: [TRT]: Using an engine plan file across different models of devices is not recommended and is likely to affect performance or even cause errors.
0:00:03.782210080 10643      0xc5200f0 INFO                 nvinfer gstnvinfer.cpp:680:gst_nvinfer_logger:<primary-inference> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1909> [UID = 1]: deserialized trt engine from :/home/orin511/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine
INFO: [Implicit Engine Info]: layers num: 3
0   INPUT  kFLOAT input_1         3x368x640       
1   OUTPUT kFLOAT conv2d_bbox     16x23x40        
2   OUTPUT kFLOAT conv2d_cov/Sigmoid 4x23x40         

0:00:03.980400896 10643      0xc5200f0 INFO                 nvinfer gstnvinfer.cpp:680:gst_nvinfer_logger:<primary-inference> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2012> [UID = 1]: Use deserialized engine model: /home/orin511/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine
0:00:04.013234432 10643      0xc5200f0 INFO                 nvinfer gstnvinfer_impl.cpp:328:notifyLoadModelStatus:<primary-inference> [UID 1]: Load new model:dstest1_pgie_config.txt sucessfully
State changed from GST_STATE_NULL to GST_STATE_READY (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_NULL to GST_STATE_READY (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_NULL to GST_STATE_READY (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_NULL to GST_STATE_READY (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_NULL to GST_STATE_READY (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_NULL to GST_STATE_READY (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_NULL to GST_STATE_READY (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_NULL to GST_STATE_READY (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_NULL to GST_STATE_READY (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_NULL to GST_STATE_READY (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_NULL to GST_STATE_READY (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_NULL to GST_STATE_READY (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_NULL to GST_STATE_READY (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_NULL to GST_STATE_READY (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_NULL to GST_STATE_READY (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_NULL to GST_STATE_READY (pending=GST_STATE_PLAYING)
State changed from GST_STATE_READY to GST_STATE_PAUSED (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_READY to GST_STATE_PAUSED (pending=GST_STATE_VOID_PENDING)
Stream status changed to GST_STREAM_STATUS_TYPE_CREATE (owner=queue)
State changed from GST_STATE_READY to GST_STATE_PAUSED (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_READY to GST_STATE_PAUSED (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_READY to GST_STATE_PAUSED (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_READY to GST_STATE_PAUSED (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_READY to GST_STATE_PAUSED (pending=GST_STATE_VOID_PENDING)
Stream status changed to GST_STREAM_STATUS_TYPE_CREATE (owner=nv-argus-camera-source)
State changed from GST_STATE_READY to GST_STATE_PAUSED (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_READY to GST_STATE_PAUSED (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_READY to GST_STATE_PAUSED (pending=GST_STATE_VOID_PENDING)
Stream status changed to GST_STREAM_STATUS_TYPE_ENTER (owner=nv-argus-camera-source)
Stream status changed to GST_STREAM_STATUS_TYPE_ENTER (owner=queue)
State changed from GST_STATE_READY to GST_STATE_PAUSED (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_READY to GST_STATE_PAUSED (pending=GST_STATE_VOID_PENDING)
!! Unknown message type: <flags GST_MESSAGE_LATENCY of type Gst.MessageType> 
State changed from GST_STATE_READY to GST_STATE_PAUSED (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_READY to GST_STATE_PAUSED (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_READY to GST_STATE_PAUSED (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_READY to GST_STATE_PAUSED (pending=GST_STATE_PLAYING)
!! Unknown message type: <flags GST_MESSAGE_NEW_CLOCK of type Gst.MessageType> 
State changed from GST_STATE_PAUSED to GST_STATE_PLAYING (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_PAUSED to GST_STATE_PLAYING (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_PAUSED to GST_STATE_PLAYING (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_PAUSED to GST_STATE_PLAYING (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_PAUSED to GST_STATE_PLAYING (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_PAUSED to GST_STATE_PLAYING (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_PAUSED to GST_STATE_PLAYING (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_PAUSED to GST_STATE_PLAYING (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_PAUSED to GST_STATE_PLAYING (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_PAUSED to GST_STATE_PLAYING (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_PAUSED to GST_STATE_PLAYING (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_PAUSED to GST_STATE_PLAYING (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_PAUSED to GST_STATE_PLAYING (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_PAUSED to GST_STATE_PLAYING (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_PAUSED to GST_STATE_PLAYING (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_PAUSED to GST_STATE_PLAYING (pending=GST_STATE_VOID_PENDING)
!! Unknown message type: <flags GST_MESSAGE_STREAM_START of type Gst.MessageType> 
!! Unknown message type: <flags GST_MESSAGE_TAG of type Gst.MessageType> 
^CGST_ARGUS: Cleaning up
CONSUMER: Done Success
GST_ARGUS: Done Success

With nvinfer and streammux

orin511@ubuntu:~/deepstream_python_apps/apps/deepstream-test-csi-rtsp$ python3 deepstream_test1_csi_out.py -i argus://0 -c X264 -nvs 1 -p 5000 -hst 192.168.1.100  
input argus://0
codec X264
bitrate 4000000
port 5000
host 192.168.1.100
framerate 30
height 720
width 1280
streammux 1
Creating Pipeline 
 
Creating Elements: .... 

Creating Source
Creating Video Converter 

Creating Streammux 
 
Creating pgie 
 
Creating nvvidconv 

Creating nvosd 
 
Creating x264enc
Creating rtph264pay 
 
Playing cam argus://0 
Adding elements to Pipeline 

Linking elements in the Pipeline 


 *** DeepStream: Launched RTSP Streaming at rtsp://192.168.1.100:5005/ds-test ***


dot file is generated as "test.dot" in current directory 

Starting pipeline 

0:00:00.318975584 10722     0x10733c90 WARN                 nvinfer gstnvinfer.cpp:677:gst_nvinfer_logger:<primary-inference> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::initialize() <nvdsinfer_context_impl.cpp:1170> [UID = 1]: Warning, OpenCV has been deprecated. Using NMS for clustering instead of cv::groupRectangles with topK = 20 and NMS Threshold = 0.5
WARNING: [TRT]: Using an engine plan file across different models of devices is not recommended and is likely to affect performance or even cause errors.
0:00:03.775415584 10722     0x10733c90 INFO                 nvinfer gstnvinfer.cpp:680:gst_nvinfer_logger:<primary-inference> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1909> [UID = 1]: deserialized trt engine from :/home/orin511/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine
INFO: [Implicit Engine Info]: layers num: 3
0   INPUT  kFLOAT input_1         3x368x640       
1   OUTPUT kFLOAT conv2d_bbox     16x23x40        
2   OUTPUT kFLOAT conv2d_cov/Sigmoid 4x23x40         

0:00:03.979933408 10722     0x10733c90 INFO                 nvinfer gstnvinfer.cpp:680:gst_nvinfer_logger:<primary-inference> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2012> [UID = 1]: Use deserialized engine model: /home/orin511/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine
0:00:04.012776576 10722     0x10733c90 INFO                 nvinfer gstnvinfer_impl.cpp:328:notifyLoadModelStatus:<primary-inference> [UID 1]: Load new model:dstest1_pgie_config.txt sucessfully
State changed from GST_STATE_NULL to GST_STATE_READY (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_NULL to GST_STATE_READY (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_NULL to GST_STATE_READY (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_NULL to GST_STATE_READY (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_NULL to GST_STATE_READY (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_NULL to GST_STATE_READY (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_NULL to GST_STATE_READY (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_NULL to GST_STATE_READY (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_NULL to GST_STATE_READY (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_NULL to GST_STATE_READY (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_NULL to GST_STATE_READY (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_NULL to GST_STATE_READY (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_NULL to GST_STATE_READY (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_NULL to GST_STATE_READY (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_NULL to GST_STATE_READY (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_NULL to GST_STATE_READY (pending=GST_STATE_PLAYING)
State changed from GST_STATE_READY to GST_STATE_PAUSED (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_READY to GST_STATE_PAUSED (pending=GST_STATE_VOID_PENDING)
Stream status changed to GST_STREAM_STATUS_TYPE_CREATE (owner=queue)
State changed from GST_STATE_READY to GST_STATE_PAUSED (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_READY to GST_STATE_PAUSED (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_READY to GST_STATE_PAUSED (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_READY to GST_STATE_PAUSED (pending=GST_STATE_VOID_PENDING)
Stream status changed to GST_STREAM_STATUS_TYPE_ENTER (owner=queue)
State changed from GST_STATE_READY to GST_STATE_PAUSED (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_READY to GST_STATE_PAUSED (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_READY to GST_STATE_PAUSED (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_READY to GST_STATE_PAUSED (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_READY to GST_STATE_PAUSED (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_READY to GST_STATE_PAUSED (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_READY to GST_STATE_PAUSED (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_READY to GST_STATE_PAUSED (pending=GST_STATE_VOID_PENDING)
Stream status changed to GST_STREAM_STATUS_TYPE_CREATE (owner=nv-argus-camera-source)
State changed from GST_STATE_READY to GST_STATE_PAUSED (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_READY to GST_STATE_PAUSED (pending=GST_STATE_PLAYING)
Stream status changed to GST_STREAM_STATUS_TYPE_ENTER (owner=nv-argus-camera-source)
!! Unknown message type: <flags GST_MESSAGE_NEW_CLOCK of type Gst.MessageType> 
State changed from GST_STATE_PAUSED to GST_STATE_PLAYING (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_PAUSED to GST_STATE_PLAYING (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_PAUSED to GST_STATE_PLAYING (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_PAUSED to GST_STATE_PLAYING (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_PAUSED to GST_STATE_PLAYING (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_PAUSED to GST_STATE_PLAYING (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_PAUSED to GST_STATE_PLAYING (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_PAUSED to GST_STATE_PLAYING (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_PAUSED to GST_STATE_PLAYING (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_PAUSED to GST_STATE_PLAYING (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_PAUSED to GST_STATE_PLAYING (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_PAUSED to GST_STATE_PLAYING (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_PAUSED to GST_STATE_PLAYING (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_PAUSED to GST_STATE_PLAYING (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_PAUSED to GST_STATE_PLAYING (pending=GST_STATE_VOID_PENDING)
State changed from GST_STATE_PAUSED to GST_STATE_PLAYING (pending=GST_STATE_VOID_PENDING)
Stream status changed to GST_STREAM_STATUS_TYPE_CREATE (owner=Stream-muxer)
Stream status changed to GST_STREAM_STATUS_TYPE_ENTER (owner=Stream-muxer)
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3840 x 2160 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 22.250000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 22.250000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 1 
   Output Stream W = 1920 H = 1080 
   seconds to Run    = 0 
   Frame Rate = 59.999999 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
Frame Number=0 Number of Objects=0 Vehicle_count=0 Person_count=0
0:00:04.641556672 10722     0x10745060 WARN                 nvinfer gstnvinfer.cpp:2369:gst_nvinfer_output_loop:<primary-inference> error: Internal data stream error.
0:00:04.641603296 10722     0x10745060 WARN                 nvinfer gstnvinfer.cpp:2369:gst_nvinfer_output_loop:<primary-inference> error: streaming stopped, reason not-linked (-1)
 Error: gst-stream-error-quark: Internal data stream error. (1): /dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvinfer/gstnvinfer.cpp(2369): gst_nvinfer_output_loop (): /GstPipeline:pipeline0/GstNvInfer:primary-inference:
streaming stopped, reason not-linked (-1)
GST_ARGUS: Cleaning up
CONSUMER: Done Success
GST_ARGUS: Done Success

I get a reason not-linked error. I have attempted looking over the graph


However I have trouble understanding where the linking error is taking place.

Feel free to look over the code here https://github.com/NIH-CIT-OIR-SPIS/deepstream_python_apps/tree/master/apps/deepstream-test-csi-rtsp

Could you receive video data normally on the sink end in this scenario?

Please add the debug_bin_to_dot_data api after the status is set to playing.

You can add the GST_DEBUG=3 at the beginning of the command line to open more log.

Yes, I was able to receive video data normally on the sink end in this scenario.
|
|

I have added the debug_bin_to_dot_data api after the status was set to playing as requested. Let me know if you see anything

I am not running this in command line but using the Python Gstreamer wrapper. In my main function I tried to set the environment variable:

os.environ["GST_DEBUG"] = "3" 

in the first line of the main function, but that didn’t work.
So instead in my main function after the Gstreamer initialization with Gst.init(None), I placed the following lines:

    Gst.debug_set_active(True)
    Gst.debug_set_default_threshold(5)

A threshold number of 3 was not producing any different results. So I used 5 and just utilized grep to filter out all the lines without INFO attached to them; here are the results files. The second one being the log file without INFO messages attached.
debug_deepstream.log (1.8 MB)
debug_stream_no_info.log (1.7 MB)

Let me know if you see anything that I missed. Thank you.

Could you try to use the nvv4l2h264enc plugin to replace the x264 plugin? From the graph, it can be seen that your x264 plugin is not linked to the pipeline.

Unfortunately because it is the Jetson Orin Nano and not the Jetson Orin NX, hardware encoding (or more specifically the nvv4l2h264enc plugin) is not offered as seen in the chart in the Specifications section on this page. Is there anyway to get the x264enc plugin working properly with streammux and nvinfer?

I was able to fix the issue thanks to your help in pointing out the linking error in the graph for the x264enc plugin. The problem was happening at the GstCapsFilter element where for some reason it failed to link.
I had erroneously kept the caps variable to its initial nvv4l2h264enc compatable setting.
So I changed the lines:

caps = Gst.ElementFactory.make("capsfilter", "filter_enc")
caps.set_property("caps", Gst.Caps.from_string("video/x-raw(memory:NVMM), format=I420"))

to

caps = Gst.ElementFactory.make("capsfilter", "filter_enc")
caps.set_property("caps", Gst.Caps.from_string("video/x-raw, format=I420"))

Note that I change from video/x-raw(memory:NVMM) to the normal video/x-raw string.
In hindsight this was simple mistake on my part. Thanks.

You can see the working code here or here:
deepstream_test1_csi_out.py (18.6 KB)
(config file: dstest1_pgie_config.txt (2.9 KB) )

Thanks so much for your help.

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