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 inconf/hlsconfig.xml in your Red5 Pro installation directory. You must restart Red5 Pro after making changes to this file.
Set the output format
TheoutputFormat 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
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. SetdvrPlaylist to true to retain all segments from the start of the broadcast:
conf/hlsconfig.xml
hlsconfig.xml changes look like this in context:
conf/hlsconfig.xml
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
Provision the NFS host
Create a storage-optimized server with sufficient disk space. See the storage sizing guidance below to choose the right size.
Configure the export
Add the following line to Then apply the export and restart the NFS service:
/etc/exports:Step 2: Set up the Nginx web server
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).
Configure persistent mount at boot
Add the following line to Reboot to confirm the mount survives a restart.
/etc/fstab:Configure Nginx to serve HLS files
Edit Restart Nginx:
/etc/nginx/sites-available/default:/etc/nginx/sites-available/default
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.Create a base droplet from the standard node image
Start from your regular origin/edge/relay node snapshot.
Enable stream recording in hlsconfig.xml
Edit
/usr/local/red5pro/conf/hlsconfig.xml and set both properties:conf/hlsconfig.xml
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
Recording streams with forceVODRecord
TheforceVODRecord 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
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 quality | Approximate bitrate | Storage per hour |
|---|---|---|
| 720p | 4.5 Mbit/s | ~2 GB |
| 1080p | 8 Mbit/s | ~3.6 GB |
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.
