Limited Time Free!  Sign up for 1TB of data transfer and get free trials of WAF and Bot Management!
Get Started Now 
learning center banner

HLS vs MPEG-DASH: Which Streaming Solution Wins?

Learn about the importance of streaming protocols and their applications in video streaming. Explore the definition and background of HLS (HTTP Live Streaming) and MPEG-DASH (Dynamic Adaptive Streaming over HTTP). Discover how they work, including content slicing, playlist files, and adaptive bitrate. Compare their standards, file formats, encoding support, scalability, platform compatibility, and reliability. Understand their playback support across devices and platforms.

hls vs mpeg-dash

Introduction

With the popularization of the Internet and the improvement of bandwidth, video streaming has become an indispensable part of our daily life. From online video platforms to live broadcasts, streaming media transmission protocols play a crucial role in this digital age. These protocols not only transfer audio and video content to user devices, but also provide users with a better viewing experience and interactivity.

The importance of streaming media transfer protocols is that they enable large amounts of audio and video data to be streamed over the Internet to the user's device without requiring the user to wait for the entire file to download. This real-time transmission allows users to watch video content in real time without waiting for long buffering. In addition, the streaming media transfer protocol also supports adaptive bitrate, which dynamically adjusts the quality of the video according to the user's network conditions and device capabilities to ensure a smooth playback experience.

In video streaming transmission, streaming media transmission protocol is widely used in various scenarios. Online video platforms such as YouTube, Netflix, and Twitch use these protocols to deliver high-quality video content, allowing users to watch their favorite shows anytime, anywhere. Live streaming platforms such as Facebook Live and Bigo Live also rely on streaming protocols to deliver live video content to a global audience. In addition, the internal training and conference, online education, telemedicine and other fields are also widely used streaming media transmission protocol, to achieve remote real-time audio and video communication and transmission.

What is HLS?

HLS (HTTP Live Streaming) is a streaming media transfer protocol developed and popularized by Apple. It is an HTTP-based adaptive bitrate streaming media transfer protocol used to transmit audio and video content over the Internet in real time.

HLS cuts audio and video content into small media segments and uses M3U8 playlist files to describe the order and location of these segments. The client requests these media fragments through the HTTP protocol and dynamically selects the appropriate bit rate for playback based on network conditions and device capabilities. This adaptive bit rate allows HLS to provide better fluency and user experience in different network environments.

HLS is widely used in online live video and on-demand services, including video sharing platforms, Over-The-Top (OTT) services, mobile apps and social media. It supports multiple audio and video encoding formats, such as H.264 (video) and AAC (audio), and can be played on a variety of devices and platforms, including iOS devices, Android devices, and desktop browsers.

In summary, HLS is an adaptive bitrate streaming media transfer protocol implemented over the HTTP protocol for delivering audio and video content over the Internet in real time, providing better fluency and user experience.

How HLS works?

How it works can be simply described as the following steps:

  1. Content slicing: First, video content is cut into small media segments, usually 10 to 30 seconds in length. These segments can be cut at different bit rates and resolutions to suit different network conditions and device capabilities.
  2. M3U8 Playlist: Each slice is stored on the server, and their order and location are described through the M3U8 playlist file. The M3U8 file is a text file that contains information about the URL, duration, bit rate, and so on for the media segment. The client requests this M3U8 file over HTTP to get information about the media fragment.
  3. Adaptive bit rate: The client dynamically selects the appropriate bit rate for playback based on network conditions and device capabilities. It selects the best media clips based on the current bandwidth and device performance to ensure a smooth playback experience. If network conditions deteriorate, the client automatically reduces the bit rate to avoid buffering and stalling.
  4. Media fragment request: The client requests a media fragment through HTTP based on the URL information in the M3U8 file. The server responds to these requests and transmits the corresponding media snippets to the client. The client requests and plays these media segments in the order described in the M3U8 file.
  5. Playback and buffering: When the client receives a media segment, it decodes and plays it back. At the same time, it also buffers in the background, preloading some media clips that may be needed in the future to ensure a continuous playback experience.

In this way, HLS can dynamically adjust the quality of a video stream in real-time, according to a user's changing internet bandwidth and device performance. This ensures an optimal viewing experience by minimizing buffering and playback interruptions, delivering the highest possible video quality that the viewer's network can support at any given moment.

What is MPEG-DASH?

MPEG-DASH (Dynamic Adaptive Streaming over HTTP) is a streaming media transport protocol developed and standardized by the MPEG (Moving Picture Experts Group) organization. It is an HTTP-based adaptive bitrate streaming media transfer protocol used to transmit audio and video content over the Internet in real time.

Similar to HLS, MPEG-DASH also cuts audio and video content into small Media segments and uses MPD (Media Presentation Description) files to describe the order and location of these segments. The client requests these media fragments through the HTTP protocol and dynamically selects the appropriate bit rate for playback based on network conditions and device capabilities. This adaptive bit rate enables MPEG-DASH to provide better fluency and user experience in different network environments.

An important feature of MPEG-DASH is its standardization and widespread support. It is an international standard developed by the MPEG organization and supported by various streaming platforms and device vendors. It supports multiple audio and video encoding formats, such as H.264 (video) and AAC (audio), and can be played on a variety of devices and platforms, including desktop browsers, smart TVS, mobile devices, and game consoles.

The goal of MPEG-DASH is to provide a unified streaming media delivery standard that makes it easier for content providers to distribute audio and video content to different platforms and devices, while providing a better user experience and greater efficiency.

In summary, MPEG-DASH is an adaptive bitrate streaming media transport protocol implemented over the HTTP protocol for delivering audio and video content over the Internet in real time, providing better fluency and user experience. It is an international standard and has been widely supported and applied.

How MPEG-DASH works?

How it works can be simply described as the following steps:

  1. Content slicing: First, video content is cut into small media segments, usually from a few seconds to tens of seconds in length. These segments can be cut at different bit rates and resolutions to suit different network conditions and device capabilities.
  2. MPD file: Each slice is stored on the server, and their order and location are described through an MPD (Media Presentation Description) file. An MPD file is an XML file that contains information about the URL, duration, bit rate, and so on for a piece of media. The client requests this MPD file over HTTP to get information about the media fragment.
  3. Adaptive bit rate: The client dynamically selects the appropriate bit rate for playback based on network conditions and device capabilities. It selects the best media clips based on the current bandwidth and device performance to ensure a smooth playback experience. If network conditions deteriorate, the client automatically reduces the bit rate to avoid buffering and stalling.
  4. Media fragment request: The client requests a media fragment through HTTP based on the URL information in the MPD file. The server responds to these requests and transmits the corresponding media snippets to the client. The client requests and plays these media segments in the order described in the MPD file.
  5. Playback and buffering: When the client receives a media segment, it decodes and plays it back. At the same time, it also buffers in the background, preloading some media clips that may be needed in the future to ensure a continuous playback experience.

In this way, MPEG-DASH is able to provide better fluency and user experience in different network environments. Its adaptive bitrate features enable video content to be dynamically adjusted to different bandwidth and device capabilities based on network conditions. This real-time adjusting and buffering mechanism makes MPEG-DASH a reliable and efficient streaming media transmission protocol. At the same time, MPEG-DASH also supports more functions and features such as multi-language, captioning and AD insertion, making it more flexible and scalable.

The Differences between HLS and MPEG-DASH

There are several differences between HLS and MPEG-DASH:

Standards and support: HLS is a protocol developed and promoted by Apple, while MPEG-DASH is an international standard developed by the MPEG organization. HLS is widely supported on Apple devices and platforms, while MPEG-DASH has broader industry support, including streaming platforms and device vendors.

File format: HLS uses M3U8 playlist files to describe the order and location of Media segments, while MPEG-DASH uses MPD (Media Presentation Description) files. These files describe information such as the URL, duration, bit rate of the media snippet.

Encoding formats: Both HLS and MPEG-DASH support multiple audio and video encoding formats, such as H.264 (video) and AAC (audio). They can adapt to different network conditions and device capabilities, and dynamically select the appropriate bit rate for playback.

Scalability: MPEG-DASH is more scalable than HLS. It supports more functions and features such as multilingual, captioning, AD insertion, etc. MPEG-DASH also supports more encoding and container formats.

Platform support: HLS is primarily available on Apple devices and platforms, such as iOS devices and the Safari browser. MPEG-DASH is a cross-platform standard that can be played across a variety of devices and platforms, including desktop browsers, smart TVS, mobile devices, and game consoles.

In general, both HLS and MPEG-DASH are streaming media transport protocols used to transmit audio and video content over the Internet in real time. There are some differences in standards, support, file formats, encoding formats, extensibility, and platform support, and the choice of which protocol to use depends on the specific requirements and target platform.

HLS and MPEG-DASH Compatibility for Different Platforms

There are some differences in compatibility between HLS and MPEG-DASH, depending on the support of the target platform and device.

HLS is relatively good in terms of compatibility, especially for Apple devices and the Safari browser. Since HLS was originally developed by Apple, support on iOS devices and the Safari browser is extensive. Almost all iOS devices support HLS, and the Safari browser natively supports HLS playback. In addition, HLS can also be used on other platforms, such as Android devices and other major browsers, but may require the use of third-party players or plug-ins for compatibility.

MPEG-DASH is relatively generic in terms of compatibility. It is an international standard with wide support and adoption. MPEG-DASH can be used on a variety of platforms and devices, including iOS, Android, Windows, macOS and other operating systems, as well as a variety of major browsers such as Chrome, Firefox, Edge and more. This is because the implementation of MPEG-DASH is relatively flexible and can be customized and adapted to different platforms and devices.

It is important to note that while both HLS and MPEG-DASH are widely supported in terms of compatibility, specific compatibility may vary by device, operating system, and browser version. When choosing which protocol to use, it is recommended to refer to the support of the target platform and device, and conduct appropriate testing and evaluation. In addition, a combination of multiple protocols can also be considered to provide wider compatibility and a better user experience.

Conclusion

Overall, both MPEG-DASH and HLS are effective options for encoding and delivering video content. The best choice for a particular project depends on a number of factors, including the quality of the video stream, the desired user experience, and compatibility with different devices and platforms. 

If your platform requires support for different streaming protocols and rapid, secure content distribution to global audiences, we invite you to utilize Tencent EdgeOne.

Tencent EdgeOne supports a wide range of streaming protocols, including HLS, DASH, RTMP, and WebRTC, ensuring compatibility with various streaming platforms and devices. With an extensive network of edge servers strategically located around the world, Tencent EdgeOne ensures low-latency and high-speed content delivery, providing a seamless viewing experience for users regardless of their geographical location. The platform incorporates advanced security features such as DDoS protection, SSL encryption, and access control, safeguarding your content and ensuring a secure streaming environment.

We have now launched a Free Trial, welcome to Contact Us for more information.