# Inference on multiple streams doesn't work

**URL:** <https://forums.developer.nvidia.com/t/inference-on-multiple-streams-doesnt-work/341307>\
**Category:** DeepStream SDK\
**Tags:** gstreamer, deepstream\
**Created:** [August 5, 2025, 12:30pm UTC](https://forums.developer.nvidia.com/t/inference-on-multiple-streams-doesnt-work/341307 "2025-08-05T12:30:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vaclav.jirka](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@vaclav.jirka](https://forums.developer.nvidia.com/u/vaclav.jirka)\
**Post date:** [August 5, 2025, 12:30pm UTC](https://forums.developer.nvidia.com/t/inference-on-multiple-streams-doesnt-work/341307/1 "2025-08-05T12:30:49Z")

</div>

**• Hardware Platform (Jetson / GPU)** Jetson  
**• DeepStream Version** 7.1  
**• JetPack Version (valid for Jetson only)** 6.2.1  
**• TensorRT Version** 10.3.0.26

Hello, I am currently developing a DeepStream app with Python bindings that should detect cars in a parking lot from multiple cameras. Because the cameras might overlap, I need a different ROI for each camera (source). Every source is a RTSP feed from the cameras. I am using a custom YOLO segmentation model. I am also using a custom inference parser library ([GitHub - marcoslucianops/DeepStream-Yolo-Seg: NVIDIA DeepStream SDK 6.3 / 6.2 / 6.1.1 / 6.1 / 6.0.1 / 6.0 implementation for YOLO-Segmentation models](https://github.com/marcoslucianops/DeepStream-Yolo-Seg)). I have unfortunately run into a bit of an issue when I am testing multiple streams together. If I run the inference on the two streams simultaneously, I always get the inference data only from one of the streams, never from both simultaneously. It does this for a few frames and then switches to the other stream, and I get data only from that stream and not the first one for the next few frames. This then repeats until I stop the stream. It seems like that the inference doesn’t even happen on the other stream and it is ignored. At least this is how it appears in the video with results and the processing of the results. I suspect that this issue might be connected to batching, but after trying multiple settings, the issue persists. Do you know what could be causing such issue and how to get inference on both streams at the same time?  
This is the pipeline:  
nvurisrcbin → [ROI bin] → nvstreammux → nvinfer → queue → nvmultistreamtiler → nvvideoconvert → nvdsosd → nvv4l2h264enc → h264parse → mp4mux → filesink  
Those are the streammux settings:

```auto
width = WIDTH_OF_STREAMS
height = HEIGHT_OF_STREAMS
batch-size = NUMBER_OF_SOURCES
buffer-pool-size = 4 * NUMBER_OF_SOURCES
live-source = 1 if any source is RTSP else 0
batched-push-timeout = 400000
sync-inputs = 1 if live-source else 0
nvbuf-memory-type = 0
attach-sys-ts = 1 (if live-source)

```

Those are the inference settings:

> [property]  
> batch-size=NUMBER\_OF\_SOURCES  
> gpu-id=0  
> net-scale-factor=0.0039215686274509803921568627451  
> model-color-format=0  
> onnx-file=../model\_data/parking-model-v01.onnx  
> model-engine-file=../model\_data/parking-model-v01.onnx\_b2\_gpu0\_fp16.engine  
> labelfile-path=../labels/labels.txt  
> network-mode=2  
> num-detected-classes=1  
> gie-unique-id=1  
> process-mode=1  
> network-type=3  
> cluster-mode=4  
> maintain-aspect-ratio=1  
> symmetric-padding=1  
> parse-bbox-instance-mask-func-name=NvDsInferParseYoloSeg  
> custom-lib-path=../nvdsinfer\_custom\_impl\_Yolo\_seg/libnvdsinfer\_custom\_impl\_Yolo\_seg.so  
> output-instance-mask=1  
> segmentation-threshold=0.3
> 
> [class-attrs-all]  
> pre-cluster-threshold=0.15  
> nms-iou-threshold=0.3  
> topk=500

---

<div class="post-metadata">

**Author:** ![yuweiw](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/yuweiw/32/101255_2.png) [@yuweiw](https://forums.developer.nvidia.com/u/yuweiw)\
**Post date:** [August 6, 2025, 6:07am UTC](https://forums.developer.nvidia.com/t/inference-on-multiple-streams-doesnt-work/341307/3 "2025-08-06T06:07:00Z")

</div>

Could you remove the `[ROI bin]` in your pipeline to narrow down this issue?  
Besides, we suggest you set the `batched-push-timeout = 40000` 40ms. And you can use the yolo model we provided in our sample [deepstream\_tools](https://github.com/NVIDIA-AI-IOT/deepstream_tools).
