Plan your nDVR workflow in Wowza Streaming Engine

nDVR allows you to record a live stream with Wowza Streaming Engine™ media server software while simultaneously allowing users to play or pause the live stream, rewind it a previously recorded point, or resume viewing at the current live point.

Note: Wowza Streaming Engine 4.7.6 or later is required to use nDVR for MPEG-DASH streaming.

Deployment considerations


Wowza Streaming Engine recording options

There are multiple ways besides nDVR to record live streams with Wowza Streaming Engine. You can access and control Stream Recorders (formerly LiveStreamRecorders) by using either Wowza Streaming Engine Manager or the Java API. These methods can be paired with nDVR to have the combination of recording features described below.

If you combine nDVR with the Stream Recorders, you'll be able to:

  • Seek capability during the recording of the live stream (nDVR) and
  • Record into one file for VOD playback later (built-in recording options).

nDVR

Use nDVR when you want users to be able to play or pause a live stream, rewind to a previously recorded point and then resume viewing at the current live point. These viewer actions are allowed while the stream is being recorded live. The recording (.m4fa and .m4fv files) is available for playback through Wowza Streaming Engine (but not through a standalone player) after the live event is completed. The nDVR recording (.m4fa and .mp4v files) can be recomposed into an .mp4 file using the Wowza Streaming Engine REST or Java APIs:

Stream recorders in Wowza Streaming Engine Manager

This is the simplest method but gives you the least amount of control. Configure with Wowza Streaming Engine Manager using the record buttons on the Incoming Streams page. Use this option when you want to:

  • Record your live stream into a single file (mp4) for on-demand playback. The file will not be available for playback until after the recording is completed. Use nDVR if you want to playback the live stream while it's being recorded.
  • Record the entire duration of the published stream.
  • Playback the recorded file by any player that supports the file format without requiring a connection to Wowza Streaming Engine to stream the file.
  • Playback over other protocols besides HTTP (for example, RTSP) supported by Wowza Streaming Engine. 

For more information, see Record live streams in Wowza Streaming Engine.

LiveStreamRecordManager API

The LiveStreamRecordManager, formerly LiveStreamRecorders, is incorporated into the server as a Java API that gives you more control over recording live streams to video-on-demand files. This feature enables you to control the live stream recording process using a web-based user interface, HTTP URL queries, or programmatically. Powerful APIs are included to support splitting of in-process live streams into multiple on-demand MP4 (QuickTime container) files, with the split points based on video duration, clock time, or file size. For more information, see Recording live streams programmatically with the LiveStreamRecordManager APIs.

nDVR advanced configuration for tuning for your workflow

When planning your nDVR deployment, consider fine-tuning the properties described in Configure advanced properties for nDVR.

What is needed to scale an nDVR deployment?

Performance Tuning
It's important that your server is properly tuned for use in a production environment. See the Tune Wowza Streaming Engine for optimal performance.

Best Practices
Review the "Best practices" section in Get started with nDVR in Wowza Streaming Engine. These recommendations are fundamental to planning your nDVR deployment.

Managing Recordings
What is the best way to set up a recording? Many scenarios have a requirement to record a long duration. While it's easy to set up one long recording, a much better approach is to record in manageable chunks. Small logical recordings are preferable to large recordings for many reasons:
 
  • Many players do not handle lengthy recordings very well.
  • Recordings are managed by Wowza Streaming Engine as a single entity. If you have a very large recording, its manifest information is loaded into the server as a single chunk. This has several ramifications:
    • More memory is required to manage the recording's manifest information.
    • nDVR has logic by which recordings are unloaded to release resources when they are no longer used. Using a single large recording and accessing portions of it defeats this scheme.
    • Adaptive bitrate uses the entire recording when aligning recorded streams. Again, this requires more memory and processing to align very long recordings.
  • After you have recorded a live stream into logical chunks (for example, a 24/7 period broken down into 1-hour recordings), you can use the nDVR Playlist Request API to generate a playlist that specifies a start time and (optionally) an end time.
Live Repeater (Origin/Edge)
This method is for scaling your live streaming workflow by configuring origin and edge servers. For configuration instructions, see Set up a Wowza Streaming Engine live stream repeater for nDVR.

Media Cache
Media Cache enables a read-through caching mechanism for video-on-demand streaming. This functionality, along with the live stream repeater, can be added to your nDVR workflow. For more information, see Scale video-on-demand streaming with Wowza Streaming Engine Media Cache and Configure Wowza Streaming Engine Media Cache for nDVR.

What needs to be handled outside of Wowza Streaming Engine?

File Access
nDVR limits the recording to 30 hours maximum. This is put into place because a very long recording results in a large number of directories/files that can cause an issue with the file system having to manage this number of files. The playlist will be repeatedly requested every couple of seconds (based on keyframe size) and, therefore, an extremely large playlist size will be problematic for the player and should be avoided. See Use nDVR Playlist request with the Wowza Streaming Engine Java API for more information about how to request a portion of your recording for playback.

Sufficient hardware is needed to support the level of file access for your workflow. Test your planned workflow to estimate how many files will be generated and how well your hardware can handle the file access required for your workflow. Multiple smaller recordings are more easily managed.

File Management
The nDVR WindowDuration property controls the length of the recording but does not manage previously recorded stores. For example, if you set the WindowDuration value to 3 hours, the recording will be 3 hours long. As time continues past 3 hours but is still less than the 30-hour maximum, the recording will be the last 3 hours and the earliest chunks are deleted as time progresses. If the ArchiveStrategy value is set to delete and there was a previous recording by the same name, it will be deleted and overwritten with the newer recording. If you have other DVR stores on your file system that were previously recorded, those DVR stores won't be affected by the WindowDuration property. Monitoring and managing of recordings isn't part of nDVR functionality. Custom scripts would need to be written to your specification for clearing out unwanted recordings.
 
Note: Purged chunks to maintain the WindowDuration amount of time don't count toward the 30-hour maximum.

More resources