Adaptative streaming basics
Adapt video delivery to bandwidth performance in real-time
✔️ The media player is provided with different renditions of the video to play.
✔️ Media renditions can vary in display size (resolution) and file size (bitrate)
✔️ HLS (HTTP Live Streaming) is the standard protocol for adaptative streaming :
- It allows media players to pick the best media rendition for the available bandwidth at any given moment, thus avoiding buffering during playback
- Media renditions are produced by :
- Transcoding the original media to the requested bitrate and resolution and split the result into 2-12 seconds segments (
*.ts
) - Creating a rendition manifest (
*.m3u8
) that contains the paths to the segments
- Transcoding the original media to the requested bitrate and resolution and split the result into 2-12 seconds segments (
- Finally a master manifest (
*.m3u8
) is created, that contains informations about the available renditions manifests
✔️ DASH (Dynamic Adaptive Streaming over HTTP) is another protocol for adaptative bitrate streaming that uses XML files instead of plaintext files
✔️ MP4 and WebM do not support adaptative streaming, meaning that they will always buffer when the available bandwitdth diminishes
✔️ Adaptative bitrate streaming enables vertical scaling of content delivery by providing the best possible experience for the available bandwidth
✔️ CDNs (content delivery networks) enable horizontal scaling of content delivery by :
- Relying on a geographically distributed networks of content servers
- Caching the requested content from the origin server after it is first requested
- Allowing all subsequent requests for the same content to be delivered from a location physically close to the viewer
✔️ Different CDNs can best accomodate delivery needs for a multitude of different users, it is thus a common strategy to use multiple CDNs as a global distributed content cache when reaching out for a large audience
✔️ The goal is to achieve low latency when streaming over HTTP using HLS or DASH