Running multiple video sources simultaneously using gstreamer command line

Please provide complete information as applicable to your setup.

**• Hardware Platform (Jetson / GPU) - Tesla T4 **
• DeepStream Version - Deepstream-6.2
• JetPack Version (valid for Jetson only)
• TensorRT Version -
• NVIDIA GPU Driver Version (valid for GPU only) - 525.85.12
• Issue Type( questions, new requirements, bugs) - Query
• 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)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)


I am trying to run my application which takes input (video in my case) from multiple sources, batches them, makes some inference, and then demuxes them to show the inferred output for both the inputs.
I am trying to do this using gstreamer command line (not using APIs). Although I am able to do the same for one source (input ->infer -< output), I am not sure how to add the other source.
In the available document, I do see that nvstreammux should be used to batch multiple sources but it also mentions that a new sink pad should be first requested using “gst_element_get_request_pad()”.
Is there a way I can create multiple input sources and batch them using nvstreammux in gstream command line only (without any APIs being used)? Would be great if I some reference commands can be provided.

The following command was used for inference of 1 source -
m.sink_0 nvstreammux name=m batch-size=1 width=480 height=270 ! nvinfer config-file-path= ! nvstreamdemux name=demuxer_0 demuxer_0.src_0 !
Can you recommend how the same can be extended to multiple sources?


You may refer to the command line in Preprocess in PGIE mode for Multi-stream from page Gst-nvdspreprocess (Alpha) — DeepStream 6.2 Release documentation (

If you want input multiple sources, there are two ways.

1.use multifilesrc,your files name must be like “video_xxx.mp4”,take video_%d.mp4 as input
you can got more informantion from this command

gst-inspect-1.0 multifilesrc

2.if your use gst-launch-1.0 command,please refer this document.this is example for multiple input


Thanks for the reply. My usecase is very much similar to Usecase 1 of the document you provided in Point 2. Thus, I am running the following gst command -

gst-launch-1.0 -e nvstreammux name=mux batch-size=2 width=1920 height=1080 ! nvinfer config-file-path=<path-to-config_infer_primary.txt> batch-size=2 ! nvstreamdemux name=demux filesrc location=<path-to-sample_1080p_h264.264> ! h264parse ! nvv4l2decoder ! queue ! mux.sink_0 filesrc location=<path-to-sample_1080p_h264.264> ! h264parse ! nvv4l2decoder ! queue ! mux.sink_1 demux.src_0 ! “video/x-raw(memory:NVMM), format=NV12” ! queue ! nvvideoconvert ! “video/x-raw(memory:NVMM), format=RGBA” ! nvdsosd ! nvvideoconvert ! nv3dsink demux.src_1 ! queue ! “video/x-raw(memory:NVMM), format=NV12” ! queue ! nvvideoconvert ! “video/x-raw(memory:NVMM), format=RGBA” ! nv3dsink"

The design fails with after printing the following -
(gst-launch-1.0:1564): GStreamer-CRITICAL **: 18:54:35.220: gst_element_make_from_uri: assertion ‘gst_uri_is_valid (uri)’ failed

(gst-launch-1.0:1564): GStreamer-WARNING **: 18:54:35.221: Trying to link elements demux and queue3 that don’t share a common ancestor: queue3 hasn’t been added to a bin or pipeline, and demux is in pipeline0
WARNING: erroneous pipeline: syntax error

Can you please suggest what am I doing wrong?

If your path is correct,the command line on my computer can run success.
Maybe you need to check if there is any non-ascii in your command line

Removing the quotes makes the command work fine (I guess this was the non-ascii character you were talking about). I am now able to see the multiple source videos. Thanks.

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