Why is the created decoder is none?

Why is the created decoder is none? Why is the created h264parser is not none? and the created streammux is also none? What wrong with my envs? It is the sample of deepstream_test_1.py.


print(“Creating H264Parser \n”)
h264parser = Gst.ElementFactory.make(“h264parse”, “h264-parser”)
if not h264parser:
sys.stderr.write(" Unable to create h264 parser \n")

# Use nvdec_h264 for hardware accelerated decode on GPU
print("Creating Decoder \n")
decoder = Gst.ElementFactory.make("nvv4l2decoder", "nvv4l2-decoder")
if not decoder:
    sys.stderr.write(" Unable to create Nvv4l2 Decoder \n")

# Create nvstreammux instance to form batches from one or more sources.
streammux = Gst.ElementFactory.make("nvstreammux", "Stream-muxer")
if not streammux:
    sys.stderr.write(" Unable to create NvStreamMux \n")

Please use “gst-inspect-1.0 nvstreammux” command to check whether your deepstream SDK is installed correctly.

1 Like

The deepstream SDK should have been installed correctly because:
(1) in the same sample, I can create the source and h264parser elements which are not none. But the following elements are none, such as decoder and streammux.

source = Gst.ElementFactory.make("filesrc", "file-source")
if not source:
    sys.stderr.write(" Unable to create Source \n")

# Since the data format in the input file is elementary h264 stream,
# we need a h264parser
print("Creating H264Parser \n")
h264parser = Gst.ElementFactory.make("h264parse", "h264-parser")

(2) I can get the inform after reinstalling the deepstream SDK.
deepstream-app version 5.1.0
DeepStreamSDK 5.1.0
CUDA Driver Version: 11.3
CUDA Runtime Version: 11.3
TensorRT Version: 7.2
cuDNN Version: 8.2
Dewarper: not found

Thank you for your reply. But I cannot step forward because the decoder is none.

If I conduct the c sample, deepstream-test1, it reply that:

One element could not be created. Exiting.

What wrong with it?

h264parse is public gstreamer plugin h264parse: GStreamer Bad Plugins 1.0 Plugins Reference Manual, but not deepstream plugin. Please refer to Gst-nvinfer — DeepStream 5.1 Release documentation for deepstream plugins.

If the deepstream element can not be created correctly, the SDK is not installed correctly. Please use “gst-launch-1.0 nvstreammux” command to check whether the SDK is installed correctly.

I had installed the deepstream SDK step by step according to the document. But it seems the SDK is not installed correctly. I conducted “gst-launch-1.0 nvstreammux” command twice as following:

(deepstreamer) lshome@lshome:~/deepstream-5.1$ gst-launch-1.0 nvstreammux

*(gst-plugin-scanner:13952): GStreamer-WARNING *: 23:05:20.235: Failed to load plugin ‘/opt/intel/openvino_2021/data_processing/gstreamer/lib/gstreamer-1.0/libgstdirectfb.so’: libdirectfb-1.7.so.7: cannot open shared object file: No such file or directory

*(gst-plugin-scanner:13952): GStreamer-WARNING *: 23:05:20.285: Failed to load plugin ‘/opt/intel/openvino_2021/data_processing/gstreamer/lib/gstreamer-1.0/libgstneonhttpsrc.so’: libneon.so.27: cannot open shared object file: No such file or directory
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0
DRM_IOCTL_I915_GEM_APERTURE failed: Invalid argument
Assuming 131072kB available aperture size.
May lead to reduced performance or incorrect rendering.
get chip id failed: -1 [22]
param: 4, val: 0

*(gst-plugin-scanner:13952): GStreamer-WARNING *: 23:05:20.693: Failed to load plugin ‘/opt/intel/openvino_2021/data_processing/gstreamer/lib/gstreamer-1.0/libgstladspa.so’: liblrdf.so.0: cannot open shared object file: No such file or directory

*(gst-plugin-scanner:13952): GStreamer-WARNING *: 23:05:20.718: Failed to load plugin ‘/opt/intel/openvino_2021/data_processing/gstreamer/lib/gstreamer-1.0/libgstopenni2.so’: libOpenNI2.so.0: cannot open shared object file: No such file or directory

*(gst-plugin-scanner:13952): GStreamer-WARNING *: 23:05:20.728: Failed to load plugin ‘/opt/intel/openvino_2021/data_processing/gstreamer/lib/gstreamer-1.0/libgstfdkaac.so’: libfdk-aac.so.1: cannot open shared object file: No such file or directory

*(gst-plugin-scanner:13952): GStreamer-WARNING *: 23:05:20.750: Failed to load plugin ‘/opt/intel/openvino_2021/data_processing/gstreamer/lib/gstreamer-1.0/libgstfaac.so’: libfaac.so.0: cannot open shared object file: No such file or directory

*(gst-plugin-scanner:13952): GStreamer-WARNING *: 23:05:20.769: Failed to load plugin ‘/home/lshome/.conda/envs/deepstreamer/lib/gstreamer-1.0/libgstopengl.so’: /home/lshome/.conda/envs/deepstreamer/lib/gstreamer-1.0/…/libgstgl-1.0.so.0: undefined symbol: gst_video_meta_set_alignment
错误: 无法创建管道: 无组件“nvstreammux”。
(deepstreamer) lshome@lshome:~/deepstream-5.1$ gst-launch-1.0 nvstreammux
错误: 无法创建管道: 无组件“nvstreammux”。

What wrong with it? How fo fix it?

On another computer, I can create decoder, streammux, and so on, but can not create pgie and nvosd. They are all none. How to install, find and add these plugin in the program?

pgie = Gst.ElementFactory.make(“nvinfer”, “primary-inference”)
nvosd = Gst.ElementFactory.make(“nvdsosd”, “onscreendisplay”)

What is your platform?
Please provide the information

**• Hardware Platform (Jetson / GPU)**
**• DeepStream Version**
**• JetPack Version (valid for Jetson only)**
**• TensorRT Version**
**• NVIDIA GPU Driver Version (valid for GPU only)**

uubuntu18.08
1080Ti
deepstream-app version 5.1.0
DeepStreamSDK 5.1.0
CUDA Driver Version: 11.3
CUDA Runtime Version: 11.3
TensorRT Version: 7.2
cuDNN Version: 8.2
Dewarper: not found

From the log, the dpendencies are not installed correctly. E.G. DS5.1 only support ubuntu 18.04. Can you refer to the Quickstart Guide — DeepStream 5.1 Release documentation

It is ubuntu18.04. it is a misspelling. In fact, on another computer, I can create some nvidia plugin, such as decoder, streammux.

I test the docker of ds5.1.

Please check the compatibility. Quickstart Guide — DeepStream 5.1 Release documentation

The only reason for the element missing is the missing dependencies. You should make sure the platform and software are installed correctly. Please follow Quickstart Guide — DeepStream 5.1 Release documentation

I test the docker of ds5.1. Some plugin can not be used. It seems that some plugins are in the blacklist. The docker is just download without any change.

root@f59c71bca89b:/opt/nvidia/deepstream/deepstream_python_apps/apps/deepstream-test1# python3 deepstream_test_1.py /opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.h264
Creating Pipeline

Creating Source

Creating H264Parser

Creating Decoder

Unable to create NvStreamMux
Unable to create pgie
Unable to create nvvidconv
Creating EGLSink

Unable to create egl sink
Playing file /opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.h264
Traceback (most recent call last):
File “deepstream_test_1.py”, line 266, in
sys.exit(main(sys.argv))
File “deepstream_test_1.py”, line 199, in main
streammux.set_property(‘width’, 1920)
AttributeError: ‘NoneType’ object has no attribute ‘set_property’

Blacklisted files:
libnvdsgst_dewarper.so
libnvdsgst_eglglessink.so
libnvdsgst_tracker.so
libgstnvvideoconvert.so
libnvdsgst_inferserver.so
libnvdsgst_multistreamtiler.so
libnvdsgst_infer.so
libnvdsgst_multistream.so
libnvdsgst_dsexample.so

Total count: 9 blacklisted files

How to deal with it?

Which docker are you using?

The docker is
nvcr.io/nvidia/deepstream 5.1-21.02-samples 4edbe80901c3

  1. How to move plugin from the blacklist?
  2. How to add the plugins to the inspection whose .so file is in the lib?
  3. How to install a new plugin?

All plugins are already there. The blacklist means gstreamer can not find the dependencies of the plugins, so the plugins are put into blacklist.

You need to install all dependencies.

So you should check whether the GPU driver and other low level dependencies are correct.

Is you driver version * NVIDIA driver 460.32?

My Driver Version: 465.19.01

Can you run “nvcc -V” in your docker? What is the result?

Can you run “ldd /opt/nvidia/deepstream/deepstream-5.1/lib/gst-plugins/libnv
dsgst_multistream.so” in docker? What is the result?

Now I changed a docker, nvcr.io/nvidia/tlt-streamanalytics:v3.0-dp-py3. I can create the decoder, and the h264parser, the streammux. But I can not run the sample deepstream-opticalflow.py. It informed me that:

WARNING:root:kernel be408254-d236-4dc4-aae6-509b84b547a4 restarted
Device Number: 0
Device name: GeForce GTX 1080 Ti
Device Version 6.1
ERROR : Device Does NOT Supports Optical Flow Functionality

And I test these comand and find some errors:

nvcc -V
bash: nvcc: command not found

ldd /opt/nvidia/deepstream/deepstream-5.1/lib/gst-plugins/libnv
ldd: /opt/nvidia/deepstream/deepstream-5.1/lib/gst-plugins/libnv: No such file or directory

The docker has not cuda toolkit? Why is Device Version 6.1?