# Batch-size with 9 rtsp streams

**URL:** <https://forums.developer.nvidia.com/t/batch-size-with-9-rtsp-streams/167382>\
**Category:** DeepStream SDK\
**Tags:** hw, gstreamer, cuda\
**Created:** [February 2, 2021, 6:49am UTC](https://forums.developer.nvidia.com/t/batch-size-with-9-rtsp-streams/167382 "2021-02-02T06:49:36Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![sharma.rahul98912](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@sharma.rahul98912](https://forums.developer.nvidia.com/u/sharma.rahul98912)\
**Post date:** [February 2, 2021, 6:49am UTC](https://forums.developer.nvidia.com/t/batch-size-with-9-rtsp-streams/167382/1 "2021-02-02T06:49:37Z")

</div>

Please provide complete information as applicable to your setup.  
**• Hardware Platform (Jetson / GPU)** GPU (2080 ti)  
**• DeepStream Version** 5.0  
**• JetPack Version (valid for Jetson only)**  
**• TensorRT Version** 7.2.1  
**• NVIDIA GPU Driver Version (valid for GPU only)** 450.102.04  
**• Issue Type( questions, new requirements, bugs)** Question  
**• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)**

batch-size=9 in [streamux] group in config\_file.txt with 9 rtsp sources.

**• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)**

Hi,  
I have few observations to share for my custom Retinaface model with deepstream5 and 9 rtsp video sources.

1. I used trtexec for onnx to .engine file conversion with “–explicitBatch” parameter as directly loading onnx to deepstream was giving me error for “EXPLICIT\_BATCH (!\_importer\_ctx.network()-\>hasImplicitBatchDimension())”.

I tested with “batch-size=5 in [streamux] group and batch-size=1 in [pgie] group as onnx model was created with batch-size=1”…  
**The model ran fine and all cameras were set to 20 fps and performance of deepstream was close to 18fps…**.  
Is it fine to put batch-size as mentioned?

1. I found that “batch-size” parameter in [streamux] group are needed to be set according to number of sources. So i set that to 9 and then deepstream hangs when i start and performance gives me 0 value for all the cameras.  
Also if i set “batch-size=1”, then it runs but with 6fps of speed.  
**Not sure why.**

2. I converted onnx model with batch-size=9 and did trtexec again to build the engine file like-  
“trtexec --batch=9 --onnx=onnx-model --saveEngine=output.engine”

And then tried with "batch-size=9 " in both [pgie] and [streamux] group but this time there was error-  
**WARNING: nvdsinfer\_backend.cpp:162 Backend context bufferIdx(0) request dims:1x3x640x640 is out of range, [min: 10x3x640x640, max: 10x3x640x640]**  
\*\*ERROR: nvdsinfer\_backend.cpp:425 Failed to enqueue buffer in fulldims mode because binding idx: 0 with batchDims: 1x3x640x640 is not supported \*\*  
**ERROR: nvdsinfer\_context\_impl.cpp:1532 Infer context enqueue buffer failed, nvinfer error:NVDSINFER\_INVALID\_PARAMS**  
**0:00:05.307619290 18160 0x559e34047f70 WARN nvinfer gstnvinfer.cpp:1216:gst\_nvinfer\_input\_queue\_loop:\<primary\_gie\> error: Failed to queue input batch for inferencing**  
**ERROR from primary\_gie: Failed to queue input batch for inferencing**

Any suggestions on all above observations? or i can go with batch-size=5 but this feels like a decent escape rather than solving.

I have seen many posts regarding batch-size but not cleared for my case.  
Thanks.

---

<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:** [February 2, 2021, 9:00am UTC](https://forums.developer.nvidia.com/t/batch-size-with-9-rtsp-streams/167382/3 "2021-02-02T09:00:16Z")

</div>

1. You are using onnx model, right? Does your onnx model support dynamic batch?
2. Yes. “batch-size” parameter in [streamux] group are needed to be set according to number of sources. And you are using rtsp source, please set “live-source=1” in [streammux] group too. What is the FPS of your rtsp sources? You also need to set “batched-push-timeout=40000” in [streammux] group. Set “sync=0” in [sink] group.
3. streammux has nothing to do with your model batch size, you just need to set nvinfer batch-size according to your model. Does your onnx model support dynamic batch? If so, you can try “trtexec --maxBatch=9 --onnx=onnx-model --saveEngine=output.engine”

---

<div class="post-metadata">

**Author:** ![sharma.rahul98912](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@sharma.rahul98912](https://forums.developer.nvidia.com/u/sharma.rahul98912)\
**Post date:** [February 2, 2021, 9:33am UTC](https://forums.developer.nvidia.com/t/batch-size-with-9-rtsp-streams/167382/4 "2021-02-02T09:33:03Z")

</div>

> [@Fiona.Chen](#):
>
> sync

Hi,  
Thanks for the reply.

**1. You are using onnx model, right? Does your onnx model support dynamic batch?**  
Yes. But for that in need to disable --explicitBatch while using trtexec for engine file generation.

**2. Yes. “batch-size” parameter in [streamux] group are needed to be set according to number of sources. And you are using rtsp source, please set “live-source=1” in [streammux] group too. What is the FPS of your rtsp sources? You also need to set “batched-push-timeout=40000” in [streammux] group. Set “sync=0” in [sink] group.**  
I did setup all the options- live-source, batch-push-timeout, and sync.

**3. streammux has nothing to do with your model batch size, you just need to set nvinfer batch-size according to your model. Does your onnx model support dynamic batch? If so, you can try “trtexec --maxBatch=9 --onnx=onnx-model --saveEngine=output.engine”**  
I did the same "trtexec --maxBatch=9 --onnx=onnx-model --saveEngine=output.engine” But have issue-

0:00:00.824015848 25896 0x55b4e434fc40 WARN nvinfer gstnvinfer.cpp:616:gst\_nvinfer\_logger: NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::checkBackendParams() \<nvdsinfer\_context\_impl.cpp:1642\> [UID = 1]: Backend has maxBatchSize 1 whereas 10 has been requested  
0:00:00.824039004 25896 0x55b4e434fc40 WARN nvinfer gstnvinfer.cpp:616:gst\_nvinfer\_logger: NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::generateBackendContext() \<nvdsinfer\_context\_impl.cpp:1813\> [UID = 1]: deserialized backend context :/home/rahul/DS/launchconfigs/facedetector/output.engine failed to match config params, trying rebuild  
0:00:00.826536362 25896 0x55b4e434fc40 INFO nvinfer gstnvinfer.cpp:619:gst\_nvinfer\_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() \<nvdsinfer\_context\_impl.cpp:1715\> [UID = 1]: Trying to create engine from model files

## Input filename: /home/rahul/DS/launchconfigs/facedetector/mnet\_025\_mean\_fixed\_640\_op11\_simplified.onnx ONNX IR version: 0.0.6 Opset version: 11 Producer name: pytorch Producer version: 1.7 Domain: Model version: 0 Doc string:

WARNING: ../nvdsinfer/nvdsinfer\_func\_utils.cpp:36 [TRT]: onnx2trt\_utils.cpp:220: Your ONNX model has been generated with INT64 weights, while TensorRT does not natively support INT64. Attempting to cast down to INT32.  
WARNING: ../nvdsinfer/nvdsinfer\_func\_utils.cpp:36 [TRT]: TensorRT was linked against cuDNN 8.0.4 but loaded cuDNN 8.0.2  
INFO: ../nvdsinfer/nvdsinfer\_func\_utils.cpp:39 [TRT]: Detected 1 inputs and 9 output network tensors.  
WARNING: ../nvdsinfer/nvdsinfer\_func\_utils.cpp:36 [TRT]: TensorRT was linked against cuDNN 8.0.4 but loaded cuDNN 8.0.2  
0:00:15.363621720 25896 0x55b4e434fc40 INFO nvinfer gstnvinfer.cpp:619:gst\_nvinfer\_logger: NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() \<nvdsinfer\_context\_impl.cpp:1748\> [UID = 1]: serialize cuda engine to file: /home/rahul/DS/launchconfigs/facedetector/mnet\_025\_mean\_fixed\_640\_op11\_simplified.onnx\_b10\_gpu0\_fp32.engine successfully  
WARNING: ../nvdsinfer/nvdsinfer\_func\_utils.cpp:36 [TRT]: TensorRT was linked against cuDNN 8.0.4 but loaded cuDNN 8.0.2  
INFO: ../nvdsinfer/nvdsinfer\_model\_builder.cpp:685 [FullDims Engine Info]: layers num: 4  
0 INPUT kFLOAT input0 3x640x640 min: 1x3x640x640 opt: 10x3x640x640 Max: 10x3x640x640  
1 OUTPUT kFLOAT locs -1x4 min: 0 opt: 0 Max: 0  
2 OUTPUT kFLOAT landmarks -1x10 min: 0 opt: 0 Max: 0  
3 OUTPUT kFLOAT scores -1x2 min: 0 opt: 0 Max: 0

---

<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:** [February 2, 2021, 9:42am UTC](https://forums.developer.nvidia.com/t/batch-size-with-9-rtsp-streams/167382/5 "2021-02-02T09:42:23Z")

</div>

Can you use netron to check your model’s input layer information and show the information to us?

---

<div class="post-metadata">

**Author:** ![sharma.rahul98912](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@sharma.rahul98912](https://forums.developer.nvidia.com/u/sharma.rahul98912)\
**Post date:** [February 2, 2021, 9:58am UTC](https://forums.developer.nvidia.com/t/batch-size-with-9-rtsp-streams/167382/6 "2021-02-02T09:58:22Z")

</div>

> [@Fiona.Chen](#):
>
> information

Hi,  
INPUTS  
input0 : name:input0  
type: float32[1,3,640,640]

OUTPUTS

- 

name: **locs**

type: `float32[1,16800,4]`

- 

name: **scores**

type: `float32[1,16800,2]`

- 

name: **landmarks**

type: `float32[1,16800,10]`

---

<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:** [February 2, 2021, 10:06am UTC](https://forums.developer.nvidia.com/t/batch-size-with-9-rtsp-streams/167382/7 "2021-02-02T10:06:17Z")

</div>

Your model does not supports dynamic batch.

It only supports explicit batch size and the batch size is 1.  
Your nvinfer batch-size can only be 1

---

<div class="post-metadata">

**Author:** ![sharma.rahul98912](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@sharma.rahul98912](https://forums.developer.nvidia.com/u/sharma.rahul98912)\
**Post date:** [February 2, 2021, 10:09am UTC](https://forums.developer.nvidia.com/t/batch-size-with-9-rtsp-streams/167382/8 "2021-02-02T10:09:51Z")

</div>

Ok.

To make my model dynamic batch support, i am following this-

import onnx

def change\_input\_output\_dim(model):  
batch\_dim = 0

```
inputs = model.graph.input
for input in inputs:
    dim1 = input.type.tensor_type.shape.dim[0]
    dim1.dim_value = batch_dim

outputs = model.graph.output
for output in outputs:
    dim2 = output.type.tensor_type.shape.dim[0]
    dim2.dim_value = batch_dim

```

def apply(transform, infile, outfile):  
model = onnx.load(infile)  
transform(model)  
onnx.save(model, outfile)

apply(change\_input\_output\_dim, r"old.onnx", r"updated.onnx")

Is it correct? or i need to do something else?

---

<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:** [February 2, 2021, 10:15am UTC](https://forums.developer.nvidia.com/t/batch-size-with-9-rtsp-streams/167382/9 "2021-02-02T10:15:45Z")

</div>

If you are using Pytorch to export model, please refre to Pytorch document.  
For TensorRT, please refer to [TensorRT/ONNX - eLinux.org](https://elinux.org/TensorRT/ONNX#How_to_modify_the_model_to_replace_batch_dimension_with_dynamic_dim.3F)

---

<div class="post-metadata">

**Author:** ![sharma.rahul98912](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@sharma.rahul98912](https://forums.developer.nvidia.com/u/sharma.rahul98912)\
**Post date:** [February 2, 2021, 10:50am UTC](https://forums.developer.nvidia.com/t/batch-size-with-9-rtsp-streams/167382/10 "2021-02-02T10:50:13Z")

</div>

Hi i have few questions-

if i use --explicitBatch instead of --maxBatch=9, that also means that batch-size can be assign externally…?

I converted the model to support dynamic batch and Netron output is -

- 

INPUTS  
name: **input0**

type: `float32[-1,3,640,640]`

OUTPUTS

- 

name: **locs**

type: `float32[-1,16800,4]`

- 

name: **scores**

type: `float32[-1,16800,2]`

- 

name: **landmarks**

type: `float32[-1,16800,10]`

Is it fine to be used as dynamic batch model? May be i am misunderstanding dynamic batching.

If still it is not dynamic batch supported, then i have another model-  
whose netron output is -

data  
name: data  
type: float32[1,3,640,640]  
face\_rpn\_cls\_prob\_reshape\_stride32  
name: face\_rpn\_cls\_prob\_reshape\_stride32  
type: float32[1,4,20,20]  
face\_rpn\_bbox\_pred\_stride32  
name: face\_rpn\_bbox\_pred\_stride32  
type: float32[1,8,20,20]  
face\_rpn\_landmark\_pred\_stride32  
name: face\_rpn\_landmark\_pred\_stride32  
type: float32[1,20,20,20]  
face\_rpn\_cls\_prob\_reshape\_stride16  
name: face\_rpn\_cls\_prob\_reshape\_stride16  
type: float32[1,4,40,40]  
face\_rpn\_bbox\_pred\_stride16  
name: face\_rpn\_bbox\_pred\_stride16  
type: float32[1,8,40,40]  
face\_rpn\_landmark\_pred\_stride16  
name: face\_rpn\_landmark\_pred\_stride16  
type: float32[1,20,40,40]  
face\_rpn\_cls\_prob\_reshape\_stride8  
name: face\_rpn\_cls\_prob\_reshape\_stride8  
type: float32[1,4,80,80]  
face\_rpn\_bbox\_pred\_stride8  
name: face\_rpn\_bbox\_pred\_stride8  
type: float32[1,8,80,80]  
face\_rpn\_landmark\_pred\_stride8  
name: face\_rpn\_landmark\_pred\_stride8  
type: float32[1,20,80,80]

Can i use this as dynamic batch supported model?

---

<div class="post-metadata">

**Author:** ![sharma.rahul98912](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@sharma.rahul98912](https://forums.developer.nvidia.com/u/sharma.rahul98912)\
**Post date:** [February 2, 2021, 4:21pm UTC](https://forums.developer.nvidia.com/t/batch-size-with-9-rtsp-streams/167382/11 "2021-02-02T16:21:56Z")

</div>

one more thing.

If engine file is created with trtexec --explicitBatch, then it should not matter with getMaxBatchsize… But still it shows getMaxBatchsize = 1.

---

<div class="post-metadata">

**Author:** ![mchi](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/mchi/32/14043_2.png) [@mchi](https://forums.developer.nvidia.com/u/mchi)\
**Post date:** [February 3, 2021, 5:13am UTC](https://forums.developer.nvidia.com/t/batch-size-with-9-rtsp-streams/167382/12 "2021-02-03T05:13:25Z")

</div>

Hi @sharma.rahul98912 ,  
What’s the error with command  
$ trtexec --maxBatch=9 --onnx=onnx-model --saveEngine=output.engine

Thanks!

---

<div class="post-metadata">

**Author:** ![sharma.rahul98912](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@sharma.rahul98912](https://forums.developer.nvidia.com/u/sharma.rahul98912)\
**Post date:** [February 3, 2021, 5:25am UTC](https://forums.developer.nvidia.com/t/batch-size-with-9-rtsp-streams/167382/13 "2021-02-03T05:25:57Z")

</div>

Hi,  
There is no error while conversion with mentioned command.  
Whenever i run deepstream app with generated model with following params-  
batch-size in streamux group = 9 (9 cameras)  
batch-size in pgie group = 9 (as i think with maxBatch=9, i can assign batch=9)  
batch-size in property group in “config\_infer\_primary.txt” = 9.

Then it shows runtime error-

0:00:00.764959542 15224 0x55d15dabab60 WARN nvinfer gstnvinfer.cpp:616:gst\_nvinfer\_logger:\<primary\_gie\> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::checkBackendParams() \<nvdsinfer\_context\_impl.cpp:1642\> [UID = 1]: Backend has maxBatchSize 1 whereas 9 has been requested  
0:00:00.764967237 15224 0x55d15dabab60 WARN nvinfer gstnvinfer.cpp:616:gst\_nvinfer\_logger:\<primary\_gie\> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::generateBackendContext() \<nvdsinfer\_context\_impl.cpp:1813\> [UID = 1]: deserialized backend context :/home/rahul/DS/launchconfigs/facedetector/new.engine failed to match config params, trying rebuild  
0:00:00.766699710 15224 0x55d15dabab60 INFO nvinfer gstnvinfer.cpp:619:gst\_nvinfer\_logger:\<primary\_gie\> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() \<nvdsinfer\_context\_impl.cpp:1715\> [UID = 1]: Trying to create engine from model files  
ERROR: …/nvdsinfer/nvdsinfer\_model\_builder.cpp:934 failed to build network since there is no model file matched.  
ERROR: …/nvdsinfer/nvdsinfer\_model\_builder.cpp:872 failed to build network.  
0:00:00.766973424 15224 0x55d15dabab60 ERROR nvinfer gstnvinfer.cpp:613:gst\_nvinfer\_logger:\<primary\_gie\> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::buildModel() \<nvdsinfer\_context\_impl.cpp:1735\> [UID = 1]: build engine file failed  
0:00:00.766998686 15224 0x55d15dabab60 ERROR nvinfer gstnvinfer.cpp:613:gst\_nvinfer\_logger:\<primary\_gie\> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::generateBackendContext() \<nvdsinfer\_context\_impl.cpp:1821\> [UID = 1]: build backend context failed  
0:00:00.767005948 15224 0x55d15dabab60 ERROR nvinfer gstnvinfer.cpp:613:gst\_nvinfer\_logger:\<primary\_gie\> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::initialize() \<nvdsinfer\_context\_impl.cpp:1148\> [UID = 1]: generate backend failed, check config file settings  
0:00:00.767031538 15224 0x55d15dabab60 WARN nvinfer gstnvinfer.cpp:809:gst\_nvinfer\_start:\<primary\_gie\> error: Failed to create NvDsInferContext instance  
0:00:00.767037169 15224 0x55d15dabab60 WARN nvinfer gstnvinfer.cpp:809:gst\_nvinfer\_start:\<primary\_gie\> error: Config file path: /home/rahul/DS/launchconfigs/config\_infer\_primary\_retinaface.txt, NvDsInfer Error: NVDSINFER\_CONFIG\_FAILED  
\*\* ERROR: main:660: Failed to set pipeline to PAUSED  
Quitting

---

<div class="post-metadata">

**Author:** ![mchi](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/mchi/32/14043_2.png) [@mchi](https://forums.developer.nvidia.com/u/mchi)\
**Post date:** [February 3, 2021, 5:57am UTC](https://forums.developer.nvidia.com/t/batch-size-with-9-rtsp-streams/167382/14 "2021-02-03T05:57:51Z")

</div>

could you share your nvinfer DS config file?

---

<div class="post-metadata">

**Author:** ![sharma.rahul98912](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@sharma.rahul98912](https://forums.developer.nvidia.com/u/sharma.rahul98912)\
**Post date:** [February 3, 2021, 6:00am UTC](https://forums.developer.nvidia.com/t/batch-size-with-9-rtsp-streams/167382/15 "2021-02-03T06:00:49Z")

</div>

> [@sharma.rahul98912](#):
>
> NvDsInferContext

It is going time consuming. I will update my points again. Please correct if i am wrong.

My model should be dynamic batch supported to be used with more batch size and then "trtexec --maxbatch=9 "command will make expected model. I am working to make the model dynamic batch support.  
If i see something like 1x256x1x6 next to the input node, then it’s fixed. If i see something like x256x1x6 then it’s dynamic. Is this right?

1. Another method is that i can directly load onnx model to deepstream config\_infer\_primary.txt and deepstream internally convert that onnx to .engine file.

Then it showed error-

**ERROR: ModelImporter.cpp:474 In function importModel:**  
\*\* **Assertion failed: !\_importer\_ctx.network()-\>hasImplicitBatchDimension() && “This version of the ONNX parser only supports TensorRT INetworkDefinitions with an explicit batch dimension. Please ensure the network was created using the EXPLICIT\_BATCH NetworkDefinitionCreationFlag.”**\*\*

So my doubt is where can i find the required file where i can put this-  
(1) const auto explicitBatch = 1U \<\< static\_cast\<uint32\_t\>(nvinfer1::NetworkDefinitionCreationFlag::kEXPLICIT\_BATCH);  
(2) auto network = GhUniquePtr(builder-\>createNetworkV2(explicitBatch));

---

<div class="post-metadata">

**Author:** ![sharma.rahul98912](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@sharma.rahul98912](https://forums.developer.nvidia.com/u/sharma.rahul98912)\
**Post date:** [February 3, 2021, 6:52am UTC](https://forums.developer.nvidia.com/t/batch-size-with-9-rtsp-streams/167382/16 "2021-02-03T06:52:11Z")

</div>

Hi ,  
one update-

I have updated my model to support dynamic batch-

Netron shows-

## INPUTS

name: **input0**

type: `float32[N,3,640,640]`

**OUTPUTS**

- 

name: **locs**

type: `float32[N,16800,4]`

- 

name: **scores**

type: `float32[N,16800,2]`

- 

name: **landmarks**

type: `float32[N,16800,10]`

Please let me know if this is fine and i can use "trtexec --maxBatch=9 --onnx=onnx-model --saveEngine=output.engine "?

---

<div class="post-metadata">

**Author:** ![sharma.rahul98912](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@sharma.rahul98912](https://forums.developer.nvidia.com/u/sharma.rahul98912)\
**Post date:** [February 3, 2021, 9:06am UTC](https://forums.developer.nvidia.com/t/batch-size-with-9-rtsp-streams/167382/17 "2021-02-03T09:06:02Z")

</div>

Hi closing the issue as i got it working with command-  
trtexec --explicitBatch   
–shapes=input0:6x3x640x640   
–optShapes=input0:2x3x640x640   
–minShapes=input0:1x3x640x640   
–maxShapes=input0:12x3x640x640   
–onnx=mnet\_025\_mean\_fixed\_640\_op11\_dyn\_simplified.onnx   
–saveEngine=mnet\_025\_mean\_fixed\_640\_op11\_dyn\_simplified.engine

Thanks for the support and important information.

---

<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:15pm UTC](https://forums.developer.nvidia.com/t/batch-size-with-9-rtsp-streams/167382/19 "2021-10-12T16:15:17Z")

</div>

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


