GstRtspSink - Dual H264 Video Streaming

From RidgeRun Developer Connection
Revision as of 21:58, 27 June 2017 by Mgruner (talk | contribs)
Jump to: navigation, search


TODO

Home

TODO

This wiki provides a dual H264 streaming example using GstRtspSink.

GstRtspSink Pipeline

The following pipeline sends two different H264 streams through two different mappings: stream1 and stream2. Any of them can be accessed independently.

PORT=12345
MAPPING1=/stream1

gst-launch-1.0 rtspsink name=sink service=$PORT \
v4l2src ! x264enc ! capsfilter caps="video/x-h264, mapping=${MAPPING1}" ! sink.
videotestsrc ! x264enc ! capsfilter caps="video/x-h264, mapping=${MAPPING2}" ! sink.


RTSP Clients

VLC

IP_ADDRESS=192.0.0.1
PORT=12345
MAPPING1=stream1
MAPPING2=stream2

# Stream 1
vlc rtsp://${IP_ADDRESS}:${PORT}/${MAPPING1}

# Stream 2
vlc rtsp://${IP_ADDRESS}:${PORT}/${MAPPING2}

GStreamer

IP_ADDRESS=192.0.0.1
PORT=12345
MAPPING1=stream1
MAPPING2=stream2

# Stream 1
gst-launch-1.0 rtspsrc location=rtsp://${IP_ADDRESS}:${PORT}/${MAPPING1} ! rtph264depay ! avdec_h264 ! queue ! autovideosink

# Stream 2
gst-launch-1.0 rtspsrc location=rtsp://${IP_ADDRESS}:${PORT}/${MAPPING2} ! rtph264depay ! avdec_h264 ! queue ! autovideosink

MPlayer

IP_ADDRESS=192.0.0.1
PORT=12345
MAPPING1=stream1
MAPPING2=stream2

# Stream 1
mplayer rtsp://${IP_ADDRESS}:${PORT}/${MAPPING1}

# Stream 2
mplayer rtsp://${IP_ADDRESS}:${PORT}/${MAPPING2}

Totem

IP_ADDRESS=192.0.0.1
PORT=12345
MAPPING1=stream1
MAPPING2=stream2

# Stream 1
totem rtsp://${IP_ADDRESS}:${PORT}/${MAPPING1}

# Stream 2
totem rtsp://${IP_ADDRESS}:${PORT}/${MAPPING2}


TODO

Home

TODO