# Deepstream App Config File

**URL:** <https://forums.developer.nvidia.com/t/deepstream-app-config-file/342787>\
**Category:** DeepStream SDK\
**Tags:** deepstream\
**Created:** [August 21, 2025, 5:33pm UTC](https://forums.developer.nvidia.com/t/deepstream-app-config-file/342787 "2025-08-21T17:33:51Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![adityawasnik91](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@adityawasnik91](https://forums.developer.nvidia.com/u/adityawasnik91)\
**Post date:** [August 21, 2025, 5:33pm UTC](https://forums.developer.nvidia.com/t/deepstream-app-config-file/342787/1 "2025-08-21T17:33:51Z")

</div>

Please provide complete information as applicable to your setup.

**• Hardware Platform (Jetson / GPU) :- dGPU**  
**• DeepStream Version:- 7.0**  
\*\*  
How to properly add SGIE in deepstream app ?\*\*

```auto
 {
    "device-configs": {
        "application": {
            "enable-perf-measurement": 1,
            "perf-measurement-interval-sec": 2
        },
        "tiled-display": {
            "enable": 0,
            "rows": 2,
            "columns": 2,
            "width": 1920,
            "height": 1080,
            "gpu-id": 0,
            "nvbuf-memory-type": 0
        },
        "source": {
            "csv-file-path": "sources.csv"
        },
        "sink0": {
            "enable": 1,
            "type": 1,
            "sync": 0,
            "source-id": 0,
            "gpu-id": 0,
            "nvbuf-memory-type": 0
        },
        "sink1": {
            "enable": 0,
            "type": 3,
            "container": 1,
            "codec": 1,
            "enc-type": 0,
            "sync": 0,
            "bitrate": 2000000,
            "profile": 0,
            "output-file": "out.mp4",
            "source-id": 0
        },
        "sink2": {
            "enable": 0,
            "type": "None",
            "codec": 1,
            "enc-type": 0,
            "sync": 0,
            "bitrate": 4000000,
            "profile": 0,
            "rtsp-port": 8554,
            "udp-port": 5400
        },
        "osd": {
            "enable": 1,
            "gpu-id": 0,
            "border-width": 1,
            "text-size": 15,
            "text-color": "1;1;1;1",
            "text-bg-color": "0.3;0.3;0.3;1",
            "font": "Serif",
            "show-clock": 0,
            "clock-x-offset": 800,
            "clock-y-offset": 820,
            "clock-text-size": 12,
            "clock-color": "1;0;0;0",
            "nvbuf-memory-type": 0
        },
        "streammux": {
            "gpu-id": 0,
            "live-source": 1,
            "buffer-pool-size": 4,
            "batch-size": 1,
            "batched-push-timeout": 40000,
            "width": 1920,
            "height": 1080,
            "enable-padding": 0,
            "nvbuf-memory-type": 0
        },
        "primary-gie1": {
            "enable": 1,
            "gpu-id": 0,
            "batch-size": 2,
            "model-engine-file": "dummy-name.engine",
            "bbox-border-color0": "1;0;0;1",
            "bbox-border-color1": "0;1;1;1",
            "bbox-border-color2": "0;0;1;1",
            "bbox-border-color3": "0;1;0;1",
            "interval": 0,
            "gie-unique-id": 1,
            "nvbuf-memory-type": 0,
            "config-file": "/app/models/model1/config.yml"
        },
        "secondary-gie1": {
            "enable": 1,
            "gpu-id": 0,
            "batch-size": 2,
            "model-engine-file": "dummy-name.engine",
            "bbox-border-color0": "1;0;0;1",
            "bbox-border-color1": "0;1;1;1",
            "bbox-border-color2": "0;0;1;1",
            "bbox-border-color3": "0;1;0;1",
            "interval": 0,
            "gie-unique-id": 2,
            "nvbuf-memory-type": 0,
            "config-file": "/app/models/model2/config.yml"
        },
        "secondary-gie2": {
            "enable": 1,
            "gpu-id": 0,
            "batch-size": 2,
            "model-engine-file": "dummy-name.engine",
            "bbox-border-color0": "1;0;0;1",
            "bbox-border-color1": "0;1;1;1",
            "bbox-border-color2": "0;0;1;1",
            "bbox-border-color3": "0;1;0;1",
            "interval": 0,
            "gie-unique-id": 69,
            "nvbuf-memory-type": 0,
            "config-file": "/app/models/model3/config.yml"
        },
        "tracker": {
            "enable": 1,
            "tracker-width": 960,
            "tracker-height": 544,
            "ll-lib-file": "/opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so",
            "ll-config-file": "/app/configs/NvDCF_accuracy.yml",
            "gpu-id": 0,
            "display-tracking-id": 1
        },
        "tests": {
            "file-loop": 0
        },
        "sources-csvpriority": "high"
    }
}

```

Originally, secondary-gie1 was primary-gie2 and secondary-gie2 was primary-gie3, lets call this setting as all-primary-mode  
in the config file pasted above, I have renamed `primary-gie2` as `secondary-gie1` and `primary-gie3` as `secondary-gie2` (lets call it mode-2)

In mode 1, all models are added in primary\_gie\_bin. What I am expecting is when I move to mode-2,  
there should be primary gie bin containing one model, and secondary gie bin containing two models.

but what is happening is, primary gie contains one model as expected but the secondary gie does not contain any model. I am trying to understand why.

 ![Screenshot from 2025-08-21 22-45-04](https://global.discourse-cdn.com/nvidia/original/4X/4/1/3/413cea9f46bc0009041b038aedaf9a383a1de856.png)

Below is my config file.

```auto
property:
  gpu-id: 0
  net-scale-factor: 0.0039215697906911373
  model-color-format: 0
  onnx-file:model.onnx
  # int8-calib-file: calib.table
  labelfile-path: labels.txt
  batch-size: 2
  network-mode: 0
  model-engine-file: some-name.engine
  num-detected-classes: 7
  interval: 0
  gie-unique-id: 2
  process-mode: 2
  operate-on-gie-id: 1 
  network-type: 0
  cluster-mode: 2
  maintain-aspect-ratio: 1
  symmetric-padding: 1
  # workspace-size: 2000
  parse-bbox-func-name: NvDsInferParse
  # parse-bbox-func-name: NvDsInferParse
  custom-lib-path: shared_lib.so
  engine-create-func-name: NvDsInferEngineGet

class-attrs-all:
  nms-iou-threshold: 0.45
  pre-cluster-threshold: 0.08
  topk: 300

```

Please note :- Please ignore model path related things in the config file.

---

<div class="post-metadata">

**Author:** ![junshengy](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/junshengy/32/251332_2.png) [@junshengy](https://forums.developer.nvidia.com/u/junshengy)\
**Post date:** [August 22, 2025, 3:03am UTC](https://forums.developer.nvidia.com/t/deepstream-app-config-file/342787/3 "2025-08-22T03:03:58Z")

</div>

I’m confused by your description.

1.Currently, deepstream-app only supports configuration files in key-file/yaml format. Have you rewritten deepstream-app to support json?

> [@adityawasnik91](#):
>
> ```auto
> "enable": 1,
> "gpu-id": 0,
> "batch-size": 2,
> "model-engine-file": "dummy-name.engine",
> "bbox-border-color0": "1;0;0;1",
> "bbox-border-color1": "0;1;1;1",
> "bbox-border-color2": "0;0;1;1",
> "bbox-border-color3": "0;1;0;1",
> "interval": 0,
> "gie-unique-id": 1,
> "nvbuf-memory-type": 0,
> "config-file": "/app/models/model1/config.yml"
> },
> "secondary-gie1": {
> "enable": 1,
> "gpu-id": 0,
> "batch-size": 2,
> 
> ```

1. This should also be impossible, `deepstream-app` only supports one pgie, because the name of the bin is fixed in the `create_primary_gie_bin` function `bin->bin = gst_bin_new ("primary_gie_bin")`.

> [@adityawasnik91](#):
>
> In mode 1, all models are added in primary\_gie\_bin. What I am expecting is when I move to mode-2,

3.When creating multiple sgies, you need to change the configuration file items of multiple sgies into `config_array`

```auto
gboolean
create_secondary_gie_bin (guint num_secondary_gie, guint primary_gie_unique_id,
    NvDsGieConfig * config_array, NvDsSecondaryGieBin * bin)

```

> [@adityawasnik91](#):
>
> In mode 1, all models are added in primary\_gie\_bin. What I am expecting is when I move to mode-2,

Could you explain how you rewrote your `deepstream-app` using this config file?

---

<div class="post-metadata">

**Author:** ![adityawasnik91](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@adityawasnik91](https://forums.developer.nvidia.com/u/adityawasnik91)\
**Post date:** [August 22, 2025, 3:09am UTC](https://forums.developer.nvidia.com/t/deepstream-app-config-file/342787/4 "2025-08-22T03:09:49Z")

</div>

[files.zip](https://forums.developer.nvidia.com/uploads/short-url/a3nMxkQW9WlL5lbcOrrWaJcGjCf.zip) (26.9 KB)

yes here is the pipeline implementation.

---

<div class="post-metadata">

**Author:** ![junshengy](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/junshengy/32/251332_2.png) [@junshengy](https://forums.developer.nvidia.com/u/junshengy)\
**Post date:** [August 22, 2025, 3:37am UTC](https://forums.developer.nvidia.com/t/deepstream-app-config-file/342787/5 "2025-08-22T03:37:14Z")

</div>

Are you rewriting `deepstream-app`? Please follow the guidance above to build the correct parameters of API. And build the correct pipeline. We cannot fix bugs in these code snippets.

---

<div class="post-metadata">

**Author:** ![adityawasnik91](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@adityawasnik91](https://forums.developer.nvidia.com/u/adityawasnik91)\
**Post date:** [August 22, 2025, 3:38am UTC](https://forums.developer.nvidia.com/t/deepstream-app-config-file/342787/6 "2025-08-22T03:38:52Z")

</div>

I think it is deepstream test 5 sample app

---

<div class="post-metadata">

**Author:** ![adityawasnik91](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@adityawasnik91](https://forums.developer.nvidia.com/u/adityawasnik91)\
**Post date:** [August 22, 2025, 9:37am UTC](https://forums.developer.nvidia.com/t/deepstream-app-config-file/342787/7 "2025-08-22T09:37:07Z")

</div>

I am sorry I gave you the wrong file.

```auto
application:
  enable-perf-measurement: 1
  perf-measurement-interval-sec: 2
tiled-display:
  enable: 0
  rows: 2
  columns: 2
  width: 1920
  height: 1080
  gpu-id: 0
  nvbuf-memory-type: 0
source:
  csv-file-path: sources.csv
sink0:
  enable: 1
  type: 1
  sync: 0
  source-id: 0
  gpu-id: 0
  nvbuf-memory-type: 0
sink1:
  enable: 0
  type: 3
  container: 1
  codec: 1
  enc-type: 0
  sync: 0
  bitrate: 2000000
  profile: 0
  output-file: out.mp4
  source-id: 0
sink2:
  enable: 0
  type: None
  codec: 1
  enc-type: 0
  sync: 0
  bitrate: 4000000
  profile: 0
  rtsp-port: 8554
  udp-port: 5400
osd:
  enable: 1
  gpu-id: 0
  border-width: 1
  text-size: 15
  text-color: 1;1;1;1
  text-bg-color: 0.3;0.3;0.3;1
  font: Serif
  show-clock: 0
  clock-x-offset: 800
  clock-y-offset: 820
  clock-text-size: 12
  clock-color: 1;0;0;0
  nvbuf-memory-type: 0
streammux:
  gpu-id: 0
  live-source: 1
  buffer-pool-size: 4
  batch-size: 1
  batched-push-timeout: 40000
  width: 1920
  height: 1080
  enable-padding: 0
  nvbuf-memory-type: 0
primary-gie1:
  enable: 1
  gpu-id: 0
  batch-size: 2
  model-engine-file: model1.engine
  bbox-border-color0: 1;0;0;1
  bbox-border-color1: 0;1;1;1
  bbox-border-color2: 0;0;1;1
  bbox-border-color3: 0;1;0;1
  interval: 0
  gie-unique-id: 1
  nvbuf-memory-type: 0
  config-file: config1.yml
primary-gie2:
  enable: 1
  gpu-id: 0
  batch-size: 2
  model-engine-file: model2.engine
  bbox-border-color0: 1;0;0;1
  bbox-border-color1: 0;1;1;1
  bbox-border-color2: 0;0;1;1
  bbox-border-color3: 0;1;0;1
  interval: 0
  gie-unique-id: 2
  nvbuf-memory-type: 0
  config-file: config.yml
primary-gie3:
  enable: 1
  gpu-id: 0
  batch-size: 2
  model-engine-file: model3.engine
  bbox-border-color0: 1;0;0;1
  bbox-border-color1: 0;1;1;1
  bbox-border-color2: 0;0;1;1
  bbox-border-color3: 0;1;0;1
  interval: 0
  gie-unique-id: 69
  nvbuf-memory-type: 0
  config-file: /app/models/yolov8s-3/config.yml
tracker:
  enable: 1
  tracker-width: 960
  tracker-height: 544
  ll-lib-file: /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so
  ll-config-file: /app/configs/NvDCF_accuracy.yml
  gpu-id: 0
  display-tracking-id: 1
tests:
  file-loop: 0
sources-csvpriority: high

```

if I just change primary-gie2 to secondary-gie1 (and process mode of that model) , will it behave like secondary gie ?

---

<div class="post-metadata">

**Author:** ![junshengy](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/junshengy/32/251332_2.png) [@junshengy](https://forums.developer.nvidia.com/u/junshengy)\
**Post date:** [August 25, 2025, 4:05am UTC](https://forums.developer.nvidia.com/t/deepstream-app-config-file/342787/8 "2025-08-25T04:05:20Z")

</div>

It all depends on your code

1. `deepstream-test5` depends on `deepstream_app_config_parser.c`. This parser only supports one `primary-gie` and does not support parsing like `primary-giex`. pgie is usually used as a detector

2.Multiple sgies need to be created using `create_secondary_gie_bin` and will be treated as one bin. sgie is usually used as a classifier.

Both deepstream-app and deepstream-test5 share these codes

---

<div class="post-metadata">

**Author:** ![yingliu](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/yingliu/32/136703_2.png) [@yingliu](https://forums.developer.nvidia.com/u/yingliu)\
**Post date:** [September 26, 2025, 6:55am UTC](https://forums.developer.nvidia.com/t/deepstream-app-config-file/342787/9 "2025-09-26T06:55:42Z")

</div>

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/system/32/68080_2.png) [@system](https://forums.developer.nvidia.com/u/system)\
**Post date:** [October 10, 2025, 6:56am UTC](https://forums.developer.nvidia.com/t/deepstream-app-config-file/342787/10 "2025-10-10T06:56:14Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
