Deepstream error when RTSP sink is enabled

• Hardware Platform (Jetson / GPU)
Quadro RTX

**• Software Platform **
Kubernetes + nvcr.io/nvidia/deepstream:5.1-21.02-triton

**• SO **:
Ubuntu 18.04.5 LTS 4.15.0-142-generic

• DeepStream Version
5.1

• TensorRT Version
7.2.1-1

• NVIDIA GPU Driver Version (valid for GPU only)
460.56

• Issue Type( questions, new requirements, bugs)
Error using Triton inference server example with RTSP output.

**• How to reproduce the issue ? **
Run sample file source1_primary_detector with deepstream-app configured for RTSP output sink.
cd /opt/nvidia/deepstream/deepstream-5.1/samples/configs/deepstream-app-trtis

Edit top level file: source1_primary_detector.txt. Disable display and enable RTSP sink:
####
[sink0]
enable=0
#Type - 1=FakeSink 2=EglSink 3=File
type=2
sync=0
source-id=0
gpu-id=0
nvbuf-memory-type=0
[sink2]
enable=1
#Type - 4=RTSPStreaming
type=4
#1=h264
codec=1
sync=0
bitrate=4000000
rtsp-port=8554
udp-port=5400
####

Run the application:
GST_DEBUG=3
deepstream-app -c source1_primary_detector.txt

Output of the application:

ERROR from sink_sub_bin_encoder2: Device '/dev/nvhost-msenc' failed during initialization
Debug info: gstv4l2object.c(4074): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline/GstBin:processing_bin_0/GstBin:sink_bin/GstBin:sink_sub_bin2/nvv4l2h264enc:sink_sub_bin_encoder2:
Call to S_FMT failed for YM12 @ 1280x720: Unknown error -1
0:00:10.956441772  1817 0x7fd838073e80 WARN                 qtdemux qtdemux.c:3031:qtdemux_parse_trex:<qtdemux0> failed to find fragment defaults for stream 1
0:00:10.956629045  1817 0x7fd838073e80 WARN                 qtdemux qtdemux.c:3031:qtdemux_parse_trex:<qtdemux0> failed to find fragment defaults for stream 2
0:00:11.017683036  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:3038:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:11.017721836  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:2924:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe minimum capture size for pixelformat MJPG
0:00:11.017739474  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:3038:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:11.017760040  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:2930:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe maximum capture size for pixelformat MJPG
0:00:11.017822176  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:3038:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:11.017838314  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:2924:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe minimum capture size for pixelformat MPG4
0:00:11.017849271  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:3038:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:11.017861426  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:2930:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe maximum capture size for pixelformat MPG4
0:00:11.017885941  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:3038:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:11.017902016  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:2924:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe minimum capture size for pixelformat MPG2
0:00:11.017935986  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:3038:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:11.017951470  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:2930:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe maximum capture size for pixelformat MPG2
0:00:11.017977943  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:3038:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:11.017993503  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:2924:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe minimum capture size for pixelformat H265
0:00:11.018009286  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:3038:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:11.018024297  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:2930:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe maximum capture size for pixelformat H265
0:00:11.018047401  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:3038:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:11.018061733  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:2924:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe minimum capture size for pixelformat VP90
0:00:11.018074441  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:3038:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:11.018087821  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:2930:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe maximum capture size for pixelformat VP90
0:00:11.018110327  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:3038:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:11.018129007  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:2924:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe minimum capture size for pixelformat VP80
0:00:11.018141531  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:3038:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:11.018155687  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:2930:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe maximum capture size for pixelformat VP80
0:00:11.018180475  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:3038:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:11.018194577  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:2924:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe minimum capture size for pixelformat H264
0:00:11.018205527  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:3038:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:sink> Unable to try format: Unknown error -1
0:00:11.018217182  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:2930:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:sink> Could not probe maximum capture size for pixelformat H264
0:00:11.018319067  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:3038:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:src> Unable to try format: Unknown error -1
0:00:11.018336112  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:2924:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:src> Could not probe minimum capture size for pixelformat NM12
0:00:11.018348571  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:3038:gst_v4l2_object_get_nearest_size:<nvv4l2decoder0:src> Unable to try format: Unknown error -1
0:00:11.018363061  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:2930:gst_v4l2_object_probe_caps_for_format:<nvv4l2decoder0:src> Could not probe maximum capture size for pixelformat NM12
0:00:11.018383932  1817 0x7fd82c012ed0 WARN                    v4l2 gstv4l2object.c:2375:gst_v4l2_object_add_interlace_mode:0x7fd83001f010 Failed to determine interlace mode
0:00:11.018964335  1817 0x7fd82c012ed0 WARN                 default v4l2-utils.c:189:gst_v4l2_error:<nvv4l2decoder0> error: Device '/dev/nvidia0' failed during initialization
0:00:11.018987979  1817 0x7fd82c012ed0 WARN                 default v4l2-utils.c:192:gst_v4l2_error:<nvv4l2decoder0> error: Call to S_FMT failed for H264 @ 1920x1080: Unknown error -1
0:00:11.019036983  1817 0x7fd82c012ed0 WARN            videodecoder gstvideodecoder.c:732:gst_video_decoder_setcaps:<nvv4l2decoder0> Subclass refused caps
0:00:11.019057033  1817 0x7fd82c012ed0 WARN               decodebin gstdecodebin2.c:2524:connect_pad:<decodebin0> Couldn't set nvv4l2decoder0 to PAUSED
** INFO: <bus_callback:167>: Pipeline running

0:00:11.418015006  1817 0x55f63a420e30 WARN                 default v4l2-utils.c:189:gst_v4l2_error:<sink_sub_bin_encoder2> error: Device '/dev/nvhost-msenc' failed during initialization
0:00:11.418053932  1817 0x55f63a420e30 WARN                 default v4l2-utils.c:192:gst_v4l2_error:<sink_sub_bin_encoder2> error: Call to S_FMT failed for YM12 @ 1280x720: Unknown error -1
ERROR from sink_sub_bin_encoder2: Device '/dev/nvhost-msenc' failed during initialization
0:00:11.418156346  1817 0x55f63a420e30 WARN            videoencoder gstvideoencoder.c:678:gst_video_encoder_setcaps:<sink_sub_bin_encoder2> rejected caps video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, framerate=(fraction)30/1, batch-size=(int)1, num-surfaces-per-frame=(int)1, format=(string)I420
Debug info: gstv4l2object.c(4074): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline/GstBin:processing_bin_0/GstBin:sink_bin/GstBin:sink_sub_bin2/nvv4l2h264enc:sink_sub_bin_encoder2:
Call to S_FMT failed for YM12 @ 1280x720: Unknown error -1
0:00:11.418634592  1817 0x55f63a420e30 WARN                 default v4l2-utils.c:189:gst_v4l2_error:<sink_sub_bin_encoder2> error: Device '/dev/nvhost-msenc' failed during initialization
0:00:11.418654943  1817 0x55f63a420e30 WARN                 default v4l2-utils.c:192:gst_v4l2_error:<sink_sub_bin_encoder2> error: Call to S_FMT failed for YM12 @ 1280x720: Unknown error -1
ERROR from sink_sub_bin_encoder2: Device '/dev/nvhost-msenc' failed during initialization
Debug info: gstv4l2object.c(4074): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline/GstBin:processing_bin_0/GstBin:sink_bin/GstBin:sink_sub_bin2/nvv4l2h264enc:sink_sub_bin_encoder2:
Call to S_FMT failed for YM12 @ 1280x720: Unknown error -1
0:00:11.418728698  1817 0x55f63a420e30 WARN            videoencoder gstvideoencoder.c:678:gst_video_encoder_setcaps:<sink_sub_bin_encoder2> rejected caps video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, framerate=(fraction)30/1, batch-size=(int)1, num-surfaces-per-frame=(int)1, format=(string)I420
0:00:11.418766987  1817 0x55f63a420e30 WARN                GST_PADS gstpad.c:4226:gst_pad_peer_query:<sink_sub_bin_cap_filter2:src> could not send sticky events
0:00:11.425389141  1817 0x55f63a420e30 WARN                 default v4l2-utils.c:189:gst_v4l2_error:<sink_sub_bin_encoder2> error: Device '/dev/nvhost-msenc' failed during initialization
0:00:11.425417441  1817 0x55f63a420e30 WARN                 default v4l2-utils.c:192:gst_v4l2_error:<sink_sub_bin_encoder2> error: Call to S_FMT failed for YM12 @ 1280x720: Unknown error -1
ERROR from sink_sub_bin_encoder2: Device '/dev/nvhost-msenc' failed during initialization
Debug info: gstv4l2object.c(4074): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline/GstBin:processing_bin_0/GstBin:sink_bin/GstBin:sink_sub_bin2/nvv4l2h264enc:sink_sub_bin_encoder2:
Call to S_FMT failed for YM12 @ 1280x720: Unknown error -1
0:00:11.425503095  1817 0x55f63a420e30 WARN            videoencoder gstvideoencoder.c:678:gst_video_encoder_setcaps:<sink_sub_bin_encoder2> rejected caps video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, framerate=(fraction)30/1, batch-size=(int)1, num-surfaces-per-frame=(int)1, format=(string)I420
0:00:11.425886612  1817 0x55f63a420e30 WARN                 default v4l2-utils.c:189:gst_v4l2_error:<sink_sub_bin_encoder2> error: Device '/dev/nvhost-msenc' failed during initialization
0:00:11.425900579  1817 0x55f63a420e30 WARN                 default v4l2-utils.c:192:gst_v4l2_error:<sink_sub_bin_encoder2> error: Call to S_FMT failed for YM12 @ 1280x720: Unknown error -1
0:00:11.425994221  1817 0x55f63a420e30 WARN            videoencoder gstvideoencoder.c:678:gst_video_encoder_setcaps:<sink_sub_bin_encoder2> rejected caps video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, framerate=(fraction)30/1, batch-size=(int)1, num-surfaces-per-frame=(int)1, format=(string)I420
ERROR from sink_sub_bin_encoder2: Device '/dev/nvhost-msenc' failed during initialization
Debug info: gstv4l2object.c(4074): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline/GstBin:processing_bin_0/GstBin:sink_bin/GstBin:sink_sub_bin2/nvv4l2h264enc:sink_sub_bin_encoder2:
Call to S_FMT failed for YM12 @ 1280x720: Unknown error -1
0:00:11.426259510  1817 0x55f63a420e30 WARN                 default v4l2-utils.c:189:gst_v4l2_error:<sink_sub_bin_encoder2> error: Device '/dev/nvhost-msenc' failed during initialization
0:00:11.426273309  1817 0x55f63a420e30 WARN                 default v4l2-utils.c:192:gst_v4l2_error:<sink_sub_bin_encoder2> error: Call to S_FMT failed for YM12 @ 1280x720: Unknown error -1
0:00:11.426319949  1817 0x55f63a420e30 WARN            videoencoder gstvideoencoder.c:678:gst_video_encoder_setcaps:<sink_sub_bin_encoder2> rejected caps video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, framerate=(fraction)30/1, batch-size=(int)1, num-surfaces-per-frame=(int)1, format=(string)I420
ERROR from sink_sub_bin_encoder2: Device '/dev/nvhost-msenc' failed during initialization
Debug info: gstv4l2object.c(4074): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline/GstBin:processing_bin_0/GstBin:sink_bin/GstBin:sink_sub_bin2/nvv4l2h264enc:sink_sub_bin_encoder2:
Call to S_FMT failed for YM12 @ 1280x720: Unknown error -1
0:00:11.426592845  1817 0x55f63a420e30 WARN                 default v4l2-utils.c:189:gst_v4l2_error:<sink_sub_bin_encoder2> error: Device '/dev/nvhost-msenc' failed during initialization
0:00:11.426605772  1817 0x55f63a420e30 WARN                 default v4l2-utils.c:192:gst_v4l2_error:<sink_sub_bin_encoder2> error: Call to S_FMT failed for YM12 @ 1280x720: Unknown error -1
0:00:11.426650837  1817 0x55f63a420e30 WARN            videoencoder gstvideoencoder.c:678:gst_video_encoder_setcaps:<sink_sub_bin_encoder2> rejected caps video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, framerate=(fraction)30/1, batch-size=(int)1, num-surfaces-per-frame=(int)1, format=(string)I420
ERROR from sink_sub_bin_encoder2: Device '/dev/nvhost-msenc' failed during initialization
Debug info: gstv4l2object.c(4074): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline/GstBin:processing_bin_0/GstBin:sink_bin/GstBin:sink_sub_bin2/nvv4l2h264enc:sink_sub_bin_encoder2:
Call to S_FMT failed for YM12 @ 1280x720: Unknown error -1
0:00:11.426905759  1817 0x55f63a420e30 WARN                 default v4l2-utils.c:189:gst_v4l2_error:<sink_sub_bin_encoder2> error: Device '/dev/nvhost-msenc' failed during initialization
0:00:11.426918767  1817 0x55f63a420e30 WARN                 default v4l2-utils.c:192:gst_v4l2_error:<sink_sub_bin_encoder2> error: Call to S_FMT failed for YM12 @ 1280x720: Unknown error -1
ERROR from sink_sub_bin_encoder2: Device '/dev/nvhost-msenc' failed during initialization
0:00:11.426968439  1817 0x55f63a420e30 WARN            videoencoder gstvideoencoder.c:678:gst_video_encoder_setcaps:<sink_sub_bin_encoder2> rejected caps video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, framerate=(fraction)30/1, batch-size=(int)1, num-surfaces-per-frame=(int)1, format=(string)I420
Debug info: gstv4l2object.c(4074): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline/GstBin:processing_bin_0/GstBin:sink_bin/GstBin:sink_sub_bin2/nvv4l2h264enc:sink_sub_bin_encoder2:
Call to S_FMT failed for YM12 @ 1280x720: Unknown error -1
0:00:11.427236080  1817 0x55f63a420e30 WARN                 default v4l2-utils.c:189:gst_v4l2_error:<sink_sub_bin_encoder2> error: Device '/dev/nvhost-msenc' failed during initialization
0:00:11.427249247  1817 0x55f63a420e30 WARN                 default v4l2-utils.c:192:gst_v4l2_error:<sink_sub_bin_encoder2> error: Call to S_FMT failed for YM12 @ 1280x720: Unknown error -1
0:00:11.427293365  1817 0x55f63a420e30 WARN            videoencoder gstvideoencoder.c:678:gst_video_encoder_setcaps:<sink_sub_bin_encoder2> rejected caps video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, framerate=(fraction)30/1, batch-size=(int)1, num-surfaces-per-frame=(int)1, format=(string)I420
ERROR from sink_sub_bin_encoder2: Device '/dev/nvhost-msenc' failed during initialization
Debug info: gstv4l2object.c(4074): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline/GstBin:processing_bin_0/GstBin:sink_bin/GstBin:sink_sub_bin2/nvv4l2h264enc:sink_sub_bin_encoder2:
Call to S_FMT failed for YM12 @ 1280x720: Unknown error -1
0:00:11.427551379  1817 0x55f63a420e30 WARN                 default v4l2-utils.c:189:gst_v4l2_error:<sink_sub_bin_encoder2> error: Device '/dev/nvhost-msenc' failed during initialization
0:00:11.427564878  1817 0x55f63a420e30 WARN                 default v4l2-utils.c:192:gst_v4l2_error:<sink_sub_bin_encoder2> error: Call to S_FMT failed for YM12 @ 1280x720: Unknown error -1
ERROR from sink_sub_bin_encoder2: Device '/dev/nvhost-msenc' failed during initialization
0:00:11.427610547  1817 0x55f63a420e30 WARN            videoencoder gstvideoencoder.c:678:gst_video_encoder_setcaps:<sink_sub_bin_encoder2> rejected caps video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, framerate=(fraction)30/1, batch-size=(int)1, num-surfaces-per-frame=(int)1, format=(string)I420
Debug info: gstv4l2object.c(4074): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline/GstBin:processing_bin_0/GstBin:sink_bin/GstBin:sink_sub_bin2/nvv4l2h264enc:sink_sub_bin_encoder2:
Call to S_FMT failed for YM12 @ 1280x720: Unknown error -1
0:00:11.429180990  1817 0x55f63a420e30 WARN                 default v4l2-utils.c:189:gst_v4l2_error:<sink_sub_bin_encoder2> error: Device '/dev/nvhost-msenc' failed during initialization
0:00:11.429196027  1817 0x55f63a420e30 WARN                 default v4l2-utils.c:192:gst_v4l2_error:<sink_sub_bin_encoder2> error: Call to S_FMT failed for YM12 @ 1280x720: Unknown error -1
0:00:11.429243488  1817 0x55f63a420e30 WARN            videoencoder gstvideoencoder.c:678:gst_video_encoder_setcaps:<sink_sub_bin_encoder2> rejected caps video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, framerate=(fraction)30/1, batch-size=(int)1, num-surfaces-per-frame=(int)1, format=(string)I420
ERROR from sink_sub_bin_encoder2: Device '/dev/nvhost-msenc' failed during initialization
Debug info: gstv4l2object.c(4074): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline/GstBin:processing_bin_0/GstBin:sink_bin/GstBin:sink_sub_bin2/nvv4l2h264enc:sink_sub_bin_encoder2:
Call to S_FMT failed for YM12 @ 1280x720: Unknown error -1
Quitting
0:00:11.429496323  1817 0x55f63a420e30 WARN                 default v4l2-utils.c:189:gst_v4l2_error:<sink_sub_bin_encoder2> error: Device '/dev/nvhost-msenc' failed during initialization
0:00:11.429510835  1817 0x55f63a420e30 WARN                 default v4l2-utils.c:192:gst_v4l2_error:<sink_sub_bin_encoder2> error: Call to S_FMT failed for YM12 @ 1280x720: Unknown error -1
0:00:11.429555542  1817 0x55f63a420e30 WARN            videoencoder gstvideoencoder.c:678:gst_video_encoder_setcaps:<sink_sub_bin_encoder2> rejected caps video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, framerate=(fraction)30/1, batch-size=(int)1, num-surfaces-per-frame=(int)1, format=(string)I420
0:00:11.429833970  1817 0x55f63a420e30 WARN                 default v4l2-utils.c:189:gst_v4l2_error:<sink_sub_bin_encoder2> error: Device '/dev/nvhost-msenc' failed during initialization
0:00:11.429848447  1817 0x55f63a420e30 WARN                 default v4l2-utils.c:192:gst_v4l2_error:<sink_sub_bin_encoder2> error: Call to S_FMT failed for YM12 @ 1280x720: Unknown error -1
0:00:11.429888662  1817 0x55f63a420e30 WARN            videoencoder gstvideoencoder.c:678:gst_video_encoder_setcaps:<sink_sub_bin_encoder2> rejected caps video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, framerate=(fraction)30/1, batch-size=(int)1, num-surfaces-per-frame=(int)1, format=(string)I420
0:00:11.430155041  1817 0x55f63a420e30 WARN                 default v4l2-utils.c:189:gst_v4l2_error:<sink_sub_bin_encoder2> error: Device '/dev/nvhost-msenc' failed during initialization
0:00:11.430169212  1817 0x55f63a420e30 WARN                 default v4l2-utils.c:192:gst_v4l2_error:<sink_sub_bin_encoder2> error: Call to S_FMT failed for YM12 @ 1280x720: Unknown error -1
0:00:11.430207979  1817 0x55f63a420e30 WARN            videoencoder gstvideoencoder.c:678:gst_video_encoder_setcaps:<sink_sub_bin_encoder2> rejected caps video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, framerate=(fraction)30/1, batch-size=(int)1, num-surfaces-per-frame=(int)1, format=(string)I420
0:00:11.430436684  1817 0x55f63a420e30 WARN                 default v4l2-utils.c:189:gst_v4l2_error:<sink_sub_bin_encoder2> error: Device '/dev/nvhost-msenc' failed during initialization
0:00:11.430449435  1817 0x55f63a420e30 WARN                 default v4l2-utils.c:192:gst_v4l2_error:<sink_sub_bin_encoder2> error: Call to S_FMT failed for YM12 @ 1280x720: Unknown error -1
0:00:11.430518636  1817 0x55f63a420e30 WARN            videoencoder gstvideoencoder.c:678:gst_video_encoder_setcaps:<sink_sub_bin_encoder2> rejected caps video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, framerate=(fraction)30/1, batch-size=(int)1, num-surfaces-per-frame=(int)1, format=(string)I420
0:00:11.430751740  1817 0x55f63a420e30 WARN                 default v4l2-utils.c:189:gst_v4l2_error:<sink_sub_bin_encoder2> error: Device '/dev/nvhost-msenc' failed during initialization
0:00:11.430765683  1817 0x55f63a420e30 WARN                 default v4l2-utils.c:192:gst_v4l2_error:<sink_sub_bin_encoder2> error: Call to S_FMT failed for YM12 @ 1280x720: Unknown error -1
0:00:11.430803545  1817 0x55f63a420e30 WARN            videoencoder gstvideoencoder.c:678:gst_video_encoder_setcaps:<sink_sub_bin_encoder2> rejected caps video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, framerate=(fraction)30/1, batch-size=(int)1, num-surfaces-per-frame=(int)1, format=(string)I420
ERROR from sink_sub_bin_encoder2: Device '/dev/nvhost-msenc' failed during initialization
Debug info: gstv4l2object.c(4074): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline/GstBin:processing_bin_0/GstBin:sink_bin/GstBin:sink_sub_bin2/nvv4l2h264enc:sink_sub_bin_encoder2:
Call to S_FMT failed for YM12 @ 1280x720: Unknown error -1
ERROR from sink_sub_bin_encoder2: Device '/dev/nvhost-msenc' failed during initialization
Debug info: gstv4l2object.c(4074): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline/GstBin:processing_bin_0/GstBin:sink_bin/GstBin:sink_sub_bin2/nvv4l2h264enc:sink_sub_bin_encoder2:
Call to S_FMT failed for YM12 @ 1280x720: Unknown error -1
ERROR from sink_sub_bin_encoder2: Device '/dev/nvhost-msenc' failed during initialization
Debug info: gstv4l2object.c(4074): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline/GstBin:processing_bin_0/GstBin:sink_bin/GstBin:sink_sub_bin2/nvv4l2h264enc:sink_sub_bin_encoder2:
Call to S_FMT failed for YM12 @ 1280x720: Unknown error -1
ERROR from sink_sub_bin_encoder2: Device '/dev/nvhost-msenc' failed during initialization
Debug info: gstv4l2object.c(4074): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline/GstBin:processing_bin_0/GstBin:sink_bin/GstBin:sink_sub_bin2/nvv4l2h264enc:sink_sub_bin_encoder2:
Call to S_FMT failed for YM12 @ 1280x720: Unknown error -1
ERROR from sink_sub_bin_encoder2: Device '/dev/nvhost-msenc' failed during initialization
Debug info: gstv4l2object.c(4074): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline/GstBin:processing_bin_0/GstBin:sink_bin/GstBin:sink_sub_bin2/nvv4l2h264enc:sink_sub_bin_encoder2:
Call to S_FMT failed for YM12 @ 1280x720: Unknown error -1

Which platform are you using? Can you find the type in this table Video Encode and Decode GPU Support Matrix [NEW] | NVIDIA Developer?

If the platform does not support HW encoder, you can try to set “enc-type=1” in [sink] group to enable SW encoder.

1 Like

Target platform: NVidia Quadro RTX.
It is enough to know that according to the table, the card model supports 1 NVEnc.
If RTSP sink is disabled, leaving only a fake sink, the sample works.
The problem looks related to the RTSP encoding sink.
The same configuration has been tested with the same Nvidia docker image in a local platform with a consumer video card.

The differences between setups are:

  1. The hardware platform. Nvidia Quadro RTX Vs Nvidia GTX
  2. The Kubernetes platform vs one simple docker container.

Is there any special install / configuration for Hw encoding, GStreamer, Kubernetes, and Quadro cards to have into account?

According to the error log, the HW driver is not installed correctly.

The installation instruction is Quickstart Guide — DeepStream 6.0 Release documentation

Ok, we will try to research into that.
Meanwhile, I’ve been searching the forum again, and there are other issues similar to this. e.g.

No. At least the device is available in that topic. But in your enviroment, the device is not found. It may be a driver level problem.

I don’t understand how to check /dev/nvhost-msenc. It doesn’t exist in any configuration, even when the example works:

  1. Local computer with GTX card (Works):

$ ls /dev/nv*
/dev/nvidia0 /dev/nvidiactl /dev/nvidia-modeset /dev/nvidia-uvm /dev/nvidia-uvm-tools /dev/nvram
/dev/nvidia-caps:
nvidia-cap1 nvidia-cap2

  1. Same computer and command ran in deepstream:5.1-21.02-triton container (Works):

$ ls /dev/nv*
/dev/nvidia-uvm /dev/nvidia-uvm-tools /dev/nvidia0 /dev/nvidiactl

  1. Same command and container in a server with Quadro RTX (RTSP doesn’t work):

$ ls /dev/nv*
/dev/nvidia-uvm /dev/nvidia-uvm-tools /dev/nvidia3 /dev/nvidiactl

As could be expected, can’t encode either to video files.

Searching the forum I’ve found that /dev/nvhost-msenc is for Jetson platform.
What should I try?

You are using dGPU, /dev/nvhost-msenc is not needed. Please tell us the exact device type (RTX P400, RTX 3000,…).

You’d better reinstall your device driver.

Quadro RTX 8000

Can you check whether the following symlink is in your system:

/usr/lib/x86_64-linux-gnu/libnvidia-encode.so → libnvidia-encode.so.1*
/usr/lib/x86_64-linux-gnu/libnvidia-encode.so.1 → libnvidia-encode.so.

If there is not, you may try to setup the symlink with the following coomand:
sudo ln -s /usr/lib/aarch64-linux-gnu/libnvidia-encode.so.1 /usr/lib/aarch64-linux-gnu/libnvidia-encode.so

I have these links and one library file. I think it looks correct. This is inside the container.
I will check in the server, but that will take some time. I will update asap.

Container:

libnvidia-encode.so -> /usr/lib/x86_64-linux-gnu/libnvidia-encode.so.1
libnvidia-encode.so.1 -> libnvidia-encode.so.440.33.01
libnvidia-encode.so.440.33.01

Ok, that was the problem. It was solved by
sudo apt-get install libnvidia-encode-xxx
where xxx is the current driver version,
Thanks.

1 Like

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