RuntimeError: get_nvds_buf_Surface: Currently we only support RGBA color Format

Hello there,
I am getting the above error on the following line
n_frame = pyds.get_nvds_buf_surface(hash(gst_buffer), frame_meta.batch_id)

I need to extract the frame to draw the bonding box on it,

what can I change to accomplish this? please check the .py file attached for reference
app-file-hls-osd-test.py (18.5 KB)

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)
• DeepStream Version
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs)
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

Hello @kayccc,
I am using 4GB Jetson Nano, Deepstream5.1, Jetpack version 4.5-b129, TensorRT version 7.1.3, using this default resnet10.caffemodel_b30_gpu0_fp16.engine model with four classes , car, bicycle, person, roadsign

Have you solved the problem?

Nope

gst-nvinfer can’t output RGBA format, you can not use get_nvds_buf_surface in gst-nvinfer src pad probe function.

Please refer to the sample of deepstream_imagedata-multistream.py.

1 Like

#############################################
# Add nvvidconv1 and filter1 to convert the frames to RGBA
# which is easier to work with in Python.
print(“Creating nvvidconv1 \n “)
nvvidconv1 = Gst.ElementFactory.make(“nvvideoconvert”, “convertor1”)
if not nvvidconv1:
sys.stderr.write(” Unable to create nvvidconv1 \n”)
print(“Creating filter1 \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)
##############################################

###########################################
pipeline.add(filter1)
pipeline.add(nvvidconv1)
###########################################

###########################################
queue5.link(nvvidconv1)
nvvidconv1.link(filter1)
filter1.link(queue6)
###########################################
####queue5.link(tiler)

‘‘‘queue5 link the gst-nvinfer’’’