> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.stereolabs.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.stereolabs.com/_mcp/server.

# Getting Started with GStreamer and ZED

GStreamer is a popular framework used to create custom media pipelines by combining modular plugins. The [ZED GStreamer](https://github.com/stereolabs/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

| Name                                                                         | Classification      | Source Code                                                                             | Description                                                                                                                                                                                                                                                                                                                                                                 |
| ---------------------------------------------------------------------------- | ------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [zedsrc](/docs/integrations/gstreamer/zed-camera-source)                     | Source              | [GitHub](https://github.com/stereolabs/zed-gstreamer/tree/master/gst-zed-src)           | acquires the camera color image, depth map, sensor data, and object detection information and pushes them into a GStreamer pipeline.                                                                                                                                                                                                                                        |
| [zedxonesrc](/docs/integrations/gstreamer/zed-x-one-camera-source-element)\* | Source              | [GitHub](https://github.com/stereolabs/zed-gstreamer/tree/master/gst-zedxone-src)       | acquires ZED X One monocular camera color images and pushes them into a GStreamer pipeline.                                                                                                                                                                                                                                                                                 |
| [zeddemux](/docs/integrations/gstreamer/zed-demux)                           | Stream Demuxer      | [GitHub](https://github.com/stereolabs/zed-gstreamer/tree/master/gst-zed-demux)         | receives a composite `zedsrc` stream (`color left + color right + metadata` or `color left + depth map + metadata`), processes the depth data when present, and pushes the result into two separate new streams named `src_left` and `src_aux`. A `src_mono` pad handles monocular `zedxonesrc` streams, and a `src_data` pad exposes the metadata for external processing. |
| [zeddatamux](/docs/integrations/gstreamer/zed-datamux)                       | Metadata Muxer      | [GitHub](https://github.com/stereolabs/zed-gstreamer/tree/master/gst-zed-data-mux)      | receives a video stream compatible with ZED caps and a ZED Data Stream generated by `zeddemux`, then adds the metadata to the video stream. This is useful if the metadata is removed by a filter that does not automatically propagate it.                                                                                                                                 |
| [zeddatacsvsink](/docs/integrations/gstreamer/zed-data-csv-sink)             | File Sink           | [GitHub](https://github.com/stereolabs/zed-gstreamer/tree/master/gst-zed-data-csv-sink) | sink element that receives ZED metadata, extracts the Positional Tracking and Sensors Data information, and saves it to a CSV file. Demonstrates how to retrieve and parse Positional Tracking and Sensors metadata.                                                                                                                                                        |
| [zedodoverlay](/docs/integrations/gstreamer/zed-od-overlay)                  | Filter Effect Video | [GitHub](https://github.com/stereolabs/zed-gstreamer/tree/master/gst-zed-od-overlay)    | transform filter element that receives a ZED combined stream with metadata, extracts object detection information, and draws the overlays on the incoming image frames. Demonstrates how to retrieve and parse Object Detection metadata.                                                                                                                                   |

\* *Only built and installed on NVIDIA® Jetson™ devices with [GMSL2](/docs/products/embedded/zed-link-capture-card/gmsl2#what-is-gmsl2) capabilities, running L4T 35.3/35.4 or L4T 36.3 and newer*

> **Note**
>
> `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

| Name                                                 | Classification   | Source Code                                                                    | Description                                                                                                                                      |
| ---------------------------------------------------- | ---------------- | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| [zedmeta](/docs/integrations/gstreamer/zed-metadata) | Metadata Library | [GitHub](https://github.com/stereolabs/zed-gstreamer/tree/master/gst-zed-meta) | GStreamer library to define and handle the ZED metadata (Positional Tracking data, Sensors data, Detected Object data, Detected Skeletons data). |

## Applications

| Name                                                    | Classification     | Source Code                                                                           | Description                                                                                        |
| ------------------------------------------------------- | ------------------ | ------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| [RTSP Server](/docs/integrations/gstreamer/rtsp-server) | Server application | [GitHub](https://github.com/stereolabs/zed-gstreamer/tree/master/gst-zed-rtsp-server) | Linux application that instantiates an RTSP server from a "gst-launch"-style text launch pipeline. |

## Installation

### Prerequisites

* Stereo camera: [ZED X / ZED X Mini / ZED X Nano](https://www.stereolabs.com/products/zed-x), [ZED 2i](https://www.stereolabs.com/products/zed-2i), [ZED 2](https://www.stereolabs.com/products/zed-2), [ZED Mini](https://www.stereolabs.com/products/zed-2), [ZED X One](https://www.stereolabs.com/products/zed-x-one)
* CMake (v3.6+)
* GStreamer 1.0

### Windows installation

* Install the latest ZED SDK from the [official download page](https://www.stereolabs.com/developers/release/) \[Optional to compile the `zedsrc` plugin to acquire data from a ZED camera device]
* Install [Git](https://git-scm.com/)
* Install [CMake](https://cmake.org/)
* Install a [GStreamer distribution (**both `runtime` and `development` installers**)](https://gstreamer.freedesktop.org/download/).
* The installer should set the installation path via the `GSTREAMER_1_0_ROOT_X86_64` environment variable.
* Add the path `%GSTREAMER_1_0_ROOT_X86_64%\bin` to the system variable `PATH`
* \[Optional] [Install OpenCV](https://www.learnopencv.com/install-opencv3-on-windows/) to build the `zedodoverlay` filter
* Run the following commands from a terminal or command prompt, assuming CMake and Git are in your `PATH`.

  ```bash
  git clone https://github.com/stereolabs/zed-gstreamer.git
  cd zed-gstreamer
  mkdir build
  cd build
  cmake -G "Visual Studio 16 2019" ..
  cmake --build . --target INSTALL --config Release
  ```

### Linux installation

#### Install prerequisites

* Install the latest ZED SDK from the [official download page](https://www.stereolabs.com/developers/release/)

* Update list of `apt` available packages

  `sudo 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:

  ```bash
  sudo apt install \
  libgstreamer1.0-0 \
  gstreamer1.0-libav \
  libgstrtspserver-1.0-0 \
  gstreamer1.0-tools \
  gstreamer1.0-x \
  gstreamer1.0-alsa \
  gstreamer1.0-gl \
  gstreamer1.0-gtk3 \
  gstreamer1.0-qt5 \
  gstreamer1.0-pulseaudio \
  libgstreamer1.0-dev \
  libgstrtspserver-1.0-dev \
  libgstreamer-plugins-base1.0-0 \
  libgstreamer-plugins-base1.0-dev \
  libgstreamer-plugins-good1.0-0 \
  libgstreamer-plugins-good1.0-dev \
  libgstreamer-plugins-bad1.0-0 \
  libgstreamer-plugins-bad1.0-dev
  ```

* \[Optional] Install OpenCV to build the `zedodoverlay` filter

  ```bash
  sudo apt install libopencv-dev libopencv-contrib-dev
  ```

#### Clone the repository

```bash
git clone https://github.com/stereolabs/zed-gstreamer.git
cd zed-gstreamer
```

#### Build

```bash
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make # Note: do not use the `-j` flag because parallel build is not supported
sudo make install
```

### Installation test

Open a command line console and try the following commands to verify that everything is correctly installed:

* Check `ZED Video Source Plugin` installation inspecting its properties:

  ```bash
  gst-inspect-1.0 zedsrc
  ```

* Check `ZED X One Video Source Plugin` installation inspecting its properties (only Jetson™):

  ```bash
  gst-inspect-1.0 zedxonesrc
  ```

* Check `ZED Video Demuxer` installation inspecting its properties:

  ```bash
  gst-inspect-1.0 zeddemux
  ```

* Check `ZED Data Mux Plugin` installation inspecting its properties:

  ```bash
  gst-inspect-1.0 zeddatamux
  ```

* Check `ZED CSV Sink Plugin` installation inspecting its properties:

  ```bash
  gst-inspect-1.0 zeddatacsvsink
  ```

* Check `ZED Object Detection Overlay Plugin` installation inspecting its properties:

  ```bash
  gst-inspect-1.0 zedodoverlay
  ```

## Ready-to-use scripts

The [`scripts`](https://github.com/stereolabs/zed-gstreamer/tree/master/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 settings
* `local-rgb_left_right-fps_rendering`: left and right image rendering
* `local-rgb_left_depth-fps_rendering`: left and depth image rendering
* `local-rgb-depth-sens-csv`: left and depth image rendering, with sensors data saved to a CSV file
* `local-rgb-od_multi-overlay`: left image rendering with MULTI\_CLASS object detection overlay
* `local-od-fps_overlay`: left and depth image rendering with FAST body tracking overlay
* `local-rgb-skel_fast-overlay`, `local-rgb-skel_accurate-overlay`: body pose overlay with the FAST and ACCURATE models
* `local-rgb-rescale-od-overlay`: left and depth image rendering with object detection and a rescaling filter
* `network-rgb-h264-sender` / `network-rgb-h264-receiver` and `rtsp-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`](https://github.com/stereolabs/zed-gstreamer/tree/master/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, `zedsrc` and `zedxonesrc` can 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](/docs/integrations/gstreamer/zed-camera-source/#display-the-left-image-on-the-screen)
* [Display color stereo couple with VGA resolution at 100 FPS](/docs/integrations/gstreamer/zed-camera-source/#display-color-stereo-couple-with-vga-resolution-at-100-fps)
* [Display depth map with HD720 resolution at 60 FPS](/docs/integrations/gstreamer/zed-camera-source/#display-depth-map-with-hd720-resolution-at-60-fps)
* [H264 streaming over UDP on the local network](/docs/integrations/gstreamer/zed-camera-source/#h264-streaming-over-udp-on-the-local-network)
* [Split the stereo couple and display single streams](/docs/integrations/gstreamer/zed-demux/#split-the-stereo-couple-and-display-single-streams)
* [Split the RGB/depth synchronized stream and display single streams](/docs/integrations/gstreamer/zed-demux/#split-the-rgbdepth-synchronized-stream-and-display-single-streams)
* [Sensors data logging to CSV file](/docs/integrations/gstreamer/zed-data-csv-sink/#sensors-data-logging-to-csv-file)
* [Display object detection bounding boxes](/docs/integrations/gstreamer/zed-od-overlay/#display-object-detection-bounding-boxes)
* [Display skeleton tracking results](/docs/integrations/gstreamer/zed-od-overlay/#display-skeleton-tracking-results)
* [Inject ZED metadata information in a stream](/docs/integrations/gstreamer/zed-datamux/#inject-zed-metadata-information-in-a-stream)
* [Create an RTSP server to stream ZED data](/docs/integrations/gstreamer/rtsp-server/#example)