Skip to main content
Live DVR lets viewers seek backward and rewind during an ongoing live broadcast. Instead of only seeing what is happening right now, a viewer can pause and rewind to an earlier point in the stream without the broadcast stopping for others. Enabling this feature requires server-side configuration to retain HLS segments rather than discarding them as they age, and client-side initialization to present playback controls that reference those retained segments.

How Live DVR works

Red5 Pro generates an HLS playlist alongside the live stream. In a standard live configuration, old segments are removed from the playlist as new ones arrive, so the playlist only ever describes the current live window. When DVR is enabled, the server retains all segments and maintains a growing playlist from the start of the broadcast. The subscriber’s player loads this full playlist and can seek to any point within it.

Server configuration

All DVR settings are in conf/hlsconfig.xml in your Red5 Pro installation directory. You must restart Red5 Pro after making changes to this file.

Set the output format

The outputFormat property controls the container format used for HLS segments. The default is TS (MPEG-2 Transport Stream), which produces a .m3u8 manifest alongside .ts segment files. You can also set it to FMP4 to produce fragmented MP4 segments.
conf/hlsconfig.xml
<property name="outputFormat" value="TS"/>
For DVR purposes, TS is the most broadly compatible format and is recommended unless you have a specific reason to use FMP4.

Enable DVR playlist retention

By default, the server discards older segments. Set dvrPlaylist to true to retain all segments from the start of the broadcast:
conf/hlsconfig.xml
<property name="dvrPlaylist" value="true"/>
With both properties set, your hlsconfig.xml changes look like this in context:
conf/hlsconfig.xml
<!-- Output format for HLS segments: TS or FMP4 -->
<property name="outputFormat" value="TS"/>

<!-- Retain all segments to enable DVR seeking -->
<property name="dvrPlaylist" value="true"/>
Restart Red5 Pro after saving the file.

Client-side requirements

Your subscriber client must initialize the player in DVR mode to present seek controls. The specifics depend on the Red5 Pro WebRTC SDK version you are using. Refer to the DVR API development documentation for the SDK initialization options required to enable seek controls on the client.
The player must be able to load and parse the full DVR playlist. For long broadcasts, this playlist grows large. Test with your target player to ensure it handles large manifests without performance issues.

DVR with Stream Manager clustering

In a Stream Manager cluster, the DVR stream segments are written to the Transcoder node’s local disk by default. If subscribers can land on any edge node in your cluster, the segments must be accessible from a shared location rather than a single node’s disk. The standard solution is an NFS (Network File System) mount that all relevant nodes write to and read from.

Architecture

NFS server

A dedicated storage-optimized server that hosts the shared filesystem. All HLS segment files are written here.

Nginx web server

Serves the HLS segment files and manifest over HTTP so that subscriber clients can fetch them. Mounts the NFS share as its document root.

Stream Manager cluster

Transcoder nodes write segments directly to the NFS mount at /usr/local/red5pro/webapps/live/streams. Origin, edge, and relay nodes use a standard image.

Step 1: Set up the NFS server

1

Provision the NFS host

Create a storage-optimized server with sufficient disk space. See the storage sizing guidance below to choose the right size.
2

Install the NFS kernel server

sudo apt update
sudo apt install nfs-kernel-server
mkdir /home/nfs
sudo chown nobody:nogroup /home/nfs
sudo chmod 777 /home/nfs
3

Configure the export

Add the following line to /etc/exports:
/home/nfs *(rw,sync,no_subtree_check)
Then apply the export and restart the NFS service:
sudo exportfs -a
sudo systemctl restart nfs-kernel-server
4

Assign a static address

Assign a floating IP or static IP to the NFS server and create a DNS A record for it — for example, my-nfs.example.com. Using a DNS name rather than an IP makes it easier to update the mount configuration if the server changes.

Step 2: Set up the Nginx web server

1

Provision the Nginx host

Create a basic server (80 GB disk is sufficient for the OS; the actual segment data lives on the NFS share).
2

Install NFS client and Nginx

sudo apt update
sudo apt install nfs-common nginx
mkdir /home/nfs
3

Mount the NFS share

sudo mount my-nfs.example.com:/home/nfs /home/nfs
Verify the mount:
df -h
You should see the NFS share listed.
4

Configure persistent mount at boot

Add the following line to /etc/fstab:
my-nfs.example.com:/home/nfs /home/nfs nfs auto,nofail,noatime,nolock,intr,tcp,actimeo=1800 0 0
Reboot to confirm the mount survives a restart.
5

Configure Nginx to serve HLS files

Edit /etc/nginx/sites-available/default:
/etc/nginx/sites-available/default
server {
    listen 80 default_server;
    listen [::]:80 default_server;
    server_name _;

    location / {
        autoindex on;
        types {
            application/vnd.apple.mpegurl m3u8;
            video/mp2t ts;
        }
        root /home/nfs;
        add_header Cache-Control no-cache;
    }
}
Restart Nginx:
sudo systemctl restart nginx
6

Create a DNS record for Nginx

Create a DNS A record pointing to your Nginx server’s IP — for example, media.example.com.

Step 3: Prepare the Transcoder node image

The Transcoder nodes in your Stream Manager cluster need the NFS share mounted at the Red5 Pro streams directory so that recorded segments are written to shared storage.
1

Create a base droplet from the standard node image

Start from your regular origin/edge/relay node snapshot.
2

Install the NFS client

sudo apt update
sudo apt install nfs-common
3

Mount the NFS share at the streams directory

sudo mount my-nfs.example.com:/home/nfs /usr/local/red5pro/webapps/live/streams
Verify the mount:
df -h
ls -lo /usr/local/red5pro/webapps/live/streams
4

Enable stream recording in hlsconfig.xml

Edit /usr/local/red5pro/conf/hlsconfig.xml and set both properties:
conf/hlsconfig.xml
<property name="forceVODRecord" value="true"/>
<property name="dvrPlaylist" value="true"/>
5

Snapshot the droplet

Create a snapshot/image from this configured droplet. This is the image you will assign to the Transcoder role in your launch configuration.

Step 4: Create the launch configuration

Reference both images in your Stream Manager launch configuration — the standard image for origin, edge, and relay roles, and the Transcoder image for the transcoder role. Use a CPU-optimized instance type for Transcoder nodes.
launch configuration
{
  "launchconfig": {
    "name": "origin-edge-relay-transcoder-dvr",
    "description": "Cluster with DVR-enabled transcoder nodes writing to NFS",
    "version": "0.0.3",
    "image": "node-origin-edge-relay-image",
    "targets": {
      "target": [
        {
          "role": "origin",
          "connectionCapacity": 30.0,
          "instanceType": "c-4"
        },
        {
          "role": "edge",
          "connectionCapacity": 300.0,
          "instanceType": "c-4"
        },
        {
          "role": "relay",
          "connectionCapacity": 40.0,
          "instanceType": "c-4"
        },
        {
          "role": "transcoder",
          "connectionCapacity": 20.0,
          "image": "node-transcoder-nfs-image",
          "instanceType": "c-8"
        }
      ]
    }
  }
}

Recording streams with forceVODRecord

The forceVODRecord property in conf/hlsconfig.xml instructs Red5 Pro to record every stream as a VOD file in addition to serving it live. Enable it on Transcoder nodes when you want persistent recordings written to shared storage:
conf/hlsconfig.xml
<property name="forceVODRecord" value="true"/>
With forceVODRecord enabled, completed recordings are accessible at the Nginx server URL after the stream ends.

Storage sizing

Disk capacity on your NFS server determines how many streams you can record simultaneously and for how long. Use the following estimates as a starting point:
Stream qualityApproximate bitrateStorage per hour
720p4.5 Mbit/s~2 GB
1080p8 Mbit/s~3.6 GB
Network throughput: A standard NFS server with a 2 Gbit/s network connection can sustain approximately 15 simultaneous 720p streams (15 × 4.5 Mbit/s = 67.5 Mbit/s, well within the limit). Transcoder node capacity: A single Transcoder node on an 8-vCPU CPU-optimized instance can handle approximately 5 concurrent streams. Monitor CPU, memory, and network on both the Transcoder nodes and the NFS server after deployment to confirm actual capacity.
Start with the smallest storage-optimized NFS instance that fits your expected recording volume, then resize as you measure actual usage. It is easier to expand storage than to predict it accurately before a deployment.
For AWS deployments, you can use Amazon EFS (Elastic File System) as the NFS backend instead of a self-managed NFS server. EFS scales storage automatically and eliminates the need to provision a dedicated NFS host. See the AWS EFS integration guide for setup details.