How to set up live stream repeater for use with Wowza nDVR (origin/edge)

This article provides the basic steps for setting up a live stream repeater for Wowza nDVR. Live stream repeater is a method for delivering a single live stream across a multiple server deployment to many viewers. The setup uses an origin/edge configuration where the source stream is published to an origin server, chunks are recorded on the origin server, and the stream is then made available for playback on multiple edge servers. Wowza nDVR repeats the playlist information from origin to edge. It then serves audio and video chunks via HTTP request from the edge.

Notes:
  • For use with Wowza Streaming Engine™ (version 4.x) and Wowza Media Server™ (version 3.6.4) software.
  • Important: All origins and edges must run either Wowza Streaming Engine software or Wowza Media Server software. Wowza Streaming Engine and Wowza Media Server can't be combined in an origin/edge configuration.

Contents


Installing
Configuring the origin server
Configuring the edge server(s)
Publishing the stream
Playback
Tuning
More resources

Installing


License and install Wowza media server software on the origin server and on all edge servers. The software version must be the same on all origin and edge servers.

Configuring the origin server


This section provides the basic steps for setting up the live stream repeater for Wowza nDVR and for configuring Application.xml. For this example, the origin application is named dvrorigin.

  1. Create the folder [install-dir]/applications/dvrorigin.
  2. Create the folder [install-dir]/conf/dvrorigin and copy the [install-dir]/conf/Application.xml file to this new folder.
  3. Open the newly copied Application.xml file in a text editor and make the following changes:
    • Set the <Streams>/<StreamType> property value to live, rtp-live, or a variant. For example:
      <StreamType>live</StreamType>
    • Set the <Streams>/<LiveStreamPacketizers> property value to:
      <LiveStreamPacketizers>dvrstreamingpacketizer</LiveStreamPacketizers>
      This setting means that DVR streams originate from a recorded store on this Wowza media server. To allow live streaming for this application in addition to DVR streaming, you can add additional packetizers. For example:
      <LiveStreamPacketizers>dvrstreamingpacketizer,cupertinostreamingpacketizer,smoothstreamingpacketizer,sanjosestreamingpacketizer</LiveStreamPacketizers>
    • Set the <DVR>/<Recorders> property value to:
      <Recorders>dvrrecorder</Recorders>
    • Set the <DVR>/<Store> property value to:
      <Store>dvrfilestorage</Store>
    • Set the <DVR>/<WindowDuration>, <DVR>/<ArchiveStrategy>, and <DVR>/<StorageDir> property values as desired. For more information, see How to do advanced configuration for Wowza nDVR.
    • Set the <HTTPStreamers> property value to:
      <HTTPStreamers>dvrchunkstreaming</HTTPStreamers>
      This enables the origin to stream DVR audio and video chunks to the edge servers.

Configuring the edge server(s)


Create a new Wowza media server application on each edge server. In this example, the application is named dvredge.

  1. Create the folder [install-dir]/applications/dvredge.
  2. Create the folder [install-dir]/conf/dvredge and copy the [install-dir]/conf/Application.xml file to this new folder.
  3. Open the newly copied Application.xml file in a text editor and make the following changes:
    • Change the <Streams>/<StreamType> property value to:
      <StreamType>liverepeater-edge</StreamType>
    • Set the <Streams>/<LiveStreamPacketizers> property value to:
      <LiveStreamPacketizers>dvrstreamingrepeater</LiveStreamPacketizers>
      This means that DVR streams originate from another Wowza media server and are received by this Wowza media server. To enable live streaming for this application in addition to DVR streaming, you can add additional packetizers. For example:
      <LiveStreamPacketizers>dvrstreamingrepeater,cupertinostreamingrepeater,smoothstreamingrepeater,sanjosestreamingrepeater</LiveStreamPacketizers>
      It can be a helpful troubleshooting technique to test if a live stream can be played from the edge server.
    • Leave the <DVR>/<Recorders> property value empty:
      <Recorders></Recorders>
    • Leave the <DVR>/<Store> value empty because data is stored on the origin:
      <Store></Store>
    • The <DVR>/<ArchiveStrategy> and <DVR>/<StorageDir> values are ignored on the edges, so these values don't matter.
    • The <DVR>/<WindowDuration> value should remain 0, or be unspecified, as any purging should happen on the origin.
    • Set the <Application>/<Repeater>/<OriginURL> property to point to the origin using the wowz:// URL moniker. This property determines how the edge gets playlist information and retrieves the audio and video chunks. For example:
      <Repeater>
      	<OriginURL>wowz://[origin-ip-address]/dvrorigin</OriginURL>
      </Repeater>
      Where [origin-ip-address] is the IP address of the origin server.

      The WOWZ™ protocol is a TCP-based messaging protocol used for server-to-server communication. It's enabled by default.
    • Set the <HTTPStreamers> value to include the protocols you want to stream DVR to. Choose one or more from cupertinostreaming, smoothstreaming, sanjosestreaming, and mpegdashstreaming. The setting that enables streaming to all supported protocols would look like this:
      <HTTPStreamers>cupertinostreaming,smoothstreaming,sanjosestreaming,mpegdashstreaming</HTTPStreamers>
      Note: mpegdashstreaming is NOT supported in Wowza Media Server™ software.

Publishing the stream


Start the Wowza media server and send a live stream name myStreamto the dvrorigin application on the origin server. For more information, see How to connect a live source to Wowza Streaming Engine.

Playback


H.264-encoded streams can be delivered over any HTTP protocol that's supported by Wowza media server software.

To play using Adobe Flash Player (Adobe HDS)

Note: This example uses the Strobe player, which is based on OSMF, to play the stream.

Double-click [install-dir]/examples/LiveDVRStreaming/FlashHTTPPlayer/player.html, enter the information below, and then click Connect.

http://[wowza-ip-address]:1935/dvredge/myStream/manifest.f4m?DVR

To play using an Apple iOS device (Apple HLS)

Enter the following URL into the Safari web browser on the device:

http://[wowza-ip-address]:1935/dvredge/myStream/playlist.m3u8?DVR

To play using Microsoft Silverlight (Smooth Streaming)

Double-click [install-dir]/examples/LiveDVRStreaming/SilverlightPlayer/player.html, enter the information below, and then click Connect or Start.

http://[wowza-ip-address]:1935/dvredge/myStream/Manifest?DVR

Tuning


Media Cache

Because the edge server(s) request chunks from the origin server, we recommend using Media Cache in a DVR configuration on the edge server(s). This allows local caching of DVR chunks on the edge server(s) and reduces the number of requests from the edge back to the origin to retrieve chunks. For more information, see How to configure Media Cache for Wowza nDVR.

DVR chunks in memory

By default, the Wowza nDVR system holds the most recent 10 chunks in memory for each stream. One way to reduce disk access on both the origin server and edge server(s) is to increase this value. Note that you should understand the ramifications of this. It will hold chunks for each stream rendition in memory, which will cause an increase in memory usage.

For example, suppose that you have 20 high bitrate streams you're streaming with DVR. On average, each video chunk is 900 KB and each audio chunk is 100 KB (so each chunk takes 1 MB). If you increase this value from 10 to 50 chunks, you'll save 40 additional chunks per stream, and using almost 1 GB of additional server memory (20 * 40 * (900 KB + 100 KB) = 800 MB).

Before changing the value, analyze how much memory will be required, whether you have memory to spare, and if disk I/O is an issue. Add the following property to [install-dir]/conf/dvredge/Application.xml under <DVR>/<Properties>:

<Property>
    <Name>chunkMemoryCacheSize</Name>
    <Value>20</Value>
    <Type>Integer</Type>
</Property>

More resources


Troubleshooting
Related information

If you're having problems or want to discuss this article, post in our forum.