Configure nDVR using the Wowza Video REST API

Learn how to configure nDVR and allow viewers to play or pause a live stream, rewind it to a previously recorded point, or resume viewing at the current live point.

Limitations and requirements

  • Support for this feature varies depending on the player. nDVR doesn't work with Wowza Player. For best results, test in the player of your choice before your live event is scheduled to begin.

Before you start

You must complete the following tasks:

  • Configure a live stream or transcoder to record when it starts. View Begin recording when you start a transcoder to learn how to configure the live stream or transcoder. Make note of your stream target ID(s) when you create your stream. You'll need the target ID to set the playlistSeconds property.

Enable the playlistSeconds property

The playlistSeconds property sets the number of seconds in the master playlist and determines how far back viewers are able to rewind the stream.

You can use the following sample request, making sure to:

  • Set stream_target_id to the ID for the stream's target.
  • Set value to the amount of time you want a viewer to be able to rewind the stream. Valid values are any integer between 6 and 28800 . 28800 seconds is 8 hours.

Endpoint Reference

Copy
Copied
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${WV_JWT}" \
-d '{
  "property": {
    "key": "playlistSeconds",
    "section": "playlist",
    "value": 28800
  }
}' "${WV_HOST}/api/${WV_VERSION}/stream_targets/[stream_target_id]/properties"

Now when the stream starts, viewers can play or pause the live stream, rewind it to a previously recorded point, or resume viewing at the current live point based on the number of seconds you specified.

More resources