GStreamer RTSP sink for multi-stream multimedia pipelines

From RidgeRun Developer Wiki
(Redirected from RTSP Sink)

Follow Us On Twitter LinkedIn Email Share this page



Follow Us On Twitter LinkedIn Email Share this page




  Index Next: Getting the code






GstRtspSink is a RidgeRun GStreamer sink element that publishes one or more RTSP streams from a single pipeline. It is designed for embedded Linux systems that need low-latency video streaming, synchronized audio and video, multicast delivery, authentication, and easy integration into both gst-launch prototypes and production applications.

What GstRtspSink is used for

GstRtspSink is useful when an application must expose one or more RTSP endpoints from the same pipeline. Typical use cases include camera streaming, multi-channel monitoring, synchronized audio and video delivery, secure video distribution inside private networks, and embedded products that must use hardware codecs and zero-copy paths.

Key capabilities

  • Publish multiple RTSP mappings from one pipeline
  • Stream video-only, audio-only, or synchronized audio and video
  • Support multicast delivery for efficient one-to-many streaming
  • Support RTSP over HTTP tunneling for restrictive network environments
  • Restrict access with username and password authentication
  • Control each independent stream with child properties
  • Integrate with embedded hardware encoders and zero-copy pipelines

Quick answer

If you need to expose RTSP streams from a GStreamer pipeline on Jetson, i.MX, Qualcomm RB5/RB6, x86-64, or generic Linux, GstRtspSink provides a flexible sink-based design. Instead of building a separate RTSP server application, you can keep the streaming logic inside the pipeline and create one or more mappings such as rtsp://DEVICE_IP:12345/stream1.


Architecture overview

The element extends the GStreamer RTSP server approach and packages it as a sink element. Each requested sink pad can be mapped to an RTSP path. That allows a single pipeline to publish independent streams for different clients or combine related streams under the same mapping.

+---------------------- GStreamer pipeline ----------------------+
| source ! preprocess ! encoder ! caps(mapping=/stream1) ! sink. |
| source ! preprocess ! encoder ! caps(mapping=/stream2) ! sink. |
+----------------------------------------------------------------+

Published RTSP URLs:

rtsp://DEVICE_IP:PORT/stream1
rtsp://DEVICE_IP:PORT/stream2
An embedded system with two cameras sends multiple streams with different RTSP mappings /stream1 and /stream2 to multiple clients, a mobile phone and a laptop
Embedded System using GstRtspSink to create two streams each with its own RTSP mapping

Supported features

  • GStreamer 1.0 support
  • Configurable mappings for each stream
  • Configurable RTSP TCP port
  • Automatic payloader detection based on negotiated caps
  • Multiple independent streams
  • Multicast networking support
  • RTSP over HTTP tunneling
  • Basic authentication with username and password pairs
  • Fine-grained stream control through child properties
  • Support for embedded zero-copy pipelines when upstream elements allow it

Supported media formats

Video

  • H264
  • H265
  • VP8
  • VP9
  • MPEG-4
  • JPEG
  • DIVX
  • AV1

Audio

  • AAC
  • AC3
  • PCMA
  • PCMU
  • OPUS

Other supported payloads

  • Transport Stream A/V
  • KLV metadata

Supported platforms

  • x86-64
  • Generic Linux distributions
  • NVIDIA Jetson
  • NXP i.MX 95
  • NXP i.MX 8
  • NXP i.MX 6
  • Rubik Pi 3
  • Qualcomm RB5 and RB6
  • Xilinx Zynq and Zynq UltraScale+ MPSoC

When to use GstRtspSink instead of a separate RTSP server

Use GstRtspSink when the application already uses GStreamer and you want the RTSP serving logic to stay inside the pipeline. This is especially useful for prototypes, embedded devices, and products that need multiple mappings, direct access to pad-level configuration, or simple transition from gst-launch examples to application code.

Getting started

To start evaluating or integrating the element, follow these pages in order:

  1. Getting the code
  2. Evaluating GstRtspSink
  3. Building the plug-in
  4. Basic usage
  5. Simple Examples

Practical example

The example below publishes one H264 test stream on port 5000.

gst-launch-1.0 \
  videotestsrc is-live=true ! \
  x264enc tune=zerolatency ! \
  "video/x-h264, mapping=/stream1" ! \
  rtspsink service=5000

Open it from a client with:

vlc rtsp://DEVICE_IP:5000/stream1

Performance and embedded deployment notes

GstRtspSink fits well in embedded multimedia systems because it works with hardware encoders, can preserve zero-copy paths when the pipeline is built correctly, and supports multiple mappings without forcing a separate server process design. Actual throughput, latency, and CPU usage depend on codec, resolution, memory path, transport, and platform-specific encoder settings.

Summary

GstRtspSink is RidgeRun's RTSP sink element for GStreamer-based embedded systems. It is best suited for developers who need one or more RTSP endpoints, tight pipeline integration, hardware-accelerated streaming paths, and deployment flexibility across Jetson, NXP, Qualcomm, x86, and generic Linux systems.

FAQ

What is GstRtspSink?
GstRtspSink is a RidgeRun GStreamer sink element that publishes RTSP streams directly from a pipeline.
Can GstRtspSink publish multiple RTSP streams at the same time?
Yes. A single pipeline can publish multiple mappings, including video-only, audio-only, or synchronized audio and video streams.
Does GstRtspSink support embedded Linux platforms?
Yes. The documentation covers x86-64, generic Linux, NVIDIA Jetson, NXP i.MX, Qualcomm RB5/RB6, and Xilinx platforms.
Does GstRtspSink support authentication and multicast?
Yes. The element supports basic authentication, multicast, RTSP over HTTP tunneling, and independent stream control.
Where do I start if I want to test it quickly?
Start with GstRtspSink - Getting the code, then follow GstRtspSink - Evaluating GstRtspSink and GstRtspSink - Basic usage.

How to Purchase GstRtspSink

GstRtspSink can be purchased in RidgeRun store. Before purchasing, consider contacting RidgeRun for evaluating the plugin.


Related pages



For direct inquiries, please refer to the contact information available on our Contact page. Alternatively, you may complete and submit the form provided at the same link. We will respond to your request at our earliest opportunity.


Links to RidgeRun Resources and RidgeRun Artificial Intelligence Solutions can be found in the footer below.




  Index Next: Getting the code