Getting Started with GStreamer and ZED
GStreamer is a popular framework used to create custom media pipelines by combining modular plugins. The ZED GStreamer plugins greatly simplify the use of the ZED camera and SDK in a GStreamer media pipeline.
The ZED GStreamer package is composed of six plugins providing six elements, a metadata library, and a Linux RTSP Server application.
Plugins
* Only built and installed on NVIDIA® Jetson™ devices with GMSL2 capabilities, running L4T 35.3/35.4 or L4T 36.3 and newer
zedodoverlay is built only if OpenCV is available on the build machine, and the RTSP Server application is built only if the GStreamer RTSP Server development package is available. The CMake configuration step prints the list of the optional components that were found.
Libraries
Applications
Installation
Prerequisites
- Stereo camera: ZED X / ZED X Mini / ZED X Nano, ZED 2i, ZED 2, ZED Mini, ZED X One
- CMake (v3.6+)
- GStreamer 1.0
Windows installation
-
Install the latest ZED SDK from the official download page [Optional to compile the
zedsrcplugin to acquire data from a ZED camera device] -
Install Git
-
Install CMake
-
Install a GStreamer distribution (both
runtimeanddevelopmentinstallers). -
The installer should set the installation path via the
GSTREAMER_1_0_ROOT_X86_64environment variable. -
Add the path
%GSTREAMER_1_0_ROOT_X86_64%\binto the system variablePATH -
[Optional] Install OpenCV to build the
zedodoverlayfilter -
Run the following commands from a terminal or command prompt, assuming CMake and Git are in your
PATH.
Linux installation
Install prerequisites
-
Install the latest ZED SDK from the official download page
-
Update list of
aptavailable packagessudo apt update -
Install GCC compiler and build tools
sudo apt install build-essential -
Install CMake build system
sudo apt install cmake -
Install GStreamer, the development packages and useful tools:
-
[Optional] Install OpenCV to build the
zedodoverlayfilter
Clone the repository
Build
Installation test
Open a command line console and try the following commands to verify that everything is correctly installed:
-
Check
ZED Video Source Plugininstallation inspecting its properties: -
Check
ZED X One Video Source Plugininstallation inspecting its properties (only Jetson™): -
Check
ZED Video Demuxerinstallation inspecting its properties: -
Check
ZED Data Mux Plugininstallation inspecting its properties: -
Check
ZED CSV Sink Plugininstallation inspecting its properties: -
Check
ZED Object Detection Overlay Plugininstallation inspecting its properties:
Ready-to-use scripts
The scripts folder of the repository contains ready-to-use pipelines for Windows, desktop Linux and Jetson:
simple-fps_rendering,simple-depth-fps_rendering: color and depth rendering with default settingslocal-rgb_left_right-fps_rendering: left and right image renderinglocal-rgb_left_depth-fps_rendering: left and depth image renderinglocal-rgb-depth-sens-csv: left and depth image rendering, with sensors data saved to a CSV filelocal-rgb-od_multi-overlay: left image rendering with MULTI_CLASS object detection overlaylocal-od-fps_overlay: left and depth image rendering with FAST body tracking overlaylocal-rgb-skel_fast-overlay,local-rgb-skel_accurate-overlay: body pose overlay with the FAST and ACCURATE modelslocal-rgb-rescale-od-overlay: left and depth image rendering with object detection and a rescaling filternetwork-rgb-h264-sender/network-rgb-h264-receiverandrtsp-rgb-h264-sender/rtsp-h264-receiver: UDP and RTSP streaming (Linux and Jetson only)
The Jetson folder additionally provides the zedxone-* scripts for the ZED X One cameras.
Jetson low-latency, zero-copy pipelines
The scripts/jetson folder contains pipelines optimized for hardware-accelerated streaming on NVIDIA® Jetson™:
- Zero-copy NV12: with ZED SDK v5.2 or newer and a GMSL2 camera,
zedsrcandzedxonesrccan deliver NV12 buffers directly to the hardware encoder, with no CPU copy and minimal latency - SRT, RTSP and UDP streaming: low-latency streaming scripts with automatic camera detection
- DeepStream integration: object detection pipelines using NVIDIA DeepStream
The scripts detect the camera type (GMSL2 or USB3) and the ZED SDK version to select the optimal pipeline.
Use cases
The following is a list of use case examples, each linked to its relevant documentation page:
- Display the left image on the screen
- Display color stereo couple with VGA resolution at 100 FPS
- Display depth map with HD720 resolution at 60 FPS
- H264 streaming over UDP on the local network
- Split the stereo couple and display single streams
- Split the RGB/depth synchronized stream and display single streams
- Sensors data logging to CSV file
- Display object detection bounding boxes
- Display skeleton tracking results
- Inject ZED metadata information in a stream
- Create an RTSP server to stream ZED data

