Error runing basic python examples

Please provide complete information as applicable to your setup.

**• Hardware Platform (x86) Dell g3 Nvidia GeForce GTX 1650
**• DeepStream Version 6.2
**• CUDA 11.08
• TensorRT Version 8.5.2.2
**• NVIDIA GPU Driver Version (valid for GPU only) 525.85.12

I am trying to run the basic example deepstream-test1-usbcam and i get the followiing error message:

$ python3 deepstream_test_1_usb.py /dev/video

0:00:03.170910368 11645 0x174c6a0 WARN nvinfer gstnvinfer.cpp:2369:gst_nvinfer_output_loop: error: Internal data stream error.
0:00:03.170932035 11645 0x174c6a0 WARN nvinfer gstnvinfer.cpp:2369:gst_nvinfer_output_loop: error: streaming stopped, reason not-negotiated (-4)
Error: gst-stream-error-quark: Internal data stream error. (1): gstnvinfer.cpp(2369): gst_nvinfer_output_loop (): /GstPipeline:pipeline0/GstNvInfer:primary-inference:
streaming stopped, reason not-negotiated (-4)


The complete program output is:

Creating Pipeline

Creating Source

Creating Video Converter

Creating EGLSink

Playing cam /dev/video0
Adding elements to Pipeline

Linking elements in the Pipeline

Starting pipeline

0:00:00.355302967 11645 0x2673070 WARN nvinfer gstnvinfer.cpp:677:gst_nvinfer_logger: 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]: CUDA lazy loading is not enabled. Enabling it can significantly reduce device memory usage. See CUDA_MODULE_LOADING in CUDA C++ Programming Guide
WARNING: [TRT]: CUDA lazy loading is not enabled. Enabling it can significantly reduce device memory usage. See CUDA_MODULE_LOADING in CUDA C++ Programming Guide
0:00:02.781533610 11645 0x2673070 INFO nvinfer gstnvinfer.cpp:680:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1909> [UID = 1]: deserialized trt engine from :/opt/nvidia/deepstream/deepstream-6.2/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine
INFO: …/nvdsinfer/nvdsinfer_model_builder.cpp:610 [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:02.814658397 11645 0x2673070 INFO nvinfer gstnvinfer.cpp:680:gst_nvinfer_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2012> [UID = 1]: Use deserialized engine model: /opt/nvidia/deepstream/deepstream-6.2/samples/models/Primary_Detector/resnet10.caffemodel_b1_gpu0_int8.engine
0:00:02.816574132 11645 0x2673070 INFO nvinfer gstnvinfer_impl.cpp:328:notifyLoadModelStatus: [UID 1]: Load new model:dstest1_pgie_config.txt sucessfully
cuGraphicsGLRegisterBuffer failed with error(219) gst_eglglessink_cuda_init texture = 1
Frame Number=0 Number of Objects=0 Vehicle_count=0 Person_count=0
0:00:03.170910368 11645 0x174c6a0 WARN nvinfer gstnvinfer.cpp:2369:gst_nvinfer_output_loop: error: Internal data stream error.
0:00:03.170932035 11645 0x174c6a0 WARN nvinfer gstnvinfer.cpp:2369:gst_nvinfer_output_loop: error: streaming stopped, reason not-negotiated (-4)
Error: gst-stream-error-quark: Internal data stream error. (1): gstnvinfer.cpp(2369): gst_nvinfer_output_loop (): /GstPipeline:pipeline0/GstNvInfer:primary-inference:
streaming stopped, reason not-negotiated (-4)


I was trying changing the sink for a fakesink and i can see that the camera is activated and the inference is working for the first frame:

streaming stopped, reason not-negotiated (-4)
Frame Number=1 Number of Objects=1 Vehicle_count=0 Person_count=1
But the error continue.

Did you check video0?

Sorry, I really tried with /dev/video0, it was a transcription mistake.

From your log, It seems like a display env error.

cuGraphicsGLRegisterBuffer failed with error(219) gst_eglglessink_cuda_init texture = 1

About the fakesink, how do you modify the source code?

sink = Gst.ElementFactory.make("nveglglessink", "nvvideo-renderer")-->sink = Gst.ElementFactory.make("fakesink", "nvvideo-renderer")

Hi, I did’nt modify de code. I tried to replicate de pipeline with gst-launch-1.0

Could you attach your gst-launch-1.0 pipeline?
Also could you try to change the source code and run it?
Just change the sink = Gst.ElementFactory.make("nveglglessink", "nvvideo-renderer") to sink = Gst.ElementFactory.make("fakesink", "nvvideo-renderer").

Hi, the problem was that I was using gst from a container. Please close thus case. Thanks!

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