Ask AI

Recommendations for a redundant stream

How to deal with HLS manifests with redundant playlists

Many production systems employ methods to add redundancy to their live streams. A common method is to add multiple identical renditions to the multivariant playlist. If one rendition fails, browsers fall back to a secondary/backup rendition. For a good intro, see "Survive CDN failures with Redundant Streams” from Mux.

A redundant manifest looks like this:

#EXTM3U

#EXT-X-STREAM-INF:BANDWIDTH=2000000,RESOLUTION=1280x720
https://primary.example.com/medium.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=2000000,RESOLUTION=1280x720
https://backup.example.com/medium.m3u8
 
#EXT-X-STREAM-INF: BANDWIDTH=5000000,RESOLUTION=1920x1080
https://primary.example.com/high.m3u8

#EXT-X-STREAM-INF: BANDWIDTH=5000000,RESOLUTION=1920x1080
https://backup.example.com/high.m3u8

How CaptionHub Live treats redundant streams

By default CaptionHub picks the most optimal playlist for transcription from the list of renditions, but does not take into account playlist availability. We do not automatically switch over to a different playlist mid-stream like a player would.

However, if you’re using the HLS integration, CaptionHub can be configured to utilise redundant playlists. This is not currently possible when using the plugin integration.

Set up a redundant stream

If you have HLS playlist with redundancy, the recommendation is to run two separate projects.

This means if the primary HLS feed goes away, the player will fail over to the backup rendition, and show captions from the backup project.

Step by step:

  1. Create a “primary” and “backup” project
  1. Use the same HLS URL for both
  1. Point the HLS transcription URL for the primary/backup
  1. In your multivariant playlist, create multiple EXT-X-MEDIA entries, for the primary/backup with different GROUP-ID. You can then point the different variants to the correct subtitle track.
    1. Here’s an example of the above playlist modified to use redundant projects:

      #EXTM3U
      
      #EXT-X-STREAM-INF:BANDWIDTH=2000000,RESOLUTION=1280x720,SUBTITLES="primary-captions"
      https://primary.example.com/medium.m3u8
      
      #EXT-X-STREAM-INF:BANDWIDTH=2000000,RESOLUTION=1280x720,SUBTITLES="backup-captions"
      https://backup.example.com/medium.m3u8
       
      #EXT-X-STREAM-INF: BANDWIDTH=5000000,RESOLUTION=1920x1080,SUBTITLES="primary-captions"
      https://primary.example.com/high.m3u8
      
      #EXT-X-STREAM-INF: BANDWIDTH=5000000,RESOLUTION=1920x1080,SUBTITLES="backup-captions"
      https://backup.example.com/high.m3u8
      
      #EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="primary-captions",NAME="English",DEFAULT=YES,AUTOSELECT=YES,FORCED=NO,LANGUAGE="en",URI="https://cdn.captionhub.com/live/${primary_project_id}/en.m3u8"
      #EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="backup-captions",NAME="English",DEFAULT=YES,AUTOSELECT=YES,FORCED=NO,LANGUAGE="en",URI="https://cdn.captionhub.com/live/${secondary_project_id}/en.m3u8"
 
Did this answer your question?
😞
😐
🤩