GstRtspSink - Live File Streaming

Revision as of 22:58, 6 July 2017 by Mgruner (talk | contribs)



TODO

Home

TODO

This wiki provides an example to live-stream a video recording through RTSP using GstRtspSink.

GstRtspSink Pipeline

The following pipeline takes a MP4 file containing a H264 video and a AAC audio elementary streams, and streams them through RTSP using GstRtspSink.

PORT=12345
MAPPING=/stream
FILE=/var/media/videos/recording.mp4

gst-launch-1.0 rtspsink name=sink service=${PORT} appsink0::sync=true appsink1::sync=true qtdemux name=demux \
filesrc location=${FILE} ! demux. \
demux. ! aacparse ! audio/mpeg,mapping=${MAPPING} ! sink. \
demux. ! h264parse ! video/mpeg,mapping=${MAPPING} ! sink.


RTSP Clients

VLC

IP_ADDRESS=192.0.0.1
PORT=12345
MAPPING=stream

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

GStreamer

IP_ADDRESS=192.0.0.1
PORT=12345
MAPPING=stream

gst-launch-1.0 rtspsrc location=rtsp://${IP_ADDRESS}:${PORT}/${MAPPING} name=src \
src. ! rtpmp4vdepay ! mpegvideoparse ! avdec_mpeg4 ! queue ! autovideosink \
src. ! rtpmp4adepay ! mpegaudioparse ! avdec_aac ! queue ! autoaudiosink

MPlayer

IP_ADDRESS=192.0.0.1
PORT=12345
MAPPING=stream

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

Totem

IP_ADDRESS=192.0.0.1
PORT=12345
MAPPING=stream

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


TODO

Home

TODO