GstRTSPSink Examples

From RidgeRun Developer Wiki



Previous: Example overviews Index Next: Example overviews/GstSEI





Summary

The RTSP Sink is a GStreamer sink element which permits high performance streaming to multiple computers using the RTSP protocol. This element leverages previous logic from RidgeRun's RTSP server but providing the benefits of a GStreamer sink element like great flexibility to integrate into applications and easy gst-launch based testing. With GStreamer RTSP Sink multiple streams can be achieved simultaneously using any desired combination. This means that within a single GStreamer RTSP server pipeline you can stream multiple videos, multiple audios and multiple audio+video, each one to a different client and a different mapping. In the examples section, different streaming possibilities are shown using the GStreamer RTSP.

The examples for the RTSP Sink have been designed to avoid the need for multiple machines. The current examples show how to send a RTSP stream to the current computer. However, the product is capable of streaming over the network to client computers with the proper setting of the RTSP Sink properties.

RTSP examples list
Example Description
Simple Examples Collection of audio and/or video pipelines streamed over RTSP stream.
GStreamer C App
  • Applications examples of how to stream with RTSPsink.
  • Audio and multi video stream with user authentication included.

Simple Examples

These are a collection of video and audio streams, which can be encoded with different protocols, and are sent through an RTSP stream. The video streams are set to stream without a specified time limit and the user is free to stop the stream at any moment. There are options to change the network PORT and MAPPING through which the stream is sent through

There is also the option to stream an existing audio+video file. The user is free to specify the location of a file they wish to use for this test (the file must be a mp4 file with audio and video). If the user hasn't prepared a file to use for the test, a file will be created for the purpose of the demo.

To view the stream, a RTSP client script has been prepared which will allow easy viewing of the arriving stream. Playback will happen automatically and will continue as long as the transmitter is streaming or the user stops the client pipeline.

GStreamer C App

These applications are an example of how to use the RTSPSink plugins inside an established GStreamer application.

Pipeline Building Examples

These are video streaming pipelines using a set H264 encoding. The examples use the same pipeline for streaming purposes. These examples are a demonstration of different methods for building the pipelines and linking the elements together.

This streams can viewed using the RTSP client script. The script will playback the video until the C application is shutdown or the RTSP client script is stopped.

Audio and Video Example

This is an audio and video stream sent over a RTSP stream. This example shows how the user authentication properties work. The stream has a USER and PASSWORD specified in the authentication properties. This makes the stream unavailable to any client that does not have the credentials.

The application has an additional option to enable a second video stream. This is a live video stream from any available webcam connected to the computer. The live video stream is transmitted at the same time as the audio+video stream, but uses a different MAPPING to allow the client to separate the streams from each other. This second stream also has authentication enabled.

This streams can viewed using the RTSP client script. The script will playback the video until the C application is shutdown or the RTSP client script is stopped. The client script has an option to update the credentials. The credentials must match in the C application and client script in order to playback the stream.



Previous: Example overviews Index Next: Example overviews/GstSEI