Limited Time Sale: Get 40% OFF on Next-Gen AI Video Creation 🎉

Video Analytics with AI: Getting Started with DeepStream on Jetson Nano

Aug 11, 2026

Video analytics is one of the most practical applications of artificial intelligence, and it no longer requires a data center to run. A small single-board computer can now detect objects, track movement, and extract insights from live camera feeds in real time. This guide shows you how to get started with NVIDIA Jetson Nano and the DeepStream SDK, from hardware setup to a working video analysis pipeline.

What You Will Build

The end goal of this tutorial is a working system that takes a video stream, decodes it on the hardware, runs an AI model to detect objects such as people and vehicles, and displays the results with bounding boxes and labels. Along the way you will learn how the pieces fit together, so you can adapt the pipeline to your own use case: counting people in a retail store, monitoring a parking lot, inspecting products on a production line, or analyzing traffic.

The final pipeline looks like this: a video source, a hardware decoder, a preprocessing step that resizes and normalizes frames, an inference engine that runs a neural network, a tracker that follows objects across frames, and an output sink that renders or stores the results. DeepStream provides all of these as plugins that you connect together, which is why the learning curve is shorter than building everything from scratch.

Why Edge Video Analytics Instead of the Cloud

Sending every frame of a live camera to the cloud is expensive, slow, and often unnecessary. A single 1080p camera at 30 frames per second produces roughly 60 gigabytes of data per hour in raw form. Streaming all of that to a remote server for analysis consumes bandwidth, adds latency, and raises privacy concerns because sensitive footage leaves the building.

Edge analytics flips the model: the AI runs where the camera is. The device decides what matters, sends only the interesting events, and keeps the raw footage local. For a retail store that wants alerts when shelves are empty, or a factory that wants to flag defective products in real time, the difference between a 50-millisecond local response and a 300-millisecond round trip to the cloud can be the difference between preventing a problem and merely logging it.

There is also a cost argument. Inference on an edge device has no per-minute API charges, no egress fees, and no need to keep a GPU server running around the clock. Once the hardware is purchased, the marginal cost of processing another camera is close to zero. That makes edge analytics attractive for deployments with many cameras and continuous operation.

Hardware and Software Requirements

The Jetson Nano is a compact developer kit from NVIDIA designed for AI workloads at the edge. It combines a quad-core CPU with a 128-core GPU based on the Maxwell architecture, which gives it enough parallel compute for real-time neural network inference while drawing only a few watts of power.

For this tutorial you need:

  • A Jetson Nano developer kit (the 2GB or 4GB version both work, though 4GB is more comfortable)
  • A microSD card of at least 32GB, ideally a fast one rated A1 or better
  • A 5V power supply that can deliver the current your board requires
  • A USB camera, a CSI camera module, or a local video file to analyze
  • A monitor and keyboard for the initial setup, or a network connection for headless access
  • An Ethernet cable or a reliable Wi-Fi adapter

You will also need to download the NVIDIA JetPack software package, which includes the Linux operating system for the board, the CUDA toolkit, and several libraries that DeepStream depends on.

Setting Up the Jetson Nano Development Environment

The first step is writing the JetPack image to your microSD card. NVIDIA distributes this image as a single file that you flash using a tool such as balenaEtcher or the dd command on Linux. After flashing, insert the card, connect the power supply, and the board boots into the setup wizard.

During the first boot you choose the operating system language, create a user account, and configure the network. Two settings matter for AI work. First, make sure you have enough swap space, because compiling and running larger models can exhaust the limited memory. The 4GB board benefits from a swap file of at least 4GB. Second, install the NVIDIA driver and CUDA as part of the JetPack setup, because DeepStream builds on top of them.

Before installing anything else, update the system:

  • Run the system update command for your distribution to fetch the latest packages.
  • Install the basic development tools, including the compiler toolchain and the build utility.
  • Confirm that the NVIDIA driver is loaded by checking the system logs or running nvidia-smi if available.

A clean, updated system saves hours of debugging later. DeepStream is sensitive to version mismatches between the operating system, CUDA, and the SDK itself, so keeping everything in one JetPack release avoids a whole class of problems.

Installing the DeepStream SDK

DeepStream is NVIDIA's streaming analytics toolkit, built on the GStreamer multimedia framework. It provides a set of plugins that handle video decoding, preprocessing, inference, tracking, and rendering, so you can assemble pipelines without writing low-level CUDA code.

The recommended installation method is the Debian package provided by NVIDIA. You add the NVIDIA repository to your system, update the package list, and install the deepstream package along with its dependencies. The exact package name depends on your JetPack version, so check the release notes for the version that matches your board.

After installation, verify it works by running one of the sample applications. The deepstream-app tool ships with example configurations, and the test sources directory contains a short sample video. Launching the sample pipeline confirms that the decoder, inference engine, and renderer are all functioning. If the sample plays and shows detection boxes, your environment is ready.

One common issue at this stage is a missing library or an incorrect path to the model files. DeepStream looks for models in a models directory and expects them in its own format. If the sample fails, read the error output carefully: it almost always tells you exactly which plugin or file is missing.

Your First DeepStream Pipeline

DeepStream pipelines are described in configuration files that list the plugins and their properties. The sample configuration files that ship with the SDK are the best starting point because they show every section you need: the source, the stream multiplexer, the primary inference engine, the tracker, and the output.

To understand the pipeline, think of it as a chain. The source reads from a file, a camera, or a network stream. The decoder converts the compressed video into raw frames. The preprocessing plugin resizes and normalizes each frame so it matches what the model expects. The inference engine runs the neural network and produces detections. The tracker links detections across frames so the same person gets a consistent ID. Finally, the sink renders the annotated frames or pushes the metadata to another application.

Start by copying one of the sample configurations and editing it in small steps. Change the source from the sample file to your own video file, then to a live camera. Each change is an opportunity to learn what a section does. When you are comfortable with the configuration, try adding a second source to see how DeepStream multiplexes multiple streams through a single inference engine.

Adding Real-Time Object Detection

The default sample usually runs a model that detects people and vehicles. DeepStream works with several model formats, but the most common workflow is to take a model trained in a framework such as TensorFlow or PyTorch and convert it to TensorRT, NVIDIA's inference optimizer.

TensorRT is worth learning because it dramatically speeds up inference on Jetson hardware. It analyzes the neural network, fuses operations, selects efficient kernels for your specific GPU, and optionally quantizes the model to reduced precision. A model that runs at 15 frames per second in a generic runtime can often reach 30 or more after TensorRT optimization.

The conversion workflow looks like this:

  • Export your trained model to the ONNX format, which is a vendor-neutral interchange format.
  • Run the TensorRT converter on the ONNX file to produce an engine file.
  • Configure DeepStream to use the engine file, specifying the input dimensions and the class names.
  • Define the post-processing so that detection output is drawn as labels and bounding boxes.

If you do not have a custom model, the models that ship with DeepStream are sufficient for learning. Once the pipeline runs with the default model, swap in your own classes and test on footage from your actual camera. Real-world lighting, angles, and occlusions will expose weaknesses that the sample video never shows.

Tuning Performance and Finding Bottlenecks

A pipeline that works in principle may still be too slow for real-time use. The standard approach is to measure each stage and find the slowest link.

DeepStream can output performance statistics, including frames per second and the time spent in each plugin. Run the pipeline with statistics enabled and watch where time accumulates. In practice, the bottleneck is usually one of three places:

  • The decoder, if the video resolution is very high or the source is a slow network stream.
  • The inference engine, if the model is large or the input resolution is higher than necessary.
  • The tracker, which becomes expensive when many objects are on screen at once.

Once you know the bottleneck, the fixes are usually straightforward. Reduce the inference resolution if accuracy allows. Enable hardware decoding for H.264 and H.265 streams, since Jetson has dedicated decode engines. Use batch processing when analyzing multiple streams, because running several frames through the model together is far more efficient than one at a time. And monitor memory: if the board is swapping, the whole pipeline slows down.

Common Problems and Fixes

The most frequent problems beginners hit are predictable, and most have simple solutions.

The board boots but the sample pipeline fails. Check that the model files exist and that their paths in the configuration match your installation. Permission problems on the model directory are common; make sure the user running the pipeline can read the files.

Detection accuracy is poor on your own footage. Retrain or fine-tune the model on images that resemble your actual scene. A model trained on highway traffic will struggle with a dimly lit warehouse. Also check the inference resolution: small objects disappear when the input is downscaled too aggressively.

The pipeline runs slowly. Enable statistics, find the slow plugin, and apply the tuning steps above. Verify that hardware decoders are being used rather than software decoding.

The system becomes unresponsive during conversion. TensorRT conversion is memory hungry. Close other applications, increase swap space, and convert the model on a machine with more RAM, then copy the engine file to the Jetson.

FAQ

Do I need to know C or CUDA to use DeepStream? No. The configuration-based pipelines and the Python bindings cover most use cases. CUDA knowledge helps for custom plugins, but you can build a complete analytics application without writing any GPU code.

Can I use a USB webcam as the source? Yes. DeepStream supports USB cameras through the Video4Linux interface. Set the source type accordingly and select the correct device path.

How many cameras can one Jetson Nano handle? It depends on resolution, frame rate, model size, and whether the streams are multiplexed. A typical setup handles two to four 1080p streams with a lightweight detection model. Measure with your own workload before committing to a number.

Is the Jetson Nano still a good choice, or should I buy a newer board? For learning and small deployments, the Nano is excellent because it is inexpensive and well documented. For production systems with more cameras or larger models, consider the more powerful members of the Jetson family.

Do I have to train my own model? No. Many pretrained models are available for common tasks like person detection, face detection, and license plate recognition. Start with a pretrained model and fine-tune only if your scene demands it.

Alexander

Alexander