About re-streaming with MediaCaster in Wowza Streaming Engine

Learn about re-streaming live streams with Wowza Streaming Engine™ media server software using MediaCaster.

About re-streaming with MediaCaster


MediaCaster is a system for re-streaming live streams. The MediaCaster functionality in Wowza Streaming Engine re-streams IP camera streams (RTSP/RTP streams), SHOUTcast/Icecast streams, streaming output from native RTP or MPEG-TS encoders, Secure reliable transport (SRT) streams, and RTMP streams from another Wowza Streaming Engine server (live repeater streams). Re-streaming is pulling a stream from a stream source and making it available for streaming to all player technologies supported by Wowza Streaming Engine. The system works on demand. When the first request is received from a player for a given stream, a connection is made to the source stream and the stream is then made available to the player. When the last player stops watching the stream, Wowza Streaming Engine waits for a timeout period. If no other players request the stream, the stream is stopped and isn't available for streaming until another request is made.

This on-demand startup functionality works well for RTMP and RTSP/RTP streaming where advanced packetization isn't required. However, it doesn't work for the HTTP streaming protocols (HLS, MPEG-DASH, HDS, and Smooth Streaming). HLS streams require about 30 seconds of video to be pre-packetized before playback can start, and Microsoft Silverlight clients require three times the key frame duration. Therefore, the stream must be started before it's ready for streaming over HTTP. Wowza Streaming Engine Manager provides features to start receiving MediaCaster streams and to keep them running.

About Stream files


One method for re-streaming live streams with the MediaCaster feature is to configure a file with a .stream file name extension that live applications can use to connect to the source stream through the MediaCaster system. A Stream file contains the URI of the source stream and any properties applied to the stream. When the source stream is started, a live application can use the information in the Stream file to connect to the stream so that it's available for playback when requested by players.

About Startup Streams


Another method for re-streaming live streams with the MediaCaster feature is to use Startup Streams in Wowza Streaming Engine Manager to create stream entries in the [install-dir]/conf/StartupStreams.xml file. Stream entries in this file start automatically when the server starts, or, more specifically, when a virtual host starts. The format of a single entry in StartupStreams.xml looks like this:

[application][mediacaster-type][stream-name]

Where:

  • [application] is the name of live application that re-streams the source stream
  • [mediacaster-type] is a valid mediacaster type: rtp, rtp-record, shoutcast, shoutcast-record, srt, liverepeater, and
  • [stream-name] is the name of the source stream

About recording MediaCaster streams


You can record IP camera streams (RTSP/RTP streams), SHOUTcast/Icecast streams, and streaming output from native RTP encoders using the MediaCaster system. You can configure these features to record source streams by selecting an appropriate *-record stream type for the MediaCaster type, such as rtp-record for IP camera streams or shoutcast-record for SHOUTcast/Icecast streams. The streams are then recorded to the streaming file directory for the selected application.

If the source starts and stops, the file is versioned with a version number and a new file is started. You can control the container format used (MP4 or FLV) by specifying a stream name prefix in the source. If you specify the mp4: prefix, the stream is recorded to an MP4 (QuickTime) container. An MP4 container can only record H.264, AAC, and MP3 media data. If you specify the flv: prefix, the stream is recorded to an FLV container. The FLV container is the only option if you're recording with Flash Player. To apply advanced recording capabilities to these streams, you can use the Incoming Streams feature in Wowza Streaming Engine instead.

More resources