Nvv4l2h264enc: Could not get/set settings from/on resource. Device is in streaming mode

• Hardware Platform (Jetson / GPU): GPU, RTX 3090
• DeepStream Version: 6.0
• TensorRT Version: 8.0.1
• NVIDIA GPU Driver Version (valid for GPU only): 495.29.05
• Issue Type( questions, new requirements, bugs): questions, bugs

Hi,
I have the following pipeline with 3 input streams and 3 demuxed outputs saved in the files:

gst-launch-1.0 -e nvstreammux name=mux batch-size=3 width=1920 height=1080 ! nvinfer config-file-path=config_infer_primary.txt batch-size=8  ! nvstreamdemux name=demux filesrc location=/opt/nvidia/deepstream/deepstream-6.0/samples/streams/sample_720p.h264 ! h264parse ! nvv4l2decoder ! queue ! mux.sink_0 filesrc location=/opt/nvidia/deepstream/deepstream-6.0/samples/streams/sample_720p.h264 ! h264parse ! nvv4l2decoder ! queue ! mux.sink_1 filesrc location=/opt/nvidia/deepstream/deepstream-6.0/samples/streams/sample_720p.h264 ! h264parse ! nvv4l2decoder ! queue ! mux.sink_2 demux.src_0 ! "video/x-raw(memory:NVMM), format=NV12" ! queue ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=RGBA" ! nvdsosd ! nvvideoconvert ! nvv4l2h264enc ! h264parse ! qtmux ! filesink location=out1.mp4 demux.src_1 ! "video/x-raw(memory:NVMM), format=NV12" ! queue ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=RGBA" ! nvdsosd ! nvvideoconvert ! nvv4l2h264enc ! h264parse ! qtmux ! filesink location=out2.mp4 demux.src_2 ! "video/x-raw(memory:NVMM), format=NV12" ! queue ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=RGBA" ! nvdsosd ! nvvideoconvert ! nvv4l2h264enc ! h264parse ! qtmux ! filesink location=out3.mp4 

And it works great!

When I try to add the fourth input stream with fourth demuxed output:

gst-launch-1.0 -e nvstreammux name=mux batch-size=4 width=1920 height=1080 ! nvinfer config-file-path=config_infer_primary.txt batch-size=8  ! nvstreamdemux name=demux filesrc location=/opt/nvidia/deepstream/deepstream-6.0/samples/streams/sample_720p.h264 ! h264parse ! nvv4l2decoder ! queue ! mux.sink_0 filesrc location=/opt/nvidia/deepstream/deepstream-6.0/samples/streams/sample_720p.h264 ! h264parse ! nvv4l2decoder ! queue ! mux.sink_1 filesrc location=/opt/nvidia/deepstream/deepstream-6.0/samples/streams/sample_720p.h264 ! h264parse ! nvv4l2decoder ! queue ! mux.sink_2 filesrc location=/opt/nvidia/deepstream/deepstream-6.0/samples/streams/sample_720p.h264 ! h264parse ! nvv4l2decoder ! queue ! mux.sink_3 demux.src_0 ! "video/x-raw(memory:NVMM), format=NV12" ! queue ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=RGBA" ! nvdsosd ! nvvideoconvert ! nvv4l2h264enc ! h264parse ! qtmux ! filesink location=out1.mp4 demux.src_1 ! "video/x-raw(memory:NVMM), format=NV12" ! queue ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=RGBA" ! nvdsosd ! nvvideoconvert ! nvv4l2h264enc ! h264parse ! qtmux ! filesink location=out2.mp4 demux.src_2 ! "video/x-raw(memory:NVMM), format=NV12" ! queue ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=RGBA" ! nvdsosd ! nvvideoconvert ! nvv4l2h264enc ! h264parse ! qtmux ! filesink location=out3.mp4 demux.src_3 ! "video/x-raw(memory:NVMM), format=NV12" ! queue ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=RGBA" ! nvdsosd ! nvvideoconvert ! nvv4l2h264enc ! h264parse ! qtmux ! filesink location=out4.mp4

It gives me the following error:

ERROR: from element /GstPipeline:pipeline0/nvv4l2h264enc:nvv4l2h264enc3: Could not get/set settings from/on resource.
Additional debug info:
gstv4l2object.c(3501): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline0/nvv4l2h264enc:nvv4l2h264enc3:
Device is in streaming mode
ERROR: pipeline doesn't want to preroll.

What does it mean? Does it mean that 4x HW encoder elements are too much for RTX 3090?
Thanks!

The same pipeline above with 4 input streams and 4 demuxed outputs (each with own ecnoder) works great on Jetson AGX Xavier (On Jetson AGX Xavier there is Deepstream 5.1 at this moment ).

gst-launch-1.0 -e nvstreammux name=mux batch-size=4 width=1920 height=1080 ! nvinfer config-file-path=config_infer_primary.txt batch-size=8  ! nvstreamdemux name=demux filesrc location=/opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample_720p.h264 ! h264parse ! nvv4l2decoder ! queue ! mux.sink_0 filesrc location=/opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample_720p.h264 ! h264parse ! nvv4l2decoder ! queue ! mux.sink_1 filesrc location=/opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample_720p.h264 ! h264parse ! nvv4l2decoder ! queue ! mux.sink_2 filesrc location=/opt/nvidia/deepstream/deepstream-5.1/samples/streams/sample_720p.h264 ! h264parse ! nvv4l2decoder ! queue ! mux.sink_3 demux.src_0 ! "video/x-raw(memory:NVMM), format=NV12" ! queue ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=RGBA" ! nvdsosd ! nvvideoconvert ! nvv4l2h264enc ! h264parse ! qtmux ! filesink location=out1.mp4 demux.src_1 ! "video/x-raw(memory:NVMM), format=NV12" ! queue ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=RGBA" ! nvdsosd ! nvvideoconvert ! nvv4l2h264enc ! h264parse ! qtmux ! filesink location=out2.mp4 demux.src_2 ! "video/x-raw(memory:NVMM), format=NV12" ! queue ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=RGBA" ! nvdsosd ! nvvideoconvert ! nvv4l2h264enc ! h264parse ! qtmux ! filesink location=out3.mp4 demux.src_3 ! "video/x-raw(memory:NVMM), format=NV12" ! queue ! nvvideoconvert ! "video/x-raw(memory:NVMM), format=RGBA" ! nvdsosd ! nvvideoconvert ! nvv4l2h264enc ! h264parse ! qtmux ! filesink location=out4.mp4

Why does not the same pipeline work on RTX 3090?

RTX 3090 only support at most 3 HW encoding sessions. You have created 4 HW encoders, so it failed. Video Encode and Decode GPU Support Matrix [NEW] | NVIDIA Developer

Please replace one of the 4 encoders with SW encoder.

1 Like

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