GstRtspSink - Audio+Video Streaming
This wiki provides an audio+video streaming example using GstRtspSink.
|
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}