# Nvvideoconvert Keeps Removing my NvDsMeta

**URL:** <https://forums.developer.nvidia.com/t/nvvideoconvert-keeps-removing-my-nvdsmeta/158237>\
**Category:** DeepStream SDK\
**Created:** [October 29, 2020, 8:18am UTC](https://forums.developer.nvidia.com/t/nvvideoconvert-keeps-removing-my-nvdsmeta/158237 "2020-10-29T08:18:37Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![kg99](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@kg99](https://forums.developer.nvidia.com/u/kg99)\
**Post date:** [October 29, 2020, 8:18am UTC](https://forums.developer.nvidia.com/t/nvvideoconvert-keeps-removing-my-nvdsmeta/158237/1 "2020-10-29T08:18:37Z")

</div>

Jetson nano with Jetpack 4.4 and Deepstream version 5.

I have the following pipeline. [https://filebin.net/8i84jwbuf4t32bm7/pipeline.pdf?t=4nn6wc0h](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?

---

<div class="post-metadata">

**Author:** ![Fiona.Chen](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/fiona.chen/32/15508_2.png) [@Fiona.Chen](https://forums.developer.nvidia.com/u/Fiona.Chen)\
**Post date:** [November 3, 2020, 5:54am UTC](https://forums.developer.nvidia.com/t/nvvideoconvert-keeps-removing-my-nvdsmeta/158237/3 "2020-11-03T05:54:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kg99](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@kg99](https://forums.developer.nvidia.com/u/kg99)\
**Post date:** [November 3, 2020, 7:17am UTC](https://forums.developer.nvidia.com/t/nvvideoconvert-keeps-removing-my-nvdsmeta/158237/4 "2020-11-03T07:17:50Z")

</div>

> [@kg99](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![Fiona.Chen](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/fiona.chen/32/15508_2.png) [@Fiona.Chen](https://forums.developer.nvidia.com/u/Fiona.Chen)\
**Post date:** [November 3, 2020, 9:56am UTC](https://forums.developer.nvidia.com/t/nvvideoconvert-keeps-removing-my-nvdsmeta/158237/5 "2020-11-03T09:56:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kg99](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@kg99](https://forums.developer.nvidia.com/u/kg99)\
**Post date:** [November 3, 2020, 9:58am UTC](https://forums.developer.nvidia.com/t/nvvideoconvert-keeps-removing-my-nvdsmeta/158237/6 "2020-11-03T09:58:46Z")

</div>

> [@kg99](#):
>
> appsrc-\>nvjpegdec-\>nvvideoconvert-\>nvstreammux-\>nvinfer-\>appsink

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.

---

<div class="post-metadata">

**Author:** ![Fiona.Chen](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/fiona.chen/32/15508_2.png) [@Fiona.Chen](https://forums.developer.nvidia.com/u/Fiona.Chen)\
**Post date:** [November 4, 2020, 4:35am UTC](https://forums.developer.nvidia.com/t/nvvideoconvert-keeps-removing-my-nvdsmeta/158237/7 "2020-11-04T04:35:19Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Fiona.Chen](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/fiona.chen/32/15508_2.png) [@Fiona.Chen](https://forums.developer.nvidia.com/u/Fiona.Chen)\
**Post date:** [November 4, 2020, 7:26am UTC](https://forums.developer.nvidia.com/t/nvvideoconvert-keeps-removing-my-nvdsmeta/158237/8 "2020-11-04T07:26:01Z")

</div>

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](https://forums.developer.nvidia.com/uploads/short-url/6GNV0CcNAmV03cUtCh4Spl4qq2W.c) (19.8 KB)

---

<div class="post-metadata">

**Author:** ![TomNVIDIA](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/tomnvidia/32/14181_2.png) [@TomNVIDIA](https://forums.developer.nvidia.com/u/TomNVIDIA)\
**Post date:** [October 12, 2021, 4:16pm UTC](https://forums.developer.nvidia.com/t/nvvideoconvert-keeps-removing-my-nvdsmeta/158237/10 "2021-10-12T16:16:07Z")

</div>

Closed on October 12, 2021, 4:16pm UTC


