Batch encoding possible?

I am trying to find out if there is a way to perform batch encoding of the buffers?
For example, my use case has more than 3 streams that need to be processed. Currently it is working well in deepstream-app for 3 streams. But I suspect there would be some unexpected problems if I go beyond because based on the NVENC Support Matrix I see that only 3 concurrent encoding sessions are allowed on the GPU that I have.
Now my question is that is there any way I can perform encoding before nvstreamdemux so I can only have 1 encoder instantiated and it will serve my purpose. Currently I see in the pipeline that there is 1 encoder per sink. So based on that design, I will need multiple GPUs to serve my purpose, right?

I’m looking for something like
nvstreammux ! nvinfer ! nvvideoconvert ! video/x-raw(memory:NVMM), format=I420 ! nvv4l2h265enc ! nvstreamdemux

• Hardware Platform (Jetson / GPU): dGPU
• DeepStream Version: 5.0
• NVIDIA GPU Driver Version (valid for GPU only): RTX 2080Ti


  1. nvstreammux and nvstreamdemux only accept NVMM NV12 or NVMM RGBA input. You can not put encoder before them. Your listed pipeline is wrong.
  2. There is limitation for NVENC, so deepstream also involve software encoder to support multiple streams encoding. Please refer to deepstream-app sample codes.

I see, Thanks @Fiona.Chen
Then I will use the SW encoders instead.