How to get from nvdsframemeta to gstmeta of the original frame

• Hardware Platform (Jetson / GPU): Jetson
• DeepStream Version: 7.0
• JetPack Version (valid for Jetson only) 6.0

Hi everyone,

I have a DS c++ pipeline with two source (namely ZED src from here), which I eventually batch together with nvstreammux and run inference on.

Each of the two sources adds to the data buffer a GST-meta with metadata about the existing frame, while nvstreammux adds NVDS meta with metdata about the batch (and frames, objects, etc).

If I add a probe after nvinfer, I can see all metadata (both the one from zed and the one attached by nvstreammux) but I do not see a way to be able to “link” each nvdsframemeta with the corresponding zedsrc metadata from the gstbuffer. I know nvdsframemeta has source_id and pad_index but this information is obviously not present int the zedsrc metadata from the gstbuffer.

How I get any link between nvdsframemeta and the metadata coming from its corresponding original frame?

Thanks for the help!

You can find usermeta in framemeta’s frame_user_meta_list. In fact, there is a sample for how to set usermeta before nvstreammux. Refer to /opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream-gst-metadata-test

Hi thanks for the feedback!

By

You can find usermeta in framemeta’s frame_user_meta_list

you mean the nvstreammux will automatically place it there? Because I could not seem to find anything on that field by defolt… or that I have to set usermeta myself similar to how it’s done in the deepstream-gst-metadata-test?

I had seen that example while researching for this and I guessed it could get the job done but seemed to be fairly convoluted way to what boils down to a mapping between metadata and objects. Is there any reason why the nvstreammux and its metadata do not retain any link (implemented in any way) to the their src metadata?

Yes, like deepstream-gst-metadata-test, convert zedsrc metadata to frame-level user meta. This way you can find the required data on the entire pipeline.

nvstreammux batches multiple frames (many gstbuffers) into a batch (one new gstbuffer), but nvstreammux does not know how to merge the metadata on multiple gstbuffers into one. So this step needs to be implemented by the user.