Problem with deepstream_test1_rtsp_out.py

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) Jetson Nano
• DeepStream Version 5.1
• JetPack Version (valid for Jetson only) 4.5.1
• TensorRT Version 7.1.3.0
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs) bugs
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing) python3 deepstream_test1_rtsp_out.py -i /opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample_1080p_h264.mp4
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)
Hello,
When I tried to test the sample of python deepstrem it give me this :
python3 deepstream_test1_rtsp_out.py -i /opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample_1080p_h264.mp4
Creating Pipeline

Creating Source

Creating H264Parser

Creating Decoder

nvbuf_utils: Could not get EGL display connection
Unable to create NvStreamMux
Unable to create pgie
Unable to create nvvidconv
Unable to create nvosd
Unable to create nvvidconv_postosd
Creating H264 Encoder
Creating H264 rtppay
Playing file /opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample_1080p_h264.mp4
Traceback (most recent call last):
File “deepstream_test1_rtsp_out.py”, line 334, in
sys.exit(main(sys.argv))
File “deepstream_test1_rtsp_out.py”, line 225, in main
streammux.set_property(‘width’, 1920)
AttributeError: ‘NoneType’ object has no attribute ‘set_property’
Does anyone know why ?
Thanks by advance.

Hi,
Please try h264 stream:

/opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample_720p.h264

And execute export DISPLAY=:0(or 1)

The same error appears no matter what I put in DISPLAY

Hi,
There is an identical C sample in

/opt/nvidia/deepstream/deepstream-5.1/sources/apps/sample_apps/deepstream-test1

Please check if you can run it. Or try deepstream-app. We are able to run the samples successfully. A bit strange you hit the issue. Suggest try other samples.

Hello,
So like you said I tried to execute the test and it give me this error : One element could not be created. Exiting.
With some debugg I discovered that this line cause the issue :
streammux = gst_element_factory_make (“nvstreammux”, “stream-muxer”);

Hi,
Please clean cache for a try:

$ rm .cache/gstreamer-1.0/registry.aarch64.bin

If it still does not work, we suggest re-flash the system and re-install DeepStream SDK. The default samples should work fine. You would need to have a valid system to run the default samples without any issue.

Hello,
So like you said I have deleted the file and the I reflash and re-install deepstream but it still didn’t work…

Update :
After launching directly on the jetson nano and not passing via ssh. It finally works !

So after some more test. The c sample works but the python not. For example this is the error I get from deepstream_test_1.py :
python3 deepstream_test_1.py /opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample_720p.h264
Creating Pipeline

Creating Source

Creating H264Parser

Creating Decoder

Creating EGLSink

Playing file /opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample_720p.h264
Adding elements to Pipeline

Linking elements in the Pipeline

Starting pipeline

Using winsys: x11
Opening in BLOCKING MODE
Opening in BLOCKING MODE
ERROR: Deserialize engine failed because file path: /home/jet/Desktop/deepstream_python_apps/apps/deepstream-test1/…/…/…/…/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine open error
0:00:06.079083418 7836 0x34e6c30 WARN nvinfer gstnvinfer.cpp:616:gst_nvinfer_logger: NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1691> [UID = 1]: deserialize engine from file :/home/jet/Desktop/deepstream_python_apps/apps/deepstream-test1/…/…/…/…/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine failed
0:00:06.079180346 7836 0x34e6c30 WARN nvinfer gstnvinfer.cpp:616:gst_nvinfer_logger: NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:1798> [UID = 1]: deserialize backend context from engine from file :/home/jet/Desktop/deepstream_python_apps/apps/deepstream-test1/…/…/…/…/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine failed, try rebuild
0:00:06.079214930 7836 0x34e6c30 INFO nvinfer gstnvinfer.cpp:619:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1716> [UID = 1]: Trying to create engine from model files
ERROR: Cannot access prototxt file ‘/home/jet/Desktop/deepstream_python_apps/apps/deepstream-test1/…/…/…/…/samples/models/Primary_Detector/resnet10.prototxt’
ERROR: failed to build network since parsing model errors.
ERROR: failed to build network.
0:00:06.079483266 7836 0x34e6c30 ERROR nvinfer gstnvinfer.cpp:613:gst_nvinfer_logger: NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1736> [UID = 1]: build engine file failed
0:00:06.079516860 7836 0x34e6c30 ERROR nvinfer gstnvinfer.cpp:613:gst_nvinfer_logger: NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:1822> [UID = 1]: build backend context failed
0:00:06.079545975 7836 0x34e6c30 ERROR nvinfer gstnvinfer.cpp:613:gst_nvinfer_logger: NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::initialize() <nvdsinfer_context_impl.cpp:1149> [UID = 1]: generate backend failed, check config file settings
0:00:06.079588215 7836 0x34e6c30 WARN nvinfer gstnvinfer.cpp:812:gst_nvinfer_start: error: Failed to create NvDsInferContext instance
0:00:06.079611653 7836 0x34e6c30 WARN nvinfer gstnvinfer.cpp:812:gst_nvinfer_start: error: Config file path: dstest1_pgie_config.txt, NvDsInfer Error: NVDSINFER_CONFIG_FAILED
Error: gst-resource-error-quark: Failed to create NvDsInferContext instance (1): /dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvinfer/gstnvinfer.cpp(812): gst_nvinfer_start (): /GstPipeline:pipeline0/GstNvInfer:primary-inference:
Config file path: dstest1_pgie_config.txt, NvDsInfer Error: NVDSINFER_CONFIG_FAILED

Hi,
Please put the samples at

/opt/nvidia/deepstream/deepstream-5.1/sources/deepstream_python_apps

Looks like the path to model is not correct. Putting here should get correct path.

Thank you so much it finally works !!! To sum up the issue was that the python example was not in the right directory and that you can’t use ssh -Y to launch the test. Is that will be available in the future ? Because it’s a bit annoying…

Hi,
We have put it in the guidance. Please check
deepstream_python_apps/HOWTO.md at master · NVIDIA-AI-IOT/deepstream_python_apps · GitHub