Set up a Wowza Streaming Engine live stream repeater for Wowza nDVR

You can use Wowza nDVR with a Wowza Streaming Engine™ media server software deployment that's configured for live stream repeating. To do so, you must run Wowza Streaming Engine on both the origin and edge servers, and then configure each server to use nDVR.

Important: All origin and edge servers in the live stream repeating configuration must run the same version of Wowza Streaming Engine or Wowza Media Server™ software. Versions can't be mixed. Live stream repeating with nDVR is supported starting with Wowza Media Server 3.6.4.

About nDVR with live stream repeating


Live stream repeating is a method of delivering a single live stream across multiple servers to many viewers. It uses an origin/edge configuration in which the source stream is published to an origin server and then delivered for playback on multiple edge servers.

When combined with Wowza nDVR, chunks are recorded on the origin server. Wowza nDVR repeats the playlist information from origin to edge. It then serves audio and video chunks over HTTP from the edge. 

Configure the origin server 


Create a Wowza Streaming Engine application on the origin server. In this example, the application is named dvrorigin.

  1. Create a folder named dvrorigin in [install-dir]/applications/.
  2. Create another folder named dvrorigin in [install-dir]/conf/.
  3. Copy the Application.xml file in [install-dir]/conf/ to [install-dir]/conf/dvrorigin.
  4. Open [install-dir]/conf/dvrorigin/Application.xml in a text editor.
  5. Set the <Streams>/<StreamType> property value to live, rtp-live, or a variant. For example:
<StreamType>live</StreamType>
  1. Set the <Streams>/<LiveStreamPacketizers> property value to:
<LiveStreamPacketizers>dvrstreamingpacketizer</LiveStreamPacketizers>

This setting means that DVR streams originate from a recorded store on this Wowza origin 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>
  1. Set the <DVR>/<Recorders> property value to:
<Recorders>dvrrecorder</Recorders>
  1. Set the <DVR>/<Store> property value to:
<Store>dvrfilestorage</Store>
  1. Set the <DVR>/<WindowDuration>, <DVR>/<ArchiveStrategy>, and <DVR>/<StorageDir> property values as desired. For more information, see Configure advanced properties for Wowza nDVR.
  2. Set the <HTTPStreamers> property value to:
<HTTPStreamers>dvrchunkstreaming</HTTPStreamers>

This enables the origin to stream DVR audio and video chunks to the edge servers. 

Configure the edge server(s)


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

  1. Create a folder named dvredge in [install-dir]/applications/.
  2. Create another folder named dvredge in [install-dir]/conf/dvredge.
  3. Copy the Application.xml file in [install-dir]/conf/ file to [install-dir]/conf/dvredge.
  4. Open [install-dir]/conf/dvredge/Application.xml in a text editor.
  5. Change the <Streams>/<StreamType> property value to:
<StreamType>liverepeater-edge</StreamType>
  1. Set the <Streams>/<LiveStreamPacketizers> property value to:
<LiveStreamPacketizers>dvrstreamingrepeater</LiveStreamPacketizers>

This means that DVR streams originate from another Wowza Streaming Engine server and are received (repeaetd) by this edge 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.

  1. Leave the <DVR>/<Recorders> property value empty because recording is performed on the origin:
<Recorders></Recorders>
  1. 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 edge servers, so these values don't matter.

The <DVR>/<WindowDuration> value should remain 0, or be unspecified, as any purging should happen on the origin.

  1. Set the <Application>/<Repeater>/<OriginURL> property to point to the origin using the WOWZ prefix. For example:
<Repeater>
	<OriginURL>wowz://[origin-ip-address]/dvrorigin</OriginURL>
</Repeater>

For [origin-ip-address], use the IP address of the origin server.

This property determines how the edge gets playlist information and retrieves the audio and video chunks.

  1. Set the <HTTPStreamers> value to include the protocols to which you want to stream DVR. 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>

Publish the stream


Start Wowza Streaming Engine and send the live stream myStream to the dvrorigin application on the origin server. For more information, see Connect a live source to Wowza Streaming Engine

Play the nDVR recording


H.264-encoded streams can be delivered over any HTTP protocol that Wowza Streaming Engine supports.

To play using Adobe Flash Player (Adobe HDS)

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

To test playback, you can use the example Flash player included in the Wowza Streaming Engine installation ([install-dir]/examples/LiveDVRStreaming/FlashHTTPPlayer/player.html).

Enter the following URL in a player that supports Adobe HDS:

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

To play using an Apple iOS device (Apple HLS)

Enter the following URL into Safari on the device:

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

To play using Microsoft Silverlight (Smooth Streaming)

To test playback, you can use the example Silverlight player included in the Wowza Streaming Engine installation ( [install-dir]/examples/LiveDVRStreaming/SilverlightPlayer/player.html).

Enter the following URL in a player that supports Smooth Streaming:

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

To play using MPEG-DASH

To test playback, you can use the example MPEG-DASH player included in the Wowza Streaming Engine installation ([install-dir]/examples/LiveDVRStreaming/MPEGDASHPlayer/player.html).

Enter the following URL in a player that supports MPEG-DASH:

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

Tuning


Media Cache

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

DVR chunks in memory

By default, Wowza nDVR holds the most recent 10 chunks in memory for each stream. One way to reduce disk access on both the origin server and edge servers is to increase this value. The tradeoff, however, is that holding more chunks for each stream rendition in memory increases 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. If you decide to change the value, add the chunkMemoryCacheSize property to [install-dir]/conf/dvredge/Application.xml under <DVR>/<Properties> like so:

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

More resources


Troubleshooting
Related information