GstRtspSink - Audio+Video Streaming

From RidgeRun Developer Wiki


Previous: Dual_H264_Video_Streaming Index Next: Audio+Video Streaming Plus H264 Single Streaming




This wiki provides an audio+video streaming example using GstRtspSink.

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

GstRtspSink Pipeline

The following pipeline combines a H264 video and an AAC audio stream into a single mapping. When viewing the stream, a synchronized A/V video should render.

PORT=12345
MAPPING=/stream

gst-launch-1.0 rtspsink name=sink service=$PORT \
v4l2src ! queue ! videoconvert ! x264enc tune=zerolatency ! h264parse ! capsfilter caps="video/x-h264, mapping=${MAPPING}" ! sink. \
alsasrc ! voaacenc ! aacparse ! capsfilter caps="audio/mpeg, mapping=${MAPPING}" ! sink.

RTSP Clients

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} name=src \
src. ! rtph264depay ! h264parse ! avdec_h264 ! queue ! autovideosink \
src. ! rtpmp4adepay ! aacparse ! avdec_aac ! queue ! autoaudiosink

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}



Previous: Dual_H264_Video_Streaming Index Next: Audio+Video Streaming Plus H264 Single Streaming