Issue: RuntimeError: get_nvds_buf_Surface: Currently we only support RGBA color Format

hi,
I’m encountering an issue while working with DeepStream 6.3 and CUDA 12.2 in my pipeline. Specifically, I get the following error: Currently we only support RGBA color Format
To resolve this, I attempted to set the memory management to CUDA unified memory using the following code:

mem_type = int(pyds.NVBUF_MEM_CUDA_UNIFIED)
nvvidconv.set_property(“nvbuf-memory-type”, mem_type)
streammux.set_property(“nvbuf-memory-type”, mem_type)

However, I ran into another issue when applying this solution: TypeError: object of type GstNvStreamMux does not have property nvbuf-memory-type
Has anyone experienced a similar problem or knows how to properly set the memory type for the GstNvStreamMux and nvvidconv elements?

Are you using Jetson? You don’t need to set this properties on Jetson.

Just add nvvideoconvert to the upstream element which you add probe function.

Refer to /opt/nvidia/deepstream/deepstream/sources/deepstream_python_apps/apps/deepstream-imagedata-multistream/deepstream_imagedata-multistream.py

I’m working on an NVIDIA T4 server and I’m trying to save detected faces. I’ve added nvvideoconvert and *‘filter’

nvvideoconvert = Gst.ElementFactory.make(“nvvideoconvert”, “nvvideoconvert”)
if not nvvideoconvert:
sys.stderr.write(" Unable to create nvvideoconvert \n")

caps1 = Gst.Caps.from_string(“video/x-raw(memory:NVMM), format=RGBA”)
filter1 = Gst.ElementFactory.make(“capsfilter”, “filter1”)
if not filter1:
sys.stderr.write(" Unable to get the caps filter1 \n")
filter1.set_property(“caps”, caps1)

I also set the memory type like this:
if not platform_info.is_integrated_gpu():
mem_type = int(pyds.NVBUF_MEM_CUDA_UNIFIED)
streammux.set_property(“nvbuf-memory-type”, mem_type)
nvvideoconvert.set_property(“nvbuf-memory-type”, mem_type)
if platform_info.is_wsl():
print(“using nvbuf_mem_cuda_pinned memory for nvvidconv1\n”)
vc_mem_type = int(pyds.NVBUF_MEM_CUDA_PINNED)
nvvideoconvert.set_property(“nvbuf-memory-type”, vc_mem_type)
else:
nvvideoconvert.set_property(“nvbuf-memory-type”, mem_type)

here’s how I’m linking the elements in the pipeline :

streammux.link(queue1)
queue1.link(pgie)
pgie.link(tracker)
tracker.link(nvanalytics)
nvanalytics.link(pgie1)
pgie1.link(sgie2)
sgie2.link(sgie3)
sgie3.link(sgie4)
sgie4.link(nvvideoconvert)
nvvideoconvert.link(filter1)
filter1.link(nvstreamdemux)

However, I still encounter the same error.

Are you using the new nvstreammux? new nvstreammux cannot set this property.

You can get the configurable properties by running the following command:

USE_NEW_NVSTREAMMUX=yes gst-inspect-1.0 nvstreammux

Yes, I have switched to the old nvstreammux. The pipeline runs without any errors, but it still does not save the faces.

If you want to save the object as an image, you can refer to nvds_obj_enc_process.

This is sample code.
/opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream-image-meta-test/deepstream_image_meta_test.c

However, there is no python bindinds at present, so you need to bind the C API to the Python code by yourself.

I added the corresponding python bindings and provided a sample code based on test1.

Refer this FAQ, thanks