Understanding GstNvDsOsd drawing limitations

• Hardware Platform (Jetson / GPU) Jetson Nano
• DeepStream Version 4.0.2
• JetPack Version (valid for Jetson only) 4.3

Hi all,

We are working with DeepStream metadata and the nvdsosd element. We basically have a custom GStreamer element that receives JSON-encoded metadata as property and adds it to the current buffer metadata. The process is pretty straight forward and overall it is working fine, the overlay recognizes the metadata we are adding and draws it fine:

  • A python app generates a new meta that wants to be drawn in the buffer.
  • Then encodes the metadata in JSON format and sets it in a property of our custom element. For example:

The problem is that certain conditions are causing nvdsosd to simply crash with a segmentation fault. Here is what we have found so far:

  • Adding more than 16 rect_params to an NvDsDisplayMeta will cause the error.
  • Adding more than 25 text_params to an NvDsDisplayMeta will cause the error.
  • Adding more than 17 line_params to an NvDsDisplayMeta will cause the error.
  • There is an interaction between line_params and text_params. If I add 25 text_params I can only add 1 line_params without causing the error.

We want to know:

  • What is causing these errors?
  • Are these hardware limitations?
  • Is there a workaround?
  • I haven’t tried with multiple NvDsDisplayMeta, maybe that can help?
  • Are there other limitations in nvdsosd that I didn’t list before?

Thank you,

1 Like

Max elements in NvDsDisplayMeta are set to 16. The structure of NvDsDisplayMeta is defined in deepstream-5.0\sources\includes\nvdsmeta.h
If more than 16 elements are needed, need to create new display_meta for the extra elements with nvds_acquire_display_meta_from_pool() function.

1 Like