Encode multiple RTSP sinks fails

Hi.

I am trying to process 8 RTSP feeds, with a GIE, SGIE and tracker. Initially I tried to publish the results in a single stream using the tiler plugin, but that caused me some trouble (couldn’t get the source_id to send it via msg broker (using test5 app as base), as the tiler merges the stream into one and I got always 0 as my source_id.

So I tried a different approach, which is to disable the tiler and try to encode every output stream in a separate sink, using RTSP out (type=4). This works for 3 simultaneous streams, but as soon as I add the 4th sink my app crashes saying it couldn’t init the hardware encoder. Maybe there is a resources limit or something, but the stacktrace is not helpful to know what is happening. I tried GST_DEBUG=4, no additional useful information.

The error trace:

`ERROR from sink_sub_bin_encoder4: Device ‘/dev/nvhost-msenc’ failed during initialization
Debug info: gstv4l2object.c(4070): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline/GstBin:processing_bin_1/GstBin:sink_bin/GstBin:sink_sub_bin4/nvv4l2h264enc:sink_sub_bin_encoder4:
Call to S_FMT failed for YM12 @ 1920x1080: Unknown error -1
*** INFO: <bus_callback:167>: Pipeline running*

Quitting
ERROR from sink_sub_bin_encoder2: Device ‘/dev/nvhost-msenc’ failed during initialization
Debug info: gstv4l2object.c(4070): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline/GstBin:processing_bin_0/GstBin:sink_bin/GstBin:sink_sub_bin2/nvv4l2h264enc:sink_sub_bin_encoder2:
`
I tried to limit the width/height of the output stream in each sink, but the problem persists, as soon as I enable a 4th RTSP out sink the app crashes. It works if I set the enc-type to 0 (CPU) to the 4th to 8th sink, but then it consumes too many resources.

Am I doing something wrong? Thanks in advance.

• Hardware Platform (Jetson / GPU) NVIDIA RTX2080Ti
• DeepStream Version 5.0 (using NVIDIA NGC 20.07)
• JetPack Version (valid for Jetson only) N/A
• TensorRT Version N/A
• NVIDIA GPU Driver Version (valid for GPU only) 450.66

Unfortunately, the RTX2080Ti can only support at most 3 streams hardware encoding, it is hardware limitation.

You can use software encoding instead.

1 Like