Learn about re-streaming live streams with Wowza Streaming Engine™ media server software using 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.
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.
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]
- [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
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.
The *-record stream types are the easiest to use but provide the least amount of control. If you use this method, the entire duration of the published stream is recorded to a single file in the live application's streaming file directory. 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. See About recording in Wowza Streaming Engine.
Note: If you use one of the *-record stream types and also configure Incoming Streams for a live application to record a live source stream, two or more copies of the recording are created in the live application's streaming file directory by default. The *-record stream types record the stream to a single file and the recorded file name is the same as the stream name. The Incoming Streams feature creates one or more recordings with file names that include the stream name and other information, depending on selected segmentation and versioning options.