Failed to activate bufferpool error when using usb camera

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) - Jetson
• DeepStream Version - 5.0.1
• JetPack Version (valid for Jetson only) 4.3
• TensorRT Version 7+

Hi,
I am using deepstream sample python app test 3 and i’ve modified it’s create_source_bin to take video feed from my usb cams

if I use the following pipeline

   streammux.link(queue1)
queue1.link(queue2)
#pgie.link(queue2)
queue2.link(tiler)
tiler.link(queue3)
queue3.link(nvvidconv)
nvvidconv.link(queue4)
queue4.link(nvosd)
if is_aarch64():
    nvosd.link(queue5)
    queue5.link(transform)
    transform.link(sink)
else:
    nvosd.link(queue5)

i get this error
nvbufsurface: invalid colorFormat 0
nvbufsurface: Error in allocating buffer
Error(-1) in buffer allocation

** (python3:9841): CRITICAL **: 15:04:36.767: gst_nvds_buffer_pool_alloc_buffer: assertion ‘mem’ failed
Error: gst-resource-error-quark: failed to activate bufferpool (13): gstbasetransform.c(1670): default_prepare_output_buffer (): /GstPipeline:pipeline0/GstBin:source-bin-00/Gstnvvideoconvert:convertor_src2:
failed to activate bufferpool
Exiting app

if I use this pipeline

    streammux.link(queue1)
queue1.link(queue2)
#pgie.link(queue2)
queue2.link(tiler)
tiler.link(queue3)
queue3.link(nvvidconv)
nvvidconv.link(queue4)
queue4.link(nvosd)
if is_aarch64():
    nvosd.link(queue5)
    queue5.link(transform)
    transform.link(sink)
else:
    nvosd.link(queue5)

i cannot access the frame meta data and get the following error

File “v2(test3).py”, line 88, in tiler_src_pad_buffer_probe
n_frame=pyds.get_nvds_buf_surface(hash(gst_buffer),frame_meta.batch_id)
RuntimeError: get_nvds_buf_Surface: Currently we only support RGBA color Formatv2(test3).py (17.4 KB)

The error message has told you what is the problem. The format of buffer in tiler sink pad is NV12 format. Please probe the function to nvosd sink pad instead.

Thanks, but I cannot call osd probe because the callback is not called for every source and frame

Then you need to change the pipeline . E.G.

1 Like

what are these queues used for? @Fiona.Chen

thank you so much, it cleared so many doubts I had.

queue (gstreamer.freedesktop.org)

1 Like