GstRtspSink Multicast: Configuration, Setup, & Streaming Guide

From RidgeRun Developer Wiki

Follow Us On Twitter LinkedIn Email Share this page



Previous: Basic_usage Index Next: RTSP_over_HTTP_Tunneling





GstRtspSink supports multicast delivery so one source can serve many receivers efficiently. This page explains the key multicast properties, how the address and port ranges work, and how to build a practical multicast example.


When multicast is useful

Multicast is useful when the same stream must reach many clients on the same multicast-capable network. It reduces redundant unicast traffic and is a good fit for monitoring, distribution inside controlled LANs, and one-to-many video delivery.

Key multicast properties

Multicast-related properties
Property Purpose Default value
multicast Enables multicast mode false
multicast-ip-min First multicast address in the pool 254.2.0.1
multicast-ip-max Last multicast address in the pool 254.2.0.10
multicast-port-min First RTP port in the pool 5000
multicast-port-max Last RTP port in the pool 5010
multicast-ttl Time-to-live for multicast packets 16

Example

gst-launch-1.0 videotestsrc is-live=true ! x264enc tune=zerolatency ! video/x-h264, mapping=/stream1  ! \
rtspsink service=5000 multicast=true multicast-ip-min=239.255.255.253 multicast-ip-max=239.255.255.255 \
multicast-port-min=5000 multicast-port-max=6000  multicast-ttl=128

Operational notes

  • The multicast address and port ranges define the pool the RTSP server can allocate from.
  • To force a single multicast destination, use the same minimum and maximum values.
  • Verify that switches, routers, and firewalls allow multicast traffic.

Validation tips

  • Test with server and client on different machines
  • Confirm that the client joins the multicast group
  • Verify TTL and routing behavior when clients are outside the local segment

Summary

Use multicast when multiple clients on the same network need the same stream. Configure the address range, port range, and TTL explicitly so the deployment is predictable.


Problems running the examples on this page? See GStreamer Debugging for practical debugging steps.

Related pages

FAQ

Can server and multicast clients run on the same machine?
For realistic validation, use separate machines because multicast behavior can differ on loopback and local host-only setups.
How do I force a single multicast address and port?
Set the minimum and maximum multicast address to the same value, and do the same for the port.


Previous: Basic_usage Index Next: RTSP_over_HTTP_Tunneling