# Source\_id in frame\_meta is Not Working Properly

**URL:** <https://forums.developer.nvidia.com/t/source-id-in-frame-meta-is-not-working-properly/145521>\
**Category:** DeepStream SDK\
**Created:** [August 5, 2020, 1:28pm UTC](https://forums.developer.nvidia.com/t/source-id-in-frame-meta-is-not-working-properly/145521 "2020-08-05T13:28:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon75367742](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@anon75367742](https://forums.developer.nvidia.com/u/anon75367742)\
**Post date:** [August 5, 2020, 1:28pm UTC](https://forums.developer.nvidia.com/t/source-id-in-frame-meta-is-not-working-properly/145521/1 "2020-08-05T13:28:37Z")

</div>

I’m developing a custom plugin using DeepStream 5.0 on T4 platform.

Base on gst-dsexample, I’m trying to implement a simple function to add some texts for display on selected video sources.

I’m doing this by changing _gst\_dsexample\_transform\_ip_ function in gstdsexample.cpp:

```auto
  // Iterating through frames in batched meta from diff. sources
  for (l_frame = batch_meta->frame_meta_list; l_frame != NULL;
      l_frame = l_frame->next) {
    frame_meta = (NvDsFrameMeta *) (l_frame->data);
    if (frame_meta->source_id == 0) // Add to video source with id 0
      attach_metadata_full_frame(dsexample, frame_meta); // Add NvDsDisplayMeta to display on screen
  }

```

My intention is to add text on video source with id 0, but when I run the program with 2 input sources from file, the texts keep jumping between the input videos.

---

<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:** [August 6, 2020, 2:48am UTC](https://forums.developer.nvidia.com/t/source-id-in-frame-meta-is-not-working-properly/145521/3 "2020-08-06T02:48:39Z")

</div>

What app are you using? If it your own app, please provide the source codes or how can I reproduce your problem in my side.

---

<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:** [September 10, 2020, 10:01am UTC](https://forums.developer.nvidia.com/t/source-id-in-frame-meta-is-not-working-properly/145521/5 "2020-09-10T10:01:54Z")

</div>

Your test app is wrong. The nvdsosd should be downstream of nvdsmultistreamtiler, please refer to deepstream-test3 for the correct pipeline order.

---

<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/source-id-in-frame-meta-is-not-working-properly/145521/7 "2021-10-12T16:16:36Z")

</div>


