• How to set up live stream repeater for use with Wowza nDVR AddOn (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.

    Note: Wowza Media Server® 3.0.0 or later is required.

    Note: Wowza Streaming Engine™ 4.0 requires that all origins and edges run the Wowza Streaming Engine software (version 4.0 or later). Wowza Media Server and Wowza Streaming Engine instances can't be combined in an origin/edge configuration.

    Contents



    Tutorial


    Troubleshooting


    Related Articles


    Tutorial



    Installing


    License and install Wowza Media Server on the origin server and on all edge servers. The Wowza Media Server 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 or rtp-live (or a variant). For example:
        Code:
        <StreamType>live</StreamType>
      • Set the Streams/LiveStreamPacketizers property value to:
        Code:
        <LiveStreamPacketizers>dvrstreamingpacketizer</LiveStreamPacketizers>
        This means that DVR originates 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:
        Code:
        <LiveStreamPacketizers>cupertinostreamingpacketizer,smoothstreamingpacketizer,sanjosestreamingpacketizer,dvrstreamingpacketizer</LiveStreamPacketizers>
      • Set the DVR/Recorders property value to:
        Code:
        <Recorders>dvrrecorder</Recorders>
      • Set the DVR/Store property value to:
        Code:
        <Store>dvrfilestorage</Store>
      • Set the DVR/WindowDuration, DVR/ArchiveStrategy, and DVR/StorageDir property values to desired values. For more information, see How to do advanced configuration for Wowza nDVR AddOn.

      • Set the HTTPStreamers property value to:
        Code:
        <HTTPStreamers>dvrchunkstreaming</HTTPStreamers>
        This enables the origin to stream DVR audio and video chunks to the edge servers.


    Configuring the edge server


    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:
        Code:
        <StreamType>liverepeater-edge</StreamType>
      • Set the Streams/LiveStreamPacketizers property value to:
        Code:
        <LiveStreamPacketizers>dvrstreamingrepeater</LiveStreamPacketizers>
        This means that DVR originates from another Wowza Media Server and is 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:
        Code:
        <LiveStreamPacketizers>cupertinostreamingrepeater,smoothstreamingrepeater,sanjosestreamingrepeater,dvrstreamingrepeater</LiveStreamPacketizers>
        It can be a helpful troubleshooting technique to test if a live stream can be played back from the edge server.

      • Leave the DVR/Recorders property value empty:
        Code:
        <Recorders></Recorders>
      • Leave the DVR/Store value empty because data is stored on the origin:
        Code:
        <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.

      • The Application/Repeater/OriginURL should point back to the origin using the WOWZ™ protocol (Wowza messaging protocol). This setting determines how the edge gets playlist information and retrieves the audio and video chunks. For example:
        Code:
        <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 new TCP-based messaging protocol in Wowza Media Server 3.5 and is used for server-to-server communication. It's enabled by default. If one of the Wowza Media Servers in the origin/edge configuration isn't running Wowza Media Server 3.5, an RTMP connection will be established between the servers instead.

      • Set the HTTPStreamers protocol value to include the protocols you want to stream DVR to. Choose one or more from cupertinostreaming, smoothstreaming , and sanjosestreaming. The setting that enables streaming to all supported protocols would look like this:
        Code:
        <HTTPStreamers>cupertinostreaming,smoothstreaming,sanjosestreaming</HTTPStreamers>


    Publishing the stream



    1. Start Wowza Media Server.

    2. Send the stream to the dvrorigin application on the origin server or use Stream Manager to start the stream on the origin server. For this example, the stream name is named myStream.


    Playback


    H.264-encoded streams can be delivered over any HTTP protocol that is supported by Wowza Media Server.

    To play using Adobe Flash Player (San Jose/Adobe HTTP Dynamic Streaming)

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

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

    Wowza Media Server 3.1.2 and earlier
    Double-click [install-dir]/examples/LiveDvrStreaming/clientStrobe/DvrOSMFPlayer.html, enter the information below, and then click the Play button.

    Code:
    http://[wowza-ip-address]:1935/dvredge/myStream/manifest.f4m?DVR
    To play using an Apple iOS device (Cupertino/Apple HTTP Live Streaming)

    Enter the following URL into the Safari web browser on the device:
    Code:
    http://[wowza-ip-address]:1935/dvredge/myStream/playlist.m3u8?DVR
    To play using Microsoft Silverlight (Smooth Streaming)

    Wowza Media Server 3.5
    Double-click [install-dir]/examples/LiveDVRStreaming/SilverlightPlayer/player.html, enter the information below, and then click the Connect button.

    Wowza Media Server 3.1.2 and earlier
    Double-click [install-dir]/examples/LiveDvrStreaming/clientSilverlight/LiveDvrSmoothStreaming.html, enter the information below, and then click the Play button.

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

    Tuning


    MediaCache
    Because the edge server(s) will request chunks from the origin server, we recommend using MediaCache in a DVR configuration on the edge server(s). This will allow local caching of DVR chunks on the edge server(s) and reduce the number of requests from the edge back to the origin to retrieve chunks. For more information, see How To Configure MediaCache for Wowza nDVR AddOn.

    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 are streaming with DVR. On average, each video chunk is 900KB and each audio chunk is 100 KB (so each chunk takes 1 MB). If you increase this value from 10 to 50 chunks, you will be saving 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:
    Code:
    <Property>
        <Name>chunkMemoryCacheSize</Name>
        <Value>20</Value>
        <Type>Integer</Type>
    </Property>


    Updated: For Wowza Media Server 3.5 on 11-15-2012

    Comments 16 Comments
    1. josnidhin -
      I have the origin server application configured as "liverepeater-origin" and edge as "liverepeater-edge". I started recording a stream on the origin server and I am trying to watch it live from the edge server but its not playing of as live video, its plays as a full video with a fixed duration even though the recording is still going on the origin server. I was expecting a live video on edge server too. Am I missing something or is this the expected behaviour?
    1. lisa_w -
      This is fixed in the latest development patch, WowzaMediaServer3.0.3-patch12.zip -Lisa
    1. dilonge -
      The edge server must have the license nDVR too? Because it´s not working on edge playing on iPad device.
    1. ScottKell -
      Quote Originally Posted by dilonge View Post
      The edge server must have the license nDVR too? Because it´s not working on edge playing on iPad device.
      No, you do not need an nDVR license on the edge. Only servers that are recording nDVR require the nDVR license.
    1. dilonge -
      Playback from both edge and origin without dvr works, but with DVR work only on origin. The follow error is in the edge log file: DvrManifestEntryFactory.deserialize: java.nio.BufferUnderflowException.
    1. ScottKell -
      Quote Originally Posted by dilonge View Post
      Playback from both edge and origin without dvr works, but with DVR work only on origin. The follow error is in the edge log file: DvrManifestEntryFactory.deserialize: java.nio.BufferUnderflowException.
      First make sure you have the same version of Wowza on the origin and edge.
      Second, make sure you have followed the nDVR repeater article closely to configure it properly.
      Look for other errors and warnings in the logs.

      If you want more detailed analysis of the problem, send an email to suport@wowza.com. Describe the problem in detail, reference this thread, provide zipped up logs and conf folders from origin and edge, include the player ytou nare using as well as the URL you are using to access the stream.

      Scott
    1. dilonge -
      Hi Scott,

      well...the edge server version is 3.0.3 and the origin server version was 3.0.5. When I did the upgrade origin to 3.1.2 the DVR not working more on origin and a java error occured. The problem was a http provider module (http://www.wowza.com/forums/content....-Recording-API) that was compiled with the version 3.0.5 and when I removed it the DVR working on both servers (edge and origin). I will to upgrade the edge server to the same version to origin server and recompiled the API HTTP Provider with this version to test if it will work.

      Thanks for your help!
    1. josnidhin -
      How do you handle query parameters on the edge servers? I have setup the above configuration and was trying to use the "wowzadvrplayliststart" query parameter on the edge server but it doesnt seem to work. Is query parameters supports and how do I get it to work?
    1. rrlanham -
      This has to be done on the origin.

      http://www.wowza.com/forums/content....st-Request-API

      Edge's re-stream from origin. An origin will have no way of knowing about querystring in edge playback

      Richard
    1. rrlanham -
      I have further info that I was incorrect. The query params should work from the edge.

      Richard
    1. luominll -
      Does v3.1 support the WOWZ protocol?
      How to configure the origin source on the edge in v3.1?

      <Repeater>
      <OriginURL>wowz://[origin-ip-address]/dvrorigin</OriginURL>
      </Repeater>
    1. rrlanham -
      No, 3.1 doesn't support wowz protocol. It was introduced in 3.5

      Richard
    1. q13240455195 -
      hello, wowza

      follow this article, nDVR(origin/edge) works well.
      but how can I configure nDVR(origin/edge/edge) with "liverepeater-edge-origin"?

      Thanks for your help!
    1. rrlanham -
      Follow the "Configuring the edge server" section to configure the "liverepeater-edge-origin"

      Richard
    1. q13240455195 -
      I realized my mistake.
      In middle-edge application, add dvrchunkstreaming to "<HTTPStreamers>cupertinostreaming,smoothstreaming,sanjosestreaming</HTTPStreamers>"
      then it works fine.

      thank you, rrlanham
    1. pirateMan -
      Quote Originally Posted by josnidhin View Post
      How do you handle query parameters on the edge servers? I have setup the above configuration and was trying to use the "wowzadvrplayliststart" query parameter on the edge server but it doesnt seem to work. Is query parameters supports and how do I get it to work?
      In case someone stumbles on same problem. The dvrdelegate properties needs to be included on the edge server Application.xml also, this way the edge can respond to a query string. Later comment explains that origin wouldn't know of the query string so this is how to get it to work on the edge.