Skip to main content
QIMSDK · Qualcomm
Multi-Stream AI

Process up to 31 concurrent IP camera streams in parallel with YOLOv8 object detection, compositing all streams into a unified video wall output and streaming over RTSP or WebRTC.

QIMSDK Team·Jun 14, 2026·← All posts

Introduction

Modern security systems rarely depend on a single camera. In real deployments, operators need to monitor dozens of streams simultaneously across warehouses, campuses, retail spaces, and large environments. As camera counts grow, manual monitoring becomes impractical, and traditional CPU-only processing struggles to keep up — increasing latency, power usage, and system load. The IM SDK addresses this directly. It enables scalable, real-time multi-stream video analytics at the edge using hardware-accelerated GStreamer plugins that shift demanding work — decoding, frame preparation, AI inference, and encoding — entirely onto dedicated hardware blocks. Frame preparation includes resizing frames to match model input, converting YUV to RGB, and normalizing pixel values for neural network input. The pipeline processes each stream independently, running object detection on every input source while preserving a consistent visual experience. To improve efficiency, inference runs at a reduced frame rate without affecting the continuity of the displayed output. Detection results are rendered as RGBA overlay masks and composited with the corresponding video feeds, allowing object visualization without modifying source frames directly. Integration with Qualcomm AI Hub gives developers access to optimized, ready-to-use models such as YOLO-based detectors for multi-stream analytics. The complete application source code is available here.

Use Case Overview

1

Video Input

Each RTSP camera provides an H.264/H.265-encoded stream decoded into raw YUV frames for inference and visualization.
2

Frame Rate Optimization

videorate controls the inference processing rate to improve performance while preserving temporal accuracy in the displayed output.
3

Object Detection

Each decoded frame is analyzed independently by an object detection model running on the Qualcomm NPU.
4

Detection Output

The model produces an RGBA overlay mask containing bounding boxes and class labels over a transparent background.
5

Composition

qtivcomposer composites all stream masks onto their corresponding video frames and tiles them into a configurable M×N grid (up to 8×4).
6

Metadata Synchronization

qtimetamux attaches detection results as structured per-frame metadata synchronized with the video stream.
7

Output

The final composited stream is displayed locally on an HDMI monitor or streamed over RTSP/WebRTC with structured metadata transmitted in parallel.

Pipeline diagram

Security Video Wall Pipeline

Elements used in pipeline

How it works

1

Stream Ingestion

Each rtspsrc element receives an RTSP stream. The RTP/H.264 payload is depayloaded, parsed, and decoded into raw NV12 frames by the hardware decoder.
2

Parallel Processing

A tee splits each decoded stream into two branches: one forwards frames directly to the compositor, the other runs AI inference at a reduced frame rate.
3

ML Inference

The inference branch runs through qtimlvconverterqtimltfliteqtimlpostprocess producing an RGBA overlay mask.
4

Composition

qtivcomposer tiles all annotated streams into an 8×4 grid. If detection runs at a lower rate than the input, the most recent mask is reused to maintain a stable overlay.
5

Output Delivery

The composited frame is delivered to a Wayland display, saved to file, or streamed over RTSP/WebRTC.

Run application on device

Setup Requirements

Hardware

Hardware Setup

Software

Flash your Qualcomm Edge device by following the device setup and flashing instructions here. Once your device is ready, follow the instructions below to set up the Security Video Wall pipeline.
AI Model and config files
Copy files to device
Connect to device
Run the Security Video Wall
Note: A display must be connected to the device. If no display is available, use the --no-display flag.
Note: This example uses an offline video file as input. To use IP/RTSP cameras, update --input-type=rtsp and --input-config=rtsp://... accordingly.
It produces an AI-annotated video stream. To visualize the results, refer to the Host-Side Visualization section below.

Visualize the Results - Host-Side Visualization (Windows + WSL)

This section describes how to run the visualization client on a Windows host machine using WSL (Windows Subsystem for Linux). The client renders the live composited video stream alongside a real-time AI metadata panel. 📥 The visualization client script can be downloaded here: rtsp_webrtc_client.py It displays:
  • Left panel — Live composited video stream with AI overlays from all camera inputs.
  • Right panel — Real-time AI metadata (JSON): object detections, bounding boxes, and confidence scores per stream.
Step 1 — Install WSL and Ubuntu If WSL is not already installed, run the following from a Windows terminal:
Once installed, update the system:
Step 2 — Install System Dependencies
Step 3 — Run the Visualization Client Script
Step 4 — Expected Output Expected Output Beyond the default setup, the application offers flexible input and output configurations that can be tailored via command-line options, as described below:

Command-Line Options

Specifies the total number of input video streams. Must match the number of --input-type and --input-config entries. Valid range: 1 to 31.
Selects the video input source for each stream.
Specifies the input source configuration for the selected --input-type.
Defines how the processed output is delivered.
Specifies the output destination configuration.
Root directory for AI model, label, and configuration files.
Disables local on-screen rendering. Recommended for headless deployments, remote streaming (RTSP/WebRTC), or performance optimization.
Specifies the video frame rate for the input stream.
Specifies the local WebRTC signaling client ID.

Implementation Deep-Dive

The application separates user configuration from runtime state.
The pipeline is assembled from three logical sections: input branch, output branch, and application-specific user branch.
Constants define the maximum input count and compositor layout.
Each input stream contributes one direct video layer and one RGBA overlay layer to the same grid position in the compositor.
WebRTC signaling uses explicit SDP offer/answer and ICE candidate exchange via WebSocket with libsoup.

Build the Application

Conclusion

The IM SDK modular architecture gives developers flexibility and control when building real-time multi-stream video analytics pipelines. By separating inference from post-processing, the post-processing stage can be customized without changing the model execution path. This keeps AI results and video frames decoupled while enabling efficient visualization — post-processing generates an RGBA overlay mask composited onto the original frame without duplicating video data, delivering lower latency, reduced memory overhead, and better scalability for real-time AI video applications.