Live Stream Configuration
Live stream configuration terminology
The calculator at the bottom of this document provides a rough estimate of overhead bandwidth based on live stream configuration. To be sure a baseline knowledge exists of live streaming and information needed by the calculator, some terms are defined here:
Term | Definition |
---|---|
HTTP Live Streaming (HLS) | Sends audio and video as a series of small files called media segment files. |
Target Duration | A parameter within the Media Playlist that specifies a maximum duration for any of the media segments. |
Media Playlist File | An index file that provides an ordered list of the URLs of the media segment files. Sometimes also referred to as the manifest file. |
Master Playlist URL | The location of the playlist file to be used in calculations. |
Relative URLs | The paths in the playlist file can use URLs relative to the playlist, which can save significant space in the file - usually greater than 50%. |
Live Window | The amount of time a viewer can go backwards in time in the live stream to view video. Under the hood, this translates into the number of segments that must be kept in the playlist file. So the longer the live window, the bigger the playlist file. |
Segment Duration | The duration of each segment. As segment size decreases manifest size increases. The main drawbacks of a larger segment sizes are less adaptability to bandwidth changes and longer live latency. |
How HLS Live works
In a live stream, the player downloads the Media Playlist repeatedly at a set interval. That interval is an amount of time that is equal to the Target Duration of the Media Playlist.
For example, given a 100KB manifest with a 10 seconds target duration, the following calculation determines the bandwidth used just to download the Media Playlist:
- 100 KB / 10 seconds * 8 bits per byte = 80kbps of bandwidth downloading the Media Playlist to continue video playback
Realize this bandwidth counts as overhead that takes away from the bandwidth available for the actual media.
Calculator
Using the calculator below, you can manipulate certain live stream configuration values and see the results of those changes on Segment Count, Estimated Manifest Size and Estimated Bandwidth Overhead. It is difficult to provide hard best practice numbers for these results since only you know the bandwidth available for your target customers. But realize it makes no sense to provide a minimum rendition that is 300kbps and have a manifest that is so large it takes 1mbps to fetch. The consequences of too much overhead bandwidth can be the video might play but then stall, or the player might fall outside of the live window if it can't keep up with manifest updates. Basically, all available bandwidth will be used to download the manifest updates and no real video segments will be able to download.
Master Playlist URI | |
Uses Relative URIs | |
Size of Live Window | |
Average Segment Duration (in seconds) |