• Wowza nDVR Quick Start Guide

    This article is a quick tutorial to help you get started using Wowza nDVR. Wowza nDVR provides the ability to record a live stream with Wowza™ media server software while simultaneously allowing users to play or pause a live stream, rewind to a previously recorded point, or resume viewing at the current live point. Custom configuration enables you to control the archive strategy and availability of your recorded streams. Wowza nDVR requires that the audio and video in an incoming stream be aligned.

    Setup for client playback of recorded streams is similar to playback of live streams from a Wowza media server and can be easily added to your existing media server configuration.

    For more information about Wowza nDVR, see the Wowza nDVR User's Guide, our Wowza nDVR Articles, and the Wowza nDVR Forum.

    Note: This article is for use with Wowza Streaming Engine™ software and Wowza Media Server™ software (version 3.5 and later).

    Contents


    Streaming concepts


    Installation and configuration


    Best practices


    FAQs


    Streaming concepts


    Stream types

    Wowza nDVR supports the live stream type, as well as the liverepeater-edge stream type used in live repeater (origin/edge) configurations:

    • live: Publish and play live video content (best for one-to-many streaming of live events). This stream type can be used by live stream repeater to deliver a single stream in an origin/edge configuration.

    • liverepeater-edge: Edge stream type used by live stream repeater to deliver a single stream in an origin/edge configuration.

    To set up a Wowza nDVR live stream repeater, follow the instructions in How to set up live stream repeater for use with Wowza nDVR (origin/edge).

    Supported media

    Wowza nDVR supports the following video and audio codecs:

    Video

    • H.264
    • Video-only streams

    Audio

    • AAC
    • MP3
    • Audio-only streams

    Wowza nDVR is flexible and can be configured to support multiple workflows. Input can be H.264 video with either AAC or MP3 audio. You can also feed in and record audio-only streams and video-only streams.

    The supported player technologies also must support your media:

    • Microsoft Silverlight requires that both audio and video be present for playback. For live streaming only, the keyframe frequency must be between 1 and 4 seconds (2 seconds is recommended). Anything greater than 4 seconds may cause playback to freeze.

    • Apple iOS devices require that video be encoded using H.264 format and AAC or MP3 stereo audio. Profile and level support varies depending on the device, see the Apple technical specifications for the devices that you plan to target.


    Supported protocols and players

    A Wowza media server can deliver H.264-encoded streams using the following HTTP streaming protocols:

    • Adobe HTTP Dynamic Streaming (Adobe HDS)
    • Apple HTTP Live Streaming (Apple HLS)
    • Microsoft Smooth Streaming

    Your media server software installation includes the following example players that you can use to play your recorded files:

    Microsoft Silverlight ([install-dir]/examples/LiveDVRStreaming/SilverlightPlayer/player.html)

    Strobe ([install-dir]/examples/LiveDVRStreaming/FlashHTTPPlayer/player.html)

    The example players are meant to be used to test your workflow before you develop your own custom player.

    Note: Another option is JW Player. Flowplayer currently doesn't support playback of recorded streams.
    Playback URLs

    Note: In the following examples, [wowza-ip-address] is the IP address or domain name of the server running Wowza media server software.
    To play using Adobe Flash Player (Adobe HDS):

    Double-click [install-dir]/examples/LiveDVRStreaming/FlashHTTPPlayer/player.html, enter the information below, and then click the Connect button.
    http://[wowza-ip-address]:1935/dvr/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/dvr/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 the Connect button.
    http://[wowza-ip-address]:1935/dvr/myStream/manifest?DVR

    Note: Playback URLs can include uppercase "DVR" or lowercase "dvr". Wowza media server application names are case-sensitive.

    Adaptive bitrate delivery

    When Wowza nDVR is added to your live workflow, you can leverage Synchronized Multimedia Integration Language (SMIL) files you created for live streaming. The SMIL workflow requires that you have an encoder that can generate multiple bitrate streams from the same source with properly aligned keyframes.

    Important: The streams used in adaptive bitrate streaming must have aligned keyframes. Wowza nDVR creates chunks based on the keyframe alignment and the adaptive bitrate switching occurs on chunk boundaries.
    Playback URLs for adaptive bitrate streams

    The smil: prefix is used when playing back a group using SMIL files. To see an example SMIL file, see How to do adaptive bitrate streaming.

    To play using Adobe Flash Player (Adobe HDS):

    Double-click [install-dir]/examples/LiveDVRStreaming/FlashHTTPPlayer/player.html, enter the information below, and then click the Connect button.
    http://[wowza-ip-address]:1935/live/smil:myStream.smil/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/live/smil:myStream.smil/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 the Connect button.
    http://[wowza-ip-address]:1935/live/smil:myStream.smil/manifest?DVR

    Notes:
    • Playback URLs can include uppercase "DVR" or lowercase "dvr". Wowza media server application names are case-sensitive.

    • Wowza nDVR doesn't support HTTP playback of DVR streams using the MPEG-DASH streaming protocol.

    Installation and configuration


    Licensing Wowza nDVR

    Perpetual and Subscription licenses for Wowza Streaming Engine software provide for unlimited connections to the media server software instance and enable use of the Wowza nDVR technology that's integrated with each licensed instance.

    Note: If you purchased a license for Wowza media server software before January 1, 2015, contact sales@wowza.com to learn more about how to license Wowza nDVR.

    Application configuration

    To configure Wowza nDVR functionality for live streaming, see How to set up and run Wowza nDVR for live streaming.

    Content storage

    When Wowza nDVR starts recording a live stream, a content storage directory is created. The content storage directory location is defined by the DVR/StorageDir property in the Application.xml file. The default location that Wowza nDVR writes to is [install-dir]/dvr/[app-name]/_definst_/[streamName].[n].

    If the application name ([app-name]) is live and the stream name ([streamName] is myStream, with the default settings in Application.xml, the storage directory will be located at [install-dir]/dvr/live/_definst_/myStream.0.

    If you set the DVR/StorageDir property to E:/myStorage and your stream name is myStream, the storage directory will be located at E:/myStorage/dvr/_definst_/myStream.0.

    Directory Structure

    When Wowza nDVR records a live stream, it creates a new folder in the content storage directory every 600 seconds (10 minutes) by default. The folder naming convention is HHHH_MM_SS where H = hours, M = minutes, S = seconds. As an example, if Wowza nDVR records a live stream for 1 hour and 10 minutes, the content storage directory will contain the following folders:

    0000_00_00
    0000_10_00
    0000_20_00
    0000_30_00
    0000_40_00
    0000_50_00
    0001_00_00
    0001_10_00
    manifest.txt

    Each time-based folder contains .m4fa (audio information) and .m4fv (video information) files and a .txt (manifest) file. If the incoming stream sends metadata, a .m4fm (metadata) file is also created. These files are based on the MPEG-4 format and together represent a chunk of recorded audio and video content that can be used for playback of your recorded stream. Using the folder named 0000_00_00 as an example, the files that describe the first chunk are:

    A-0000_00_00_000.m4fa
    dvrManifest_0000_00_00.txt
    M-0000_00_00_000.m4fm
    V-0000_00_00_000.m4fv

    The files in a time-based folder are named using the folder-naming convention, with A (audio), V (video), or M (metadata) pre-pended to the filename and a timestamp value (in milliseconds) appended to the filename (A-HHHH_MM_SS_mmm).

    Important: Don't delete or move any of these files or playback errors will occur.

    Archive strategy

    You can configure an archiving strategy that tells the DVR store what to do with an old stream when a new stream of the same application instance and stream name starts (for example, when the encoder restarts). The strategy is controlled by the DVR/ArchiveStrategy property in Application.xml. You can set this property to one of the following values:

    • append: Specifies that Wowza nDVR will append to the existing recording. This is the default setting.

    • delete: Specifies that the previous recording will be deleted and replaced with the new recording.

    • version: Specifies that a new content storage directory will be created. If the stream name is myStream, the first recording is written to [install-dir]/dvr/[application-name]/myStream.0, the second recording is written to a directory named myStream.1, and so on. Whenever there's a recording of the same stream name, the previous recording is preserved and not deleted or overwritten.

    DVR window duration

    You can specify the duration (in seconds) of material available from the DVR store for DVR playback. The duration is a floating DVR window that starts at the current live point and works backwards. Older data that falls outside of the specified duration value is purged from the file system. The duration value is controlled by the DVR/WindowDuration property in Application.xml. The default WindowDuration value of 0 means that that there's no DVR window applied and all data is available for DVR playback.

    Best practices


    Aligned audio and video

    Input streams with short keyframe intervals and aligned audio and video work best. Wowza nDVR expects that the audio and video in an incoming live stream is aligned. When the audio and video are out of alignment beyond the allowable tolerance, you'll see the following WARN message in [install-dir]/logs:
    WARN  DvrPacketHandler.handlePacket[live/_definst_/myStream]: Tossing packet with excessive duration: {DvrAMFPacket: size:6785, type:9, src:32185, seq:126, absTimecode: 35557077, timecode:131362, utcTc:1337890914597}
    If you have out-of-alignment issues, you can set properties in Application.xml to try to compensate for them; however, Wowza nDVR can't fix these problems. See dvrAllowableAVPacketDelta in How to do advanced configuration for Wowza nDVR. Note that this property is meant to help in situations where audio and video aren't closely aligned. If you already have an out-of-alignment issue, increasing the default value is likely to cause more problems. Increasing this value will increase the number of chunks that aren't recorded, which may cause the overall quality to be unacceptable.

    keyframe size

    HTTP streaming has a latency of 3 chunks, which is why smaller keyframe sizes after often recommended. Smaller keyframe sizes result in more data in the playlist. Consider playlist size and the frequency in which the data is being sent from the server when determining your encoding settings.

    Dependable live stream

    Wowza nDVR requires a reliable live stream. When troubleshooting Wowza nDVR, first test that your live workflow is successful without nDVR enabled.

    Recording length

    Wowza nDVR has a recording limit of 30 hours. In real-world deployments, serving playlist data this large won't work. Also, if a problem occurs during the recording (disk full, network, out-of-memory, etc.), the entire recording could be comprised. An extremely large manifest file may also cause performance issues because the entire manifest file must be loaded into memory. Select a strategy that records a reasonable length so that small manifest files can be loaded and unloaded quickly. A longer recording is a viable workflow if only a small part of the recording is specified for playback. For example, a 24-hour recording with a 1- or 2-hour playback windows results in a much smaller playlist size vs. a playlist for the entire 24-hour recording. The playlist will be repeatedly requested every few seconds (based on keyframe size); therefore, an extremely large playlist size is problematic for the player and should be avoided. For more information about how to request a portion of your recording for playback, see How to use Wowza nDVR Playlist Request API.

    OSMF player recommendations

    We recommend using OSMF version 2.0. Users have reported buffering issues when using earlier versions. The Strobe example player installed with Wowza Streaming Engine and Wowza Media Server (version 3.5 and later), located in [install-dir]/examples/LiveDVRStreaming/FlashHTTPPlayer/player.html, uses the default values for the buffering parameters.

    Built-in safeguards

    Wowza nDVR has multiple built-in safeguards built that require no additional configuration.

    If Wowza nDVR detects an invalid chunk, it will try to fix it by recalculating if the clock was reset. Or, if it can't fix it, the chunk will be thrown out. For example, an invalid chunk could be caused by a problematic input stream where the video gets far ahead of the audio. If this occurs, it's reported in the logs with warning messages like the following:
    WARN LiveStreamDvrRecorder.endChunk[live/_definst_/myStream]: Recalculating duration by estimating.  Was -601.  Is now 811.
    WARN  DvrPacketHandler.handleHolder(): Skipping holder that can't be re-aligned. Holder: {DvrPacketHolder: type:V pt:3332574 utc:1335872445912 dur:1230 (KEY, ) codec:7 numPackets:0 dataLen:18513 enc.n:0 pkt:{{DvrAMFPacket: size:18513, type:9, src:1, seq:0, absTimecode: 3332574, timecode:1230, utcTc:1335872445912}}}

    FAQs


    What's an example of flexible viewer start time with a live event?

    Wowza nDVR is suited for workflows where you want to record a live stream and have playback flexibility. If you have a one-time live event, or perhaps a recurring event such as a house of worship, you can broadcast a live event and make it available for real time viewing and accommodate late arrivals:

    1. Users start viewing from the start time of the live stream, rewind to hear a particular part of the video again, and then continue streaming from the current live point.

    2. If users join late, they can start viewing after the time the live stream has started, but start from the beginning and continue until the live stream ends. In this scenario, users can start at any time after the live stream has started--1 minute later or 1 hour later.

    3. Users can start viewing the recording after the live stream has stopped. In this scenario, playback is streaming the previously recorded content as video on demand (VOD).

    When do I need to use Wowza nDVR for recording?

    Wowza nDVR is suited for workflows where you want users to be able to pause, resume, or rewind during a live recording. Other recording methods supported by Wowza media server software are suited for workflows where you want to create a recording contained in one MP4 or FLV file for playback as video on demand only with no playback during the time of the recording.

    Do I need a separate Wowza media server application if I already have my live workflow set up?

    No, it's not necessary. You can easily integrate Wowza nDVR with your existing live workflow. For step-by-step instructions, see How to set up and run Wowza nDVR for live streaming. If you have multiple workflows such as live streams that won't recorded or if you need to apply different DVR recording parameters for different input streams, then you can set up an application for each workflow.

    How do I play a recorded video after the live event and recording is finished?

    Use the same Wowza media server application and keep the StreamType set to live, even though the live stream is no longer being published. The URL is the same as if you were playing back the live video. See "Playback" in How to set up and run Wowza nDVR for live streaming for sample playback URLs.

    How do I specify playback start and end times?

    For more information about how to control playlist requests, which have a start time and an optional end-time, see How to use Wowza nDVR Playlist Request API.

    What happens to my recording if my live stream disconnects?

    Wowza nDVR resumes the recording after the live stream reconnects. The streamTimeout property specifies the amount of time that Wowza media server will wait for packets before it stops recording. The default property value is tuned to account for when encoders disconnect and then restart. For more information, see streamTimeout in How to do advanced configuration for Wowza nDVR.

    Can I play recorded streams from Wowza nDVR over RTSP, RTP, RTMP?

    Playback is currently supported over the following HTTP streaming protocols:

    • Adobe HTTP Dynamic Streaming (Adobe HDS)
    • Apple HTTP Live Streaming (Apple HLS)
    • Microsoft Smooth Streaming

    Can I play a previous version of a recorded stream?

    If the ArchiveStrategy property value is set to version, then you can specify which version you want to play in the playback URL. For example, the following playback URL:

    http://localhost:1935/live/myStream.3/playlist.m3u8?dvr

    Specifies that "version 3" of the recorded stream name myStream can be streamed to an Apple iOS device from the Wowza media server live application.

    To learn more about how to control your recordings, see How to use Wowza nDVR Recording API.

    How do I fix Error #2032 in Strobe player?

    This means that the stream can't be found. It could be caused by a malformed URL or the specified live stream isn't available.

    What does dvrstreamingpacketizer do?

    This packetizer takes a live incoming stream and saves the stream data through the Wowza nDVR recording process. As part of the configuration required to enable Wowza nDVR, add the dvrstreamingpacketizer property value to the Streams/LiveStreamPacketizers container in Application.xml. You must also add additional live stream packetizers property values (cupertinostreamingpacketizer, smoothstreamingpacketizer, sanjosestreamingpacketizer) to the container to enable live streaming to supported players/devices.

    What happens if I don't set a store location?

    Wowza nDVR will set it by default to:
    <Store>dvrfilestorage</Store>
    In a live repeater (origin/edge) configuration, this property must be left empty. For more information, see How to set up live stream repeater for use with Wowza nDVR (origin/edge).

    Originally Published: 03-29-2012.
    Updated: For Wowza Streaming Engine on 02-18-2015.