# Multistream inference
Source: [https://docs.qualcomm.com/doc/80-70020-50/topic/multistream-inference.html](https://docs.qualcomm.com/doc/80-70020-50/topic/multistream-inference.html)
The **gst-ai-multistream-inference** application shows AI inference (object
detection and classification) on up to 32 input streams coming from camera, file, or RTSP
stream.
The following figure shows the pipeline, which receives several input streams,
preprocesses them, runs AI inferences, combines the streams, and merges them all into a
single video output.
The maximum number of input streams supported on each SoC are follows:
- QCS6490–8
- Dragonwing IQ-8275–16
- Dragonwing IQ-9075–32
Note: For Ubuntu Server, this sample application isn't
supported on Dragonwing IQ-8275.
The output is displayed on an HDMI display, saved as an H.264 encoded MP4 file, or
converted into an RTSP stream.
For information about the plugins used in this pipeline, see [Pipeline flow](https://docs.qualcomm.com/doc/80-70020-50/topic/multistream-inference.html#multistream-inference__section_opk_tn2_ncc).
Figure : gst-ai-multistream-inference pipeline
## Sample model and label files
Table : Sample model and label files for gst-ai-multistream-inference
| Runtime | Model files | Label files |
| :--- | :--- | :--- |
| LiteRT |
inception_v3_quantized.tflite yolox_quantized.tflite | yolox.labels Classification.labels |
## Run the application on the target device
The sample application uses the
/etc/configs/config-multistream-inference.json file to read
the input parameters.
To create your own config JSON file, use [config-multistream-inference.json](https://git.codelinaro.org/clo/le/platform/vendor/qcom-opensource/gst-plugins-qti-oss/-/blob/imsdk.lnx.2.0.0.r2-rel/gst-sample-apps/gst-ai-multistream-inference/config-multistream-inference.json) as a
reference.
1. Ensure that you complete the [Prerequisites](https://docs.qualcomm.com/doc/80-70020-50/topic/download-model-and-label-files.html).
2. Update the config JSON file based on the model, input stream, and other
properties. For more information, see [Config JSON field description](https://docs.qualcomm.com/doc/80-70020-50/topic/multistream-inference.html#multistream-inference__section_x4t_bj1_42c).
3. Use the following format of the
config-multistream-inference.json
file:
{
"input-file-path": [
" ",
" "
],
"input-rtsp-path": [
"",
""
],
"input-type": ""
"model": "",
"labels": "",
"constants" : "",
"output-display": <0 or 1>,
"output-file-path": "",
"output-ip-address": "",
"output-port-number": "",
"use-case": <0 or 1>
}Copy to clipboard
For example, run the application for object detection on 16 H.264 file inputs and view the output
on a Wayland display:
{
"input-file-path":
[
"/etc/media/video.mp4",
"/etc/media/video.mp4",
"/etc/media/video.mp4",
"/etc/media/video.mp4",
"/etc/media/video.mp4",
"/etc/media/video.mp4",
"/etc/media/video.mp4",
"/etc/media/video.mp4",
"/etc/media/video.mp4",
"/etc/media/video.mp4",
"/etc/media/video.mp4",
"/etc/media/video.mp4",
"/etc/media/video.mp4",
"/etc/media/video.mp4",
"/etc/media/video.mp4",
"/etc/media/video.mp4"
],
"model": "/etc/models/yolox_quantized.tflite",
"labels": "/etc/labels/yolox.labels",
"constants": "YOLOx,q-offsets=<38.0, 0.0, 0.0>,q-scales=<3.6124823093414307, 0.003626860911026597, 1.0>;",
"input-type": "h264",
"output-display": 1,
"use-case": 0
}Copy to clipboard
4. Run the gst-ai-multistream-inference application:
gst-ai-multistream-inference --config-file=/etc/configs/config-multistream-inference.jsonCopy to clipboard
5. To display the available help options, run the following commands in the SSH
shell:
gst-ai-multistream-inference -hCopy to clipboard
6. To stop the use case, use CTRL + C.
## Expected output
Figure : Expected output for gst-ai-multistream-inference

## Pipeline flow
The following table lists the plugins used in the multistream inference
pipeline:| Plugin | Description |
| --- | --- |
| Camera source:[qtiqmmfsrc](https://docs.qualcomm.com/doc/80-70020-50/topic/qtiqmmfsrc.html) | Captures the live stream from camera. Uses tee to split the stream for inferencing. |
| File source: filesrc | Captures the video stream using filesrc, followed by qtdemux, which demultiplexes the stream. Uses tee to split the stream for inferencing. |
| RTSP source: rtspsrc | Captures the RTSP stream using rtspsrc, followed by rtph264depay for video extraction. Uses tee to split the stream for inferencing. |
| h264parse | Parses the H.264 video. |
| [v4l2h264dec](https://docs.qualcomm.com/doc/80-70020-50/topic/v4l2h264dec.html) | Decodes the video. |
| [qtimlvconverter](https://docs.qualcomm.com/doc/80-70020-50/topic/qtimlvconverter.html) | Receives the video stream on its sink pad. Performs the following preprocessing on the stream data. This preprocessing is done when the model expects floating-point values as input. Color conversion Scaling (up or down) Normalization The tensor stream is used for inferencing in the later stages of the pipeline. |
| [qtimltflite](https://docs.qualcomm.com/doc/80-70020-50/topic/qtimltflite.html) | It runs on LiteRT and uses a quantized YOLOv8 model for object detection and a quantized Inception v3 model for classification. After the inference runtime receives the tensor stream on its sink pad, it runs the inference. Produces a tensor stream with the inference results on its source pad. |
| Postprocessing plugins | Handles the inference results from any object detection, classification, pose detection, and segmentation model. qtimlvdetection : Applies a threshold to the chosen number of results. Loads the YOLO-NAS module. Produces video frames with only bounding boxes that can be overlaid on objects, sending them to the sink pad of the qtivcomposer. qtimlvclassification Applies the threshold to the chosen number of results. Loads the MobileNet module. Produces results as video frames with classification labels, sending them to the sink pad of the qtivcomposer. |
| [qtivcomposer](https://docs.qualcomm.com/doc/80-70020-50/topic/qtivcomposer.html) | Composes frames with contents from its sink pads. Pushes the GStreamer buffers containing these composed frames to its source pad. |
| [Waylandsink](https://docs.qualcomm.com/doc/80-70020-50/topic/waylandsink.html) | Waylandsink submits the video stream received on its sink pad to Weston. Weston renders the video stream on a local display. |
| Filesink | Receives the video stream on its sink pad. Saves the stream as a H.264-encoded MP4 file. |
| [qtirtspbin](https://docs.qualcomm.com/doc/80-70020-50/topic/qtirtspbin.html) | Serves as a network sink. Transmits UDP packets to the network. |
## Config JSON field description
The different parameters available to configure the JSON file and run the use case
are as follows:
Table : Field description–gst-ai-multistream-inference file
| Field | Values/description |
| :--- | :--- |
| **Input source** | Use one of the following input sources: num-camera: The number of inputs from the camera. camera: The input camera if num-camera=1. input-file-path: The directory path to the video file. input-rtsp-path: The address of the RTSP stream: rtsp://<ip>:<port>/<stream> |
| **input-type** | The video encoding type for file and RTSP input: |
| **Output** | Use one of the following outputs: output-file-path: The directory path to save the output file. output-ip-address: The IP address of the device on which the RTSP stream can be played. output-port-number: The port number of the device on which the RTSP stream can be played. output-display: The connected display device for preview. Select 1 to enable this option. |
## Known issue
For Ubuntu Server, the application hangs with 32 input streams on Dragonwing
IQ-9075.
## Related information
- [Image classification](https://docs.qualcomm.com/doc/80-70020-50/topic/gst-ai-classification.html)
- [Object detection](https://docs.qualcomm.com/doc/80-70020-50/topic/gst-ai-object-detection.html)
**Parent Topic:** [Run AI/ML sample applications](https://docs.qualcomm.com/doc/80-70020-50/topic/ai-ml-sample-applications.html)
Last Published: Jan 30, 2026
[Previous Topic
Video super-resolution](https://docs.qualcomm.com/bundle/publicresource/80-70020-50/topics/video-super-resolution.md) [Next Topic
Multistream batch inference](https://docs.qualcomm.com/bundle/publicresource/80-70020-50/topics/multistream-batch-inference.md)