Live streaming has undoubtedly become a crucial part of online media consumption; whether you’re watching a live stream of a local news network to engaging with content creators on a YouTube live stream, they all work using one of the following web technologies (protocols):
Having said that, both protocols work in a similar fashion — data is encoded (split up) into chunks and is sent to a client to view.
HLS, or HTTP Live Streaming, is a standard developed by Apple. A broad overview of an HLS live stream in action is in the following diagram:
The technology, in principle, serves multiple playlists for adaptive bitrates (so someone that wishes to access a live stream with a slower connection can still view a “lower quality” 1280x720 (720p) stream while others with fast connections may potentially have access to a 3840x2160 (4K) stream). When a browser loads the player, it will parse the M3U8 playlist, read video/stream metadata and begin to play through the chunks (chunks tend to be a few seconds each and they all have “time markings” so a player can stitch the video together).
Another feature of HLS is accessibility: video streams can contain VTT subtitle files (you may have noticed this if you’ve used Bunny.net Stream, which uses HLS to serve Videos on Demand), which a player can display on-screen. As it is encoded in plain-text, other accessibility features can be implemented — even automatic translation can be used for other languages.
As mentioned previously, DASH works similarly to HLS streams. MPEG-DASH was developed by a consortium of companies, and is internationally recognized as the “de-facto” standard for live streaming. These videos, however, are not natively supported on certain platforms (namely iOS), so platforms often end up supporting HLS-powered streams (or both) due to platform compatibility.
With DASH streams, though, a player (client-side) will request a “playlist” (a text file) that contains a list of “chunks” — similar to HLS. Those chunks are used, in conjunction with the “playlist,” to form a stitched (or uninterrupted) video that can range from a variety of lengths (any length is supported; videos can even be hundreds of hours long!).
While HLS/DASH are often referred to as live streaming protocols, they can also be used for regular video streams. When used with a suitable transcoder (that can split these chunks), HLS/DASH can enable Adaptive Bitrate Streaming for any VOD (Video on Demand).
Furthermore, with wide browser support and a plethora of players to choose from, live streaming has become easier than ever. HLS and MPEG-DASH offer benefits to end-users with improved streaming performance, while no ancient/unsupported “flash” (or any other plugin) player is required to view a stream. All of these technologies work in conjunction with HTTP compression and other web technologies to deliver a pleasant user experience.
This goes to streamers as well: with HLS natively supported in OBS (a very popular application used to manage and create video streams), streamers should have no trouble using the technology, and the standardized protocols can be easily processed on ingest endpoints (Twitch, YouTube, etc.) and transcoded for Adaptive Bitrate Streaming.