Nvvideoconvert Keeps Removing my NvDsMeta

Jetson nano with Jetpack 4.4 and Deepstream version 5.

I have the following pipeline. https://filebin.net/8i84jwbuf4t32bm7/pipeline.pdf?t=4nn6wc0h

appsrc->nvjpegdec->nvvideoconvert->nvstreammux->nvinfer->appsink. I add the metadata on src of appsrc but nvvideoconvert decides to remove them.

Any idea on how I could overcome this problem?

How do you add NvDsMeta in appsrc? Can you share the codes? How do you know the meta is removed by nvvideoconvert?

GstBuffer *gst_buffer = gst_buffer_new_allocate(nullptr, bufferLength, nullptr);
gst_buffer_fill(gst_buffer, 0, buffer, bufferLength);

 FrameMeta *frameMeta = (FrameMeta *) g_malloc0(sizeof(FrameMeta);
meta = gst_buffer_add_nvds_meta(gst_buffer, frameMeta, NULL,
                                frame_meta_copy_func, frame_meta_release_func);
meta->meta_type = (GstNvDsMetaType)NVDS_GST_META_FRAME;

meta->gst_to_nvds_meta_transform_func = src_gst_to_nvds_meta_transform_func;
meta->gst_to_nvds_meta_release_func = frame_gst_nvds_meta_release_func;

ret = gst_app_src_push_buffer ((GstAppSrc*) app_source, gst_buffer);

If you add metadata before nvvideoconvert and try to get it after nvvideoconvert, it will be gone.

NVDS_GST_META_FRAME is not defined by DeepStream. So it is your customized meta data. nvvideoconvert will not remove it. You need to check you own implementation of the whole meta interfaces.

No, Take this pipeline
appsrc->nvjpegdec->nvvideoconvert->nvstreammux->nvinfer->appsink

if I attacj a probe on src/sink of nvjpegdec, I get the meta. If I probe on sink of nvvideoconvert I get the meta. But if I probe src of nvvideoconvert or anything after my meta is gone.

You have use “gst_buffer_add_nvds_meta” to add user meta, how do you retrieve the meta in the probe? Can you provide the complete codes?

I’ve tested with the modified the deepstream-gst-metadata-test sample to test your case. The customized nvdsmeta can be retrieved correctly after nvvideoconvert.

Please refer to deepstream_gst_metadata.c (19.8 KB)