HLS - HTTP Live Streaming ========================== .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What is HLS?** HLS, or HTTP Live Streaming, is a media streaming protocol developed by Apple. It delivers audio and video content over the internet using standard HTTP. HLS works by breaking the stream into small chunks (segments) and delivering them sequentially to the client. It supports adaptive bitrate streaming, allowing playback to adjust based on network conditions. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Why is HLS Useful?** * Adapts video quality dynamically to match network speed. * Reduces buffering and improves playback reliability. * Works over standard HTTP/CDN infrastructure. * Compatible with Apple devices and widely supported across platforms. * Supports encryption and DRM for secure content delivery. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **How it works?** * Video is segmented – Content is encoded at multiple bitrates and split into small .ts or .fmp4 segments. * Client requests a playlist – The m3u8 playlist file lists available segments and quality levels. * Client downloads segments – Based on current bandwidth, the client fetches the best-quality segment. * Playback adapts – The client monitors network conditions and adjusts quality levels as needed. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Where is HLS used?** * Streaming platforms – Apple TV+, Hulu, and others. * Live broadcasts – Sports, concerts, and news events. * Mobile apps – Especially on iOS and macOS devices. * Education and training – For scalable video communications. * Enterprise solutions – Secure internal video communications. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which OSI layer does this protocol belong to?** * Uses HTTP for communication, which is an application-layer protocol. * Implements adaptive logic for streaming based on client-side decisions. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Topics in this section, * :ref:`Learnings in this section ` * :ref:`Terminology ` * :ref:`Version Info ` * :ref:`HLS Version&RFC Details ` * :ref:`HLS Basic Setup on Ubuntu using IPv4 ` * :ref:`HLS Basic Setup on Ubuntu using IPv6 ` * :ref:`HLS Protocol Packet Details ` * :ref:`HLS Usecases ` * :ref:`HLS Basic Features ` * :ref:`HLS Feature : Adaptive Bitrate Streaming ` * :ref:`HLS Feature : Segmented Media Delivery ` * :ref:`HLS Feature : Playlist Files(M3U8) ` * :ref:`HLS Feature : HTTP-Based Delivery ` * :ref:`HLS Feature : Cross Platform Support ` * :ref:`HLS Feature : Encryption Support ` * :ref:`HLS Feature : Live On-Demand Support ` * :ref:`HLS Feature : Trick Play Support ` * :ref:`HLS Feature : Closed Captions&Subtitles ` * :ref:`HLS Feature : Ad Insertion ` * :ref:`HLS Feature : Ad Low Latency Mode ` * :ref:`HLS Feature : Content Steering ` * :ref:`Reference links ` .. _HLS_step1: .. tab-set:: .. tab-item:: Learnings in this section * In this section, you are going to learn .. _HLS_step2: .. tab-set:: .. tab-item:: Terminology * Terminology .. _HLS_step3: .. tab-set:: .. tab-item:: Version Info * Version Info .. _HLS_step5: .. tab-set:: .. tab-item:: HLS Version&RFC Details .. csv-table:: :file: ./HLS/HLS_RFC_Details.csv :widths: 10,10,10,30,40 :header-rows: 1 .. _HLS_step21: .. tab-set:: .. tab-item:: HLS Basic Setup on Ubuntu using IPv4 * Setup .. _HLS_step22: .. tab-set:: .. tab-item:: HLS Basic Setup on Ubuntu using IPv6 * Setup .. _HLS_step6: .. tab-set:: .. tab-item:: HLS Protocol Packet Details **HLS Playlist Request Packet** .. csv-table:: :file: ./HLS/HLS_Protocol_Packet_1.csv :widths: 10,20,30,10 :header-rows: 1 **HLS Playlist Response Packet** .. csv-table:: :file: ./HLS/HLS_Protocol_Packet_2.csv :widths: 10,20,30,10 :header-rows: 1 **HLS Media segment Request Packet** .. csv-table:: :file: ./HLS/HLS_Protocol_Packet_3.csv :widths: 10,20,30,10 :header-rows: 1 **HLS Media segment Response Packet** .. csv-table:: :file: ./HLS/HLS_Protocol_Packet_4.csv :widths: 10,20,30,10 :header-rows: 1 **HLS Key Request Packet** .. csv-table:: :file: ./HLS/HLS_Protocol_Packet_5.csv :widths: 10,20,30,10 :header-rows: 1 **HLS Key Response Packet** .. csv-table:: :file: ./HLS/HLS_Protocol_Packet_6.csv :widths: 10,20,30,10 :header-rows: 1 **HLS Playlist Reload Request Packet** .. csv-table:: :file: ./HLS/HLS_Protocol_Packet_7.csv :widths: 10,20,30,10 :header-rows: 1 **HLS Playlist Reload Response Packet** .. csv-table:: :file: ./HLS/HLS_Protocol_Packet_8.csv :widths: 10,20,30,10 :header-rows: 1 .. _HLS_step7: .. tab-set:: .. tab-item:: HLS Usecases .. csv-table:: :file: ./HLS/HLS_Usecases.csv :widths: 10,20,30 :header-rows: 1 .. _HLS_step8: .. tab-set:: .. tab-item:: HLS Basic Features .. csv-table:: :file: ./HLS/HLS_Features.csv :widths: 10,10,30 :header-rows: 1 .. _HLS_step9: .. tab-set:: .. tab-item:: HLS Feature : Adaptive Bitrate Streaming **Adaptive Bitrate Streaming - Testcases** .. csv-table:: :file: ./HLS/HLS_Feature-1_Adaptive_Bitrate_Streaming_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _HLS_step10: .. tab-set:: .. tab-item:: HLS Feature : Segmented Media Delivery **Segmented Media Delivery - Testcases** .. csv-table:: :file: ./HLS/HLS_Feature-2_Segmented_Media_Delivery_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _HLS_step11: .. tab-set:: .. tab-item:: HLS Feature : Playlist Files(M3U8) **Playlist Files(M3U8) - Testcases** .. csv-table:: :file: ./HLS/HLS_Feature-3_Playlist_Files_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _HLS_step12: .. tab-set:: .. tab-item:: HLS Feature : HTTP-Based Delivery **HTTP-Based Delivery - Testcases** .. csv-table:: :file: ./HLS/HLS_Feature-4_HTTP-Based_Delivery_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _HLS_step13: .. tab-set:: .. tab-item:: HLS Feature : Cross Platform Support **Cross Platform Support - Testcases** .. csv-table:: :file: ./HLS/HLS_Feature-5_Cross_Platform_Support_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _HLS_step14: .. tab-set:: .. tab-item:: HLS Feature : Encryption Support **Encryption Support - Testcases** .. csv-table:: :file: ./HLS/HLS_Feature-6_Encryption_Support_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _HLS_step15: .. tab-set:: .. tab-item:: HLS Feature : Live and On-Demand Support **Live and On-Demand Support - Testcases** .. csv-table:: :file: ./HLS/HLS_Feature-7_Live_and_On-Demand_Support_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _HLS_step16: .. tab-set:: .. tab-item:: HLS Feature : Trick Play Support **Trick Play Support - Testcases** .. csv-table:: :file: ./HLS/HLS_Feature-8_Trick_Play_Support_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _HLS_step17: .. tab-set:: .. tab-item:: HLS Feature : Closed Captions and Subtitles **Closed Captions and Subtitles - Testcases** .. csv-table:: :file: ./HLS/HLS_Feature-9_Closed_Captions&Subtitles_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _HLS_step18: .. tab-set:: .. tab-item:: HLS Feature : Ad Insertion **Ad Insertion - Testcases** .. csv-table:: :file: ./HLS/HLS_Feature-10_Ad_Insertion_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _HLS_step19: .. tab-set:: .. tab-item:: HLS Feature : Low Latency Mode **Low Latency Mode - Testcases** .. csv-table:: :file: ./HLS/HLS_Feature-11_Low-Latency_Mode_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _HLS_step20: .. tab-set:: .. tab-item:: HLS Feature : Content_Steering **Content Steering - Testcases** .. csv-table:: :file: ./HLS/HLS_Feature-12_Content_Steering_Testcase.csv :widths: 10,10,30,20 :header-rows: 1 .. _HLS_step23: .. tab-set:: .. tab-item:: Reference links * Reference links