Unable to create Encoder in deepstream-ssd-parser

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) Gpu: 1050Ti
• DeepStream Version; 6.1
• JetPack Version (valid for Jetson only): None
• TensorRT Version: 8.4.3.1
• NVIDIA GPU Driver Version (valid for GPU only) CUDA12: Driver: 525.60.13
• Issue Type( questions, new requirements, bugs): bug
**• How to reproduce the issue ?

I build deepstream python from deeptream-triton docker

FROM nvcr.io/nvidia/deepstream:6.1.1-triton

# To get video driver libraries at runtime (libnvidia-encode.so/libnvcuvid.so)
ENV NVIDIA_DRIVER_CAPABILITIES $NVIDIA_DRIVER_CAPABILITIES,video

ARG DEBIAN_FRONTEND=noninteractive

# Install pkg config to find ffmpeg
RUN apt-get update -qq  && apt-get install -y autoconf \
    automake \
    build-essential \
    git-core \
    libass-dev \
    libfreetype6-dev \
    libgnutls28-dev \
    libmp3lame-dev \
    libsdl2-dev \
    libtool \
    libva-dev \
    libvdpau-dev \
    libvorbis-dev \
    libxcb1-dev \
    libxcb-shm0-dev \
    libxcb-xfixes0-dev \
    meson \
    ninja-build \
    pkg-config \
    texinfo \
    wget \
    yasm \
    zlib1g-dev \
    libc6-dev \
    unzip \
    libnuma1 \
    libnuma-dev

# For decode, install ffmpeg https://pytorch.org/audio/main/hw_acceleration_tutorial.html
WORKDIR /usr/lib/x86_64-linux-gnu
RUN ln -sf libnvcuvid.so.1 libnvcuvid.so

# Install https://github.com/NVIDIA-AI-IOT/deepstream_python_apps/tree/master/bindings
WORKDIR /opt/
RUN git clone https://github.com/NVIDIA-AI-IOT/deepstream_python_apps.git
WORKDIR /opt/deepstream_python_apps
RUN apt install -y python3-gi python3-dev python3-gst-1.0 python-gi-dev git python-dev \
    python3 python3-pip python3.8-dev cmake g++ build-essential libglib2.0-dev \
    libglib2.0-dev-bin libgstreamer1.0-dev libtool m4 autoconf automake libgirepository1.0-dev libcairo2-dev
RUN git submodule update --init
RUN apt-get install -y apt-transport-https ca-certificates -y
RUN update-ca-certificates
WORKDIR /opt/deepstream_python_apps/3rdparty/pybind11
RUN python3 setup.py install
WORKDIR /opt/deepstream_python_apps/3rdparty/gst-python/
RUN ./autogen.sh && make && make install
WORKDIR /opt/deepstream_python_apps/bindings/build/
RUN cmake .. && make && pip3 install *.whl

WORKDIR /workspace/

Then I run

python deepstream_ssd_parser.py bikes.mp4

from deepstream-ssd-parser

Which create error:

Creating Pipeline 
 
Creating Source
Creating H264Parser
Creating Decoder
Creating NvStreamMux
Creating Nvinferserver
Creating Nvvidconv
Creating OSD (nvosd)
Creating Queue
Creating Converter 2 (nvvidconv2)
Creating capsfilter
Creating Encoder
Unable to create Encoder 
If the following error is encountered:
/usr/lib/aarch64-linux-gnu/libgomp.so.1: cannot allocate memory in static TLS block
Preload the offending library:
export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libgomp.so.1
Traceback (most recent call last):
  File "deepstream_ssd_parser.py", line 456, in <module>
    sys.exit(main(sys.argv))
  File "deepstream_ssd_parser.py", line 361, in main
    encoder.set_property("bitrate", 2000000)
AttributeError: 'NoneType' object has no attribute 'set_property'

I don’t’ find any libgomp.so.1 in /usr/lib/aarch64-linux-gnu/ but I found libgomp.so in /usr/lib/gcc/x86_64-linux-gnu/9/ so I export:

export LD_PRELOAD=/usr/lib/gcc/x86_64-linux-gnu/9/libgomp.so

What should I do to fix this error?

If the following error is encountered:
/usr/lib/aarch64-linux-gnu/libgomp.so.1: cannot allocate memory in static TLS block
Preload the offending library:
export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libgomp.so.1

This is a reminder for users on Jetson, please check the source code on line 253 preload_reminder.

Plugin vavenc_mpeg4 is not installed yet, thus not able to set bitrate on it. Please execute /opt/nvidia/deepstream/deepstream-6.1/user_additional_install.sh to install the necessary plugins.

The source file should be an h264 stream, mp4 container cannot be used in this sample.

1 Like

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