An update to Apple HLS best practices (end 2024)

Radiant Media Player Blog

Last updated on November 27, 2024 - Back to blog home page

HTTP Live Streaming (HLS) authoring specification for Apple devices in 2024

As you know, Apple HLS has grown from a simple HTTP adaptive bitrate streaming protocol (born in 2009) to a versatile cross-devices solution to deliver media content online with advanced features like advertisement, captioning or DRM.

Apple HLS specification is therefore updated to add new functionalities and best practices on a regular basis - Time for your HLS check-up in this end 2024!

For the full details go to HTTP Live Streaming (HLS) authoring specification for Apple devices. Below we have selected some highlights from that specification. This selection is based on our experience troubleshooting client-side HLS issues. Note that this blog article does not cover low latency live HLS streaming or FairPlay streaming. Please review the respective documentation for more information.

While the information provided by Apple is specifically for streaming to Apple devices, Radiant Media Player also works well with those highlights (most standard-compliant player on the market should also work with those highlights).

TLDR; Highlights

  • Segmentation
    • Target durations SHOULD be 6 seconds (for fMP4 HLS or MPEG TS HLS)
    • Video segments MUST start with an IDR frame (this helps prevent decoding issues)
  • Video
    • All video MUST be encoded using H.264/AVC, HEVC/H.265, Dolby Vision, or AV1
    • The container format for H.264 video MUST be fragmented MP4 (fMP4) files or MPEG transport streams
    • For H.264, you SHOULD use High Profile in preference to Main or Baseline Profile
    • The container format for HEVC video MUST be fMP4
    • High Dynamic Range (HDR) HEVC video MUST be HDR10, HLG, or Dolby Vision
    • Key frames (IDRs) SHOULD be present every two seconds
    • Video on Demand (VOD) content SHOULD use a natural frame rate for the content. Frame rates 23.976, 24, 25, 29.97, 30, 50, 59.94, and 60 fps are supported
    • Streams SHOULD use a single color space — one of either Rec. 601, Rec. 709, DCI-P3, or Rec. 2020
    • All video variants SHOULD have identical aspect ratios
    • Looking for an ABR ladder for HLS with AVC/HEVC video? Please review section 1.25
  • Audio
    • Audio data SHOULD be provided as an elementary audio stream or in fMP4
    • Stereo audio supported formats are: AAC-LC, HE-AAC v1, HE-AAC v2, xHE-AAC, Apple Lossless, FLAC
    • You SHOULD NOT use HE-AAC (v1 or v2) if your audio bit rate is above 64 kbit/s
    • Supported multichannel audio formats are: AAC-LC, HE-AAC v1, Apple Lossless, FLAC, Dolby Digital (AC-3), Dolby Digital Plus (E-AC-3), Dolby Digital Plus with Dolby Atmos
    • A single Media Segment MUST NOT contain multiple audio streams
    • Looking for an ABR ladder for HLS with audio content? Please review section 2.9
  • Accessibility
    • Captions SHOULD be provided with your streams to make content accessible to people who are deaf or hard of hearing
    • Supported caption formats are: CEA-608 closed captions, CEA-708 closed captions, WebVTT subtitles, IMSC1 subtitles (text profile only)
    • Note that subtitles are different from closed captions in nature as closed captions carry an accessibility notion that may not be present with subtitles
  • Subtitles
    • Subtitles MUST be WebVTT or IMSC1 in fMP4
  • Media Playlists (where the chunks are listed)
    • The EXT-X-PROGRAM-DATE-TIME tag MUST be present in every live (linear) Media Playlist
    • You MUST provide at least six segments in a live (linear) playlist
    • Metadata SHOULD be in the playlist (using EXT-X-DATERANGE) rather than in the media (using Timed Metadata)
  • Multivariant Playlist (where the variant lists are listed)
    • Your EXT-X-STREAM-INF tag MUST always provide the CODECS, RESOLUTION, FRAME-RATE attributes for video content
    • You SHOULD deliver video and audio as separate streams
    • You MUST provide multiple bit rates of video (that is, variants)
  • Delivery
    • The server MUST deliver playlists using gzip content-encoding
    • You SHOULD support stream failover, for example by listing duplicate streams in the Multivariant Playlist
  • Privacy
    • In a future release, Apple may require delivery over TLS (always use HTTPS when delivering content to the web, regardless of content)
  • iOS
    • Multivariant Playlists that are delivered over cellular networks MUST contain a variant whose peak BANDWIDTH is less than or equal to 192 kbit/s
  • AirPlay
    • All video variants and renditions MUST have segment boundaries at the same points in time

Happy and successful HLS streaming!

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License.

©2015-2024 Radiant Media Player. All Rights Reserved.