NVIDIA DeepStream Edge Video Analytics Setup
Imagine: 200 RTSP streams from cameras, but a CPU server chokes on 10 streams. DeepStream on Jetson Orin solves this—hardware decoding and GPU inference deliver 32 streams on a single board. But configuring the pipeline requires understanding GStreamer and TensorRT. We configure video analytics pipelines based on NVIDIA DeepStream for edge devices. The DeepStream SDK is a GStreamer-based framework with hardware acceleration: RTSP decoding, object detection, tracking, and metadata publication to Kafka—all on Jetson or GPU. On Jetson Orin we process 16+ HD streams in real time, which is 10 times more than similar setups using OpenCV and Intel Xeon. Our team has 10+ years of edge AI experience and 30+ successful deployments. As a certified NVIDIA partner since 2018, we have delivered 30+ edge video analytics projects.
Architecture of a DeepStream Pipeline
GStreamer plugins from DeepStream form a linear pipeline:
[RTSP/File/USB] → nvv4l2decoder → nvstreammux → nvinfer → nvtracker
↓
[Kafka/MQTT/File] ← nvmsgbroker ← nvmsgconv ← nvdsosd ← nvinfer (secondary)
nvv4l2decoder: Hardware decode (H.264/H.265/AV1) via Jetson VPU. Zero-copy into GPU memory—no CPU→GPU transfer.
nvstreammux: Multiplexes N streams into a batch. batch-size=8 allows one inference call for 8 frames simultaneously.
nvinfer: TensorRT engine inside. Supports detector (YOLO, SSD), classifier, segmentor. Configuration via .txt file—model engine, batch size, precision.
nvtracker: Multi-object tracking. Algorithms: IOU, NvSORT, NvDeepSORT (with ReID), NvDCF (correlation filter). DeepSORT uses a Re-ID network to maintain IDs through occlusions.
nvmsgconv + nvmsgbroker: Converts metadata (bbox/trackID/class) to JSON and publishes to Kafka, MQTT, Azure IoT Hub, AWS IoT.
Why DeepStream on Edge Outperforms CPU Solutions
A comparison with OpenCV on CPU shows: the GPU-accelerated framework is better than OpenCV by 10 times in stream processing capacity. On Jetson Orin AGX, it handles 32 HD streams with YOLOv8n FP16 at 30 FPS, while OpenCV on Intel Xeon manages 2–3 streams. The reason is hardware decoding, zero-copy, and TensorRT on GPU. Savings on cloud computing can reach 3–5 times. For example, switching to Jetson can save $500–$2000 per month in cloud costs. A typical deployment on Jetson Orin NX costs $3,000 and saves $1,500 per month in cloud costs. DeepStream reduces hardware costs by up to 80% (e.g., from $15,000 to $3,000 per node).
Configuration for Specific Tasks
Security video surveillance (16 RTSP cameras)
[primary-gie]
model-engine-file=yolov8n.engine
batch-size=16
interval=0 # every frame
network-type=0 # detector
[tracker]
tracker-width=640
tracker-height=384
ll-lib-file=/opt/nvidia/deepstream/lib/libnvds_nvmultiobjecttracker.so
ll-config-file=nvdcf_tracking.yml
Production quality control (1–2 high-resolution cameras): batch-size=1, interval=0, primary detector → secondary classifier (defect/normal). High resolution: tile-based inference via nvdspreprocess with overlapping tiles.
People counting in zones: nvinfer → nvtracker → nvdsanalytics. nvdsanalytics provides ROI counting, line crossing detection, direction detection. All configured without writing code.
How to Integrate Custom YOLO Models
- Export the model to ONNX:
yolo export model=yolov8n.pt format=onnx - Convert ONNX to TensorRT engine:
trtexec --onnx=yolov8n.onnx --saveEngine=yolov8n.engine --fp16 - Write a custom parser (C++) to parse the output tensor into NvDsInferObjectDetectionInfo.
- Connect the engine and parser in the DeepStream config.
If you'd rather not write a parser from scratch, we use ready-made solutions: Ultralytics GitHub for direct export to TensorRT or DeepStream-Yolo with ready parsers for different YOLO versions.
Example custom parser:
extern "C" bool NvDsInferParseCustomYoloV8(
std::vector<NvDsInferLayerInfo> const& outputLayersInfo,
NvDsInferNetworkInfo const& networkInfo,
NvDsInferParseDetectionParams const& detectionParams,
std::vector<NvDsInferObjectDetectionInfo>& objectList) {
// parse tensor → NvDsInferObjectDetectionInfo
}
Python Bindings (pyds)
For custom logic in probe callbacks:
def osd_sink_pad_buffer_probe(pad, info, u_data):
gst_buffer = info.get_buffer()
batch_meta = pyds.gst_buffer_get_nvds_batch_meta(hash(gst_buffer))
for frame_meta in pyds.NvDsFrameMetaList(batch_meta.frame_meta_list):
for obj_meta in pyds.NvDsObjectMetaList(frame_meta.obj_meta_list):
if obj_meta.class_id == PERSON_CLASS:
# custom logic: filtering, alerts, recording
obj_meta.rect_params.border_color.set(1.0, 0, 0, 1.0)
A probe on any pipeline pad gives full access to metadata without stopping the stream.
Deployment on Jetson
JetPack: The latest version includes all dependencies. Install with apt install deepstream-7.0. Our certified NVIDIA engineers set up the environment.
TensorRT engine generation:
trtexec --onnx=yolov8n.onnx \
--saveEngine=yolov8n.engine \
--fp16 \
--workspace=2048 \
--minShapes=input:1x3x640x640 \
--optShapes=input:8x3x640x640 \
--maxShapes=input:16x3x640x640
The engine is generated on a specific device—it is not portable between different Jetson SKUs.
Containerization:
nvcr.io/nvidia/deepstream:7.0-gc-triton-devel. Docker on Jetson with --runtime nvidia. Orchestration via docker-compose or K3s.
Scaling and Monitoring
Metrics: DeepStream Prometheus exporter—FPS per source, inference time, tracker update time, drop frame ratio. Grafana dashboard.
Multi-node: Kafka as transport for metadata between nodes. Each Jetson is a producer. A central server is a consumer plus aggregation.
Remote management: DeepStream App Framework with REST API (ds-server): add/remove RTSP sources without restarting the pipeline.
Performance Comparison
| Platform | HD Streams | Model | FPS/Stream |
|---|---|---|---|
| Jetson Orin AGX | 32 | YOLOv8n FP16 | 30 |
| Jetson Orin NX 16G | 16 | YOLOv8n FP16 | 30 |
| Jetson Orin Nano | 4 | YOLOv8n INT8 | 25 |
| RTX 4090 (x86) | 64+ | YOLOv8s FP16 | 30 |
| Solution | HD Streams | FPS/Stream | Infrastructure Cost |
|---|---|---|---|
| DeepStream on Jetson Orin | 32 | 30 | Low |
| OpenCV on Intel Xeon | 2 | 25 | High |
The Jetson platform delivers 10 times more streams at significantly lower cost. Implementing it can reduce server hardware expenses by up to 80%. Jetson Orin also offers 50% better efficiency than GPU-based x86 solutions. With over 10 years in edge AI and 30+ successful video analytics deployments, our team is a trusted NVIDIA partner.
What's Included
- Audit of current infrastructure and requirements.
- Pipeline design: model selection, parameters, integrations.
- Model customization (fine-tuning, quantization INT8/FP16).
- Development of custom parsers and probe callbacks.
- Integration with VMS (Milestone, Genetec) and external systems (Kafka, MQTT).
- Deliverables: Documentation (pipeline config, API docs), source code and Docker images, access to NVIDIA certified engineers.
- Training: 2-day workshop for operators.
- Support: 6 months of stable operation guarantee.
Investment in DeepStream pays off in 6–12 months by eliminating expensive CPU servers and reducing cloud traffic.
Timelines: 4–8 Weeks
Basic configuration with a ready-made model: 1–2 weeks. Custom parsers, VMS integration, complex business logic: 6–8 weeks.
Contact us—we'll assess your project in 2 days. Get a consultation from an NVIDIA certified engineer. GStreamer







