ml6team / deepstream-python

NVIDIA Deepstream 6.1 Python boilerplate
MIT License
130 stars 36 forks source link

ERROR:app.pipeline.Pipeline:Unable to create Encoder #11

Closed Kracozebr closed 1 year ago

Kracozebr commented 1 year ago

First of all, thanks for the work, I'm trying to work with your code with ds 6.1.1. that I run from docker container created from nvcr.io/nvidia/deepstream:6.1.1-triton
When the output is rtsp it works properly, when I try to write mp4 files it does not work:

INFO:app.pipeline.Pipeline:Creating Encoder
ERROR:app.pipeline.Pipeline:Unable to create Encoder
ERROR:app.pipeline.Pipeline: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 "run.py", line 10, in <module>
    run_pipeline(args.source_uri)
  File "/root/deepstream-python/deepstream/app/core.py", line 11, in run_pipeline
    pipeline = Pipeline(
  File "/root/deepstream-python/deepstream/app/pipeline.py", line 106, in __init__
    self._create_elements()
  File "/root/deepstream-python/deepstream/app/pipeline.py", line 357, in _create_elements
    self.sink_bin = self._create_mp4_sink_bin()
  File "/root/deepstream-python/deepstream/app/pipeline.py", line 266, in _create_mp4_sink_bin
    encoder.set_property("bitrate", 33000000)
AttributeError: 'NoneType' object has no attribute 'set_property'

The error is not explicit, I think that I miss some codec or smth like that in my container, may be you can point thai I miss

julestalloen commented 1 year ago

Have you tried the suggested action in the error message?

Preload the offending library: export LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libgomp.so.1

This env var should be set in the container before starting the pipeline.

Kracozebr commented 1 year ago

This is for jetson devices, as you can see from path aarch64-linux-gnu/ but I'm working at x_86 machine

julestalloen commented 1 year ago

avenc_mpeg4 seems to be causing issues. Can you check if it is present inside the container you're using?

gst-inspect-1.0 avenc_mpeg4

Kracozebr commented 1 year ago

I started with your container and modified it for my proposes and it works