DVR-like time shifting in live stream
Live time-shifting, also known as DVR (Digital Video Recorder) mode, allows viewers to interact dynamically with live streams by enabling features like pausing, rewinding, and fast-forwarding. This functionality is similar to traditional DVR systems and is especially useful for scenarios where viewers may want to revisit specific moments or catch up after interruptions.
FastPix’s live time-shifting feature ensures a seamless viewing experience while offering broadcasters flexibility to enable or disable these capabilities based on the type of content being streamed.
Why implement live time-shifting?
Live time-shifting elevates the user experience, giving viewers more control over live content.
Here’s why it’s worth enabling:
Benefits to viewers
- Pause and resume: Viewers can step away from the stream without missing anything.
- Rewind moments: Replay specific sections to catch missed details or relive important highlights.
- Fast-forward: Skip ahead after pausing or rewinding to rejoin the current live broadcast.
Ideal use cases
- Live sports: Replay pivotal moments like goals, touchdowns, or critical plays.
- Webinars and conferences: Allow participants to revisit sections for better understanding.
- Breaking news: Ensure no key updates or critical segments are missed.
Modes of operation
FastPix supports two operational modes for time-shifting. These modes are configurable based on the nature of the live stream and the level of interactivity desired:
DVR mode (enableDvrMode: true
)
enableDvrMode: true
)- Time-shifting controls are enabled: Viewers can pause, rewind, and fast-forward live streams.
- Use case: Ideal for interactive streams like sports events, educational sessions, and news broadcasts where viewer control enhances engagement.
Non-DVR mode (enableDvrMode: false
)
enableDvrMode: false
)- Time-shifting controls are disabled: The stream runs in real-time, and viewers cannot pause, rewind, or fast-forward.
- Use case: Best suited for live scenarios where immediacy is critical, such as live auctions or interactive gaming streams.
Enable DVR playback for live streams
FastPix lets you turn any live stream into a DVR-enabled stream, so viewers can pause, rewind, and replay while the event is still live. All you have to do is enable a single setting at stream creation.
Step 1: Create a DVR-enabled livestream
To enable DVR, include enableDvrMode: true when calling the livestream creation API.
Sample request

{
"playbackSettings": {
"accessPolicy": "public"
},
"inputMediaSettings": {
"maxResolution": "1080p",
"reconnectWindow": 60,
"mediaPolicy": "public",
"enableDvrMode": true,
"metadata": {
"livestream_name": "fastpix_livestream"
}
}
}
{
"success": true,
"data": {
"streamId": "9d29c6d13d9e96133536dd217bfaf635",
"streamKey": "*********",
"srtSecret": "**********",
"trial": true,
"status": "idle",
"maxResolution": "1080p",
"maxDuration": 43200,
"lowLatency": false,
"createdAt": "2024-09-20T11:55:19.472529Z",
"reconnectWindow": 60,
"enableRecording": true,
"mediaPolicy": "public",
"metadata": {
"livestream_name": "fastpix_livestream"
},
"enableDvrMode": true,
"playbackIds": [
{
"id": "e37e66a3-090a-4ac6-83ef-b45c03d7a39c",
"accessPolicy": "public"
}
],
"srtPlaybackResponse": {
"srtPlaybackStreamId": "play9d29c6d13d9e96133536dd217bfaf635",
"srtPlaybackSecret": "***********"
}
}
}
How to view DVR-enabled livestreams
To access DVR functionality while watching a livestream, simply append the query parameter dvrMode=true to the FastPix stream URL. This enables the player to show the seek bar and provide pause, rewind, and fast-forward controls for DVR-enabled streams.
https://stream.fastpix.io/{playbackId}.m3u8?dvrMode=true
Replace {playbackId}
with the actual playback ID from your livestream response.
Note: This works only if the stream was created with "enableDvrMode": true
.
Requirements for DVR playback experience
Most default video players do not support HLS DVR playback out of the box, especially when time-shifting is involved. To fully experience features like pausing, rewinding, and fast-forwarding a live stream with DVR enabled, here’s what you need:
- Use a player that supports HLS + DVR
- Use an HLS-compatible player like hls.js for browsers that do not natively support HLS (e.g., Chrome, Firefox).
- Use an HLS-compatible player like hls.js for browsers that do not natively support HLS (e.g., Chrome, Firefox).
- Ensure DVR mode is enabled on the stream
- The stream must be created with
"enableDvrMode": true
. - The playback URL should include the query:
?dvrMode=true
.
- The stream must be created with
- Set appropriate HLS.js configurations
Some key configurations in the player that improve DVR playback:backBufferLength
: Controls how far back the viewer can seek.maxBufferLength
: Adjusts how much content to buffer for smooth playback.lowLatencyMode
: Ensures minimal lag between live and viewer experience.- Error recovery settings (manifestLoadingRetry, levelLoadingRetry, etc.) for robustness.
- Include seek controls in the player UI
- The player must expose a seek bar or navigation controls.
- Many embedded players hide or limit this by default ensure your player UI explicitly allows user control over the timeline.
- Browser compatibility
- HLS with DVR requires proper browser support.
- Use hls.js for non-Safari browsers.
- Safari supports it natively but does not expose all low-level DVR tuning options.
Updated 13 days ago