Unable to use OSD with Deepstream on Jetson Xavier NX

• Hardware Platform: Jetson Xavier NX
• DeepStream Version: 6.3
• JetPack Version: 5.1.2-b104

• TensorRT and CUDA Version:

  dpkg -l | grep nvinfer
  ii  libnvinfer-bin                             8.5.2-1+cuda11.4                     arm64        TensorRT binaries
  ii  libnvinfer-dev                             8.5.2-1+cuda11.4                     arm64        TensorRT development libraries and headers
  ii  libnvinfer-plugin-dev                      8.5.2-1+cuda11.4                     arm64        TensorRT plugin libraries
  ii  libnvinfer-plugin8                         8.5.2-1+cuda11.4                     arm64        TensorRT plugin libraries
  ii  libnvinfer-samples                         8.5.2-1+cuda11.4                     all          TensorRT samples
  ii  libnvinfer8                                8.5.2-1+cuda11.4                     arm64        TensorRT runtime libraries
  ii  python3-libnvinfer                         8.5.2-1+cuda11.4                     arm64        Python 3 bindings for TensorRT
  ii  python3-libnvinfer-dev                     8.5.2-1+cuda11.4                     arm64        Python 3 development package for TensorRT

Hello, my application is running fine, except deepstream crashes when trying to launch with OSD enabled. This is the error log:

** ERROR: <create_osd_bin:72>: Failed to create ‘nvosd0’
** ERROR: <create_osd_bin:116>: create_osd_bin failed
** ERROR: <create_processing_instance:419>: create_processing_instance failed
** ERROR: <create_pipeline:1009>: create_pipeline failed

Output from gst-inspect-1.0 /usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_osd.so :

Plugin Details:
Name nvdsgst_osd
Description Gstreamer plugin to draw rectangles and text
Filename /usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_osd.so
Version 6.3.0
License Proprietary
Source module nvdsosd
Binary package GStreamer nvosd Plugin
Origin URL http://nvidia.com/

nvdsosd: NvDsOsd plugin

1 features:
±- 1 elements

I am not sure if I need to replace the osd library with another version or even use another deepstream version. Something of note is that another Jetson Xavier device with jetpack version: 5.1.3-b29 has the same issue where OSD does not work. However, one of our Jetson Orin devices is on jetpack version: 5.0.2-b231 and deepstream 6.1 and OSD works without any issue.

I have already attempted using the OSD library from the Orin on the Xavier, but this doesn’t work.

Not sure what happened. I suspect it is caused by gstreamer cache. Please try the following command line first.

sudo /opt/nvidia/deepstream/deepstream/install.sh 

Still getting the same error unfortunately.

I think JP-5.1.2 + DS-6.3 should work fine

Can you get the output from the following command?

gst-inspect-1.0 nvdsosd

Then try the following command, I suspect your system is missing some libraries

ldd /usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_osd.so

Output of gst-inspect-1.0 nvdsosd :

Factory Details:
Rank primary (256)
Long-name NvDsOsd plugin
Klass NvDsOsd functionality
Description Gstreamer bounding box draw element
Author NVIDIA Corporation. Post on Deepstream for Tesla forum for any queries @ DeepStream SDK - NVIDIA Developer Forums

Plugin Details:
Name nvdsgst_osd
Description Gstreamer plugin to draw rectangles and text
Filename /usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_osd.so
Version 6.3.0
License Proprietary
Source module nvdsosd
Binary package GStreamer nvosd Plugin
Origin URL http://nvidia.com/

GObject
±—GInitiallyUnowned
±—GstObject
±—GstElement
±—GstBaseTransform
±—GstNvDsOsd

Pad Templates:
SRC template: ‘src’
Availability: Always
Capabilities:
video/x-raw(memory:NVMM)
format: { (string)NV12, (string)RGBA }
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]

SINK template: ‘sink’
Availability: Always
Capabilities:
video/x-raw(memory:NVMM)
format: { (string)NV12, (string)RGBA }
width: [ 1, 2147483647 ]
height: [ 1, 2147483647 ]
framerate: [ 0/1, 2147483647/1 ]

Element has no clocking capabilities.
Element has no URI handling capabilities.

Pads:
SINK: ‘sink’
Pad Template: ‘sink’
SRC: ‘src’
:

Output of ldd /usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_osd.so :

    linux-vdso.so.1 (0x0000ffff8d764000)
    libgstbase-1.0.so.0 => /lib/aarch64-linux-gnu/libgstbase-1.0.so.0 (0x0000ffff8d5cf000)
    libgstreamer-1.0.so.0 => /lib/aarch64-linux-gnu/libgstreamer-1.0.so.0 (0x0000ffff8d473000)
    libglib-2.0.so.0 => /lib/aarch64-linux-gnu/libglib-2.0.so.0 (0x0000ffff8d338000)
    libgobject-2.0.so.0 => /lib/aarch64-linux-gnu/libgobject-2.0.so.0 (0x0000ffff8d2c6000)
    libnvds_osd.so (0x0000ffff8d101000)
    libnvdsgst_meta.so => /opt/nvidia/deepstream/deepstream-6.3/lib/libnvdsgst_meta.so (0x0000ffff8d0eb000)
    libnvdsgst_customhelper.so => /opt/nvidia/deepstream/deepstream-6.3/lib/libnvdsgst_customhelper.so (0x0000ffff8d0d2000)
    libdl.so.2 => /lib/aarch64-linux-gnu/libdl.so.2 (0x0000ffff8d0be000)
    libpthread.so.0 => /lib/aarch64-linux-gnu/libpthread.so.0 (0x0000ffff8d08d000)
    librt.so.1 => /lib/aarch64-linux-gnu/librt.so.1 (0x0000ffff8d075000)
    libc.so.6 => /lib/aarch64-linux-gnu/libc.so.6 (0x0000ffff8cf02000)
    /lib/ld-linux-aarch64.so.1 (0x0000ffff8d734000)
    libgmodule-2.0.so.0 => /lib/aarch64-linux-gnu/libgmodule-2.0.so.0 (0x0000ffff8ceee000)
    libm.so.6 => /lib/aarch64-linux-gnu/libm.so.6 (0x0000ffff8ce43000)
    libpcre.so.3 => /lib/aarch64-linux-gnu/libpcre.so.3 (0x0000ffff8cdd1000)
    libffi.so.7 => /lib/aarch64-linux-gnu/libffi.so.7 (0x0000ffff8cdb8000)
    libcairo.so.2 => /lib/aarch64-linux-gnu/libcairo.so.2 (0x0000ffff8cc9a000)
    libpango-1.0.so.0 => /lib/aarch64-linux-gnu/libpango-1.0.so.0 (0x0000ffff8cc3e000)
    libpangocairo-1.0.so.0 => /lib/aarch64-linux-gnu/libpangocairo-1.0.so.0 (0x0000ffff8cc20000)
    libnvbufsurface.so.1.0.0 => /usr/lib/aarch64-linux-gnu/tegra/libnvbufsurface.so.1.0.0 (0x0000ffff8cb65000)
    libnvds_utils.so => /opt/nvidia/deepstream/deepstream-6.3/lib/libnvds_utils.so (0x0000ffff8c55b000)
    libcuda.so.1 => /usr/lib/aarch64-linux-gnu/tegra/libcuda.so.1 (0x0000ffff8af04000)
    libstdc++.so.6 => /lib/aarch64-linux-gnu/libstdc++.so.6 (0x0000ffff8ad1f000)
    libnvds_meta.so => /opt/nvidia/deepstream/deepstream-6.3/lib/libnvds_meta.so (0x0000ffff8ad08000)
    libnvdsgst_helper.so => /opt/nvidia/deepstream/deepstream-6.3/lib/libnvdsgst_helper.so (0x0000ffff8acf0000)
    libpixman-1.so.0 => /lib/aarch64-linux-gnu/libpixman-1.so.0 (0x0000ffff8ac81000)
    libfontconfig.so.1 => /lib/aarch64-linux-gnu/libfontconfig.so.1 (0x0000ffff8ac2c000)
    libfreetype.so.6 => /lib/aarch64-linux-gnu/libfreetype.so.6 (0x0000ffff8ab6d000)
    libpng16.so.16 => /lib/aarch64-linux-gnu/libpng16.so.16 (0x0000ffff8ab29000)
    libxcb-shm.so.0 => /lib/aarch64-linux-gnu/libxcb-shm.so.0 (0x0000ffff8ab16000)
    libxcb.so.1 => /lib/aarch64-linux-gnu/libxcb.so.1 (0x0000ffff8aadf000)
    libxcb-render.so.0 => /lib/aarch64-linux-gnu/libxcb-render.so.0 (0x0000ffff8aac1000)
    libXrender.so.1 => /lib/aarch64-linux-gnu/libXrender.so.1 (0x0000ffff8aaa8000)
    libX11.so.6 => /lib/aarch64-linux-gnu/libX11.so.6 (0x0000ffff8a963000)
    libXext.so.6 => /lib/aarch64-linux-gnu/libXext.so.6 (0x0000ffff8a93e000)
    libz.so.1 => /lib/aarch64-linux-gnu/libz.so.1 (0x0000ffff8a914000)
    libfribidi.so.0 => /lib/aarch64-linux-gnu/libfribidi.so.0 (0x0000ffff8a8e9000)
    libthai.so.0 => /lib/aarch64-linux-gnu/libthai.so.0 (0x0000ffff8a8d0000)
    libharfbuzz.so.0 => /lib/aarch64-linux-gnu/libharfbuzz.so.0 (0x0000ffff8a7d1000)
    libpangoft2-1.0.so.0 => /lib/aarch64-linux-gnu/libpangoft2-1.0.so.0 (0x0000ffff8a7aa000)
    libnvrm_mem.so => /usr/lib/aarch64-linux-gnu/tegra/libnvrm_mem.so (0x0000ffff8a792000)
    libnvrm_surface.so => /usr/lib/aarch64-linux-gnu/tegra/libnvrm_surface.so (0x0000ffff8a75c000)
    libnvrm_chip.so => /usr/lib/aarch64-linux-gnu/tegra/libnvrm_chip.so (0x0000ffff8a748000)
    libEGL.so.1 => /lib/aarch64-linux-gnu/libEGL.so.1 (0x0000ffff8a724000)
    libnvos.so => /usr/lib/aarch64-linux-gnu/tegra/libnvos.so (0x0000ffff8a702000)
    libnvbuf_fdmap.so.1.0.0 => /usr/lib/aarch64-linux-gnu/tegra/libnvbuf_fdmap.so.1.0.0 (0x0000ffff8a6ef000)
    libnvinfer.so.8 => /lib/aarch64-linux-gnu/libnvinfer.so.8 (0x0000ffff7d596000)
    libgcc_s.so.1 => /lib/aarch64-linux-gnu/libgcc_s.so.1 (0x0000ffff7d572000)
    libnvrm_gpu.so => /usr/lib/aarch64-linux-gnu/tegra/libnvrm_gpu.so (0x0000ffff7d505000)
    libnvrm_sync.so => /usr/lib/aarch64-linux-gnu/tegra/libnvrm_sync.so (0x0000ffff7d4ec000)
    libnvrm_host1x.so => /usr/lib/aarch64-linux-gnu/tegra/libnvrm_host1x.so (0x0000ffff7d4cb000)
    libgstrtp-1.0.so.0 => /lib/aarch64-linux-gnu/libgstrtp-1.0.so.0 (0x0000ffff7d495000)
    libexpat.so.1 => /lib/aarch64-linux-gnu/libexpat.so.1 (0x0000ffff7d45e000)
    libuuid.so.1 => /lib/aarch64-linux-gnu/libuuid.so.1 (0x0000ffff7d447000)
    libXau.so.6 => /lib/aarch64-linux-gnu/libXau.so.6 (0x0000ffff7d431000)
    libXdmcp.so.6 => /lib/aarch64-linux-gnu/libXdmcp.so.6 (0x0000ffff7d41b000)
    libdatrie.so.1 => /lib/aarch64-linux-gnu/libdatrie.so.1 (0x0000ffff7d403000)
    libgraphite2.so.3 => /lib/aarch64-linux-gnu/libgraphite2.so.3 (0x0000ffff7d3d1000)
    libnvsciipc.so => /usr/lib/aarch64-linux-gnu/tegra/libnvsciipc.so (0x0000ffff7d3ac000)
    libnvsocsys.so => /usr/lib/aarch64-linux-gnu/tegra/libnvsocsys.so (0x0000ffff7d396000)
    libGLdispatch.so.0 => /lib/aarch64-linux-gnu/libGLdispatch.so.0 (0x0000ffff7d20b000)
    libnvdla_compiler.so => /usr/lib/aarch64-linux-gnu/tegra/libnvdla_compiler.so (0x0000ffff7cad0000)
    libcudla.so.1 => /usr/local/cuda-11.4/lib64/libcudla.so.1 (0x0000ffff7ca93000)
    libbsd.so.0 => /lib/aarch64-linux-gnu/libbsd.so.0 (0x0000ffff7ca6a000)
    libnvdla_runtime.so => /usr/lib/aarch64-linux-gnu/tegra/libnvdla_runtime.so (0x0000ffff7c412000)

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

It looks like your system is missing some libraries.
Is libnvds_osd.so in the /opt/nvidia/deepstream/deepstream/lib/directory?

If so, try export LD_LIBRARY_PATH=/opt/nvidia/deepstream/deepstream/lib/

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