Jump to content

GstRtspSink - Transport Stream RTSP Streaming

From RidgeRun Developer Wiki

Follow us on: YouTube Twitter LinkedIn Email Share this page

Share This Page



Previous: Audio+Video_Streaming_Plus_H264_Single_Streaming Index Next: Multicast+Authentication



This example publishes an MPEG transport stream over RTSP. It is relevant when downstream systems already expect transport-stream packaging or when you need a specific interoperability profile.


When to use transport stream

Choose this layout when the client or downstream system expects a transport stream rather than elementary audio and video tracks.

Server-side Pipeline

The following pipeline combines takes an MPEG4 stream, encapsulates it in a Transport Stream container, and sends it via RTSP.

PORT=12345
MAPPING=/stream

gst-launch-1.0 v4l2src ! queue ! videoconvert ! avenc_mpeg4 ! mpeg4videoparse ! mpegtsmux ! capsfilter caps="video/mpegts, mapping=${MAPPING}" ! rtspsink name=sink service=$PORT

Client-side

VLC

IP_ADDRESS=127.0.0.1
PORT=12345
MAPPING1=stream

vlc rtsp://${IP_ADDRESS}:${PORT}/${MAPPING}

GStreamer

IP_ADDRESS=127.0.0.1
PORT=12345
MAPPING=stream

gst-launch-1.0 rtspsrc location=rtsp://${IP_ADDRESS}:${PORT}/${MAPPING} ! rtpmp2tdepay ! tsdemux ! mpeg4videoparse ! avdec_mpeg4 ! queue ! autovideosink

MPlayer

IP_ADDRESS=127.0.0.1
PORT=12345
MAPPING=stream

mplayer rtsp://${IP_ADDRESS}:${PORT}/${MAPPING}

Totem

IP_ADDRESS=127.0.0.1
PORT=12345
MAPPING=stream

totem rtsp://${IP_ADDRESS}:${PORT}/${MAPPING}

Summary

Transport stream over RTSP is a specialized interoperability option. Use it when the client stack explicitly benefits from TS packaging.


Problems running the pipelines shown on this page? Please see our GStreamer Debugging guide for help .


Related pages



Previous: Audio+Video_Streaming_Plus_H264_Single_Streaming Index Next: Multicast+Authentication


Cookies help us deliver our services. By using our services, you agree to our use of cookies.