In 2021, a groundbreaking addition to HLS (HTTP Live Streaming) technology was introduced: HLS Interstitials. HLS Interstitials revolutionized the way we schedule advertisements and interstitial content within HLS streams, offering greater flexibility and control. As technology continues to evolve, so does the landscape of online video content delivery. In this article, we'll delve into what HLS Interstitials are, how they have evolved, and explore the latest features that provide even more control over your content delivery.
What are HLS Interstitials?
HLS Interstitials allow content providers to seamlessly schedule interstitials, including ads, by incorporating metadata tags known as EXT-X-DATERANGE tags into the Media Playlists of the primary asset. These interstitials can be scheduled dynamically during playback, making it possible to adapt and optimize the viewer experience in real-time.
Key Features of HLS Interstitials
- Self-Contained Media Assets: Interstitials are self-contained media assets that can be scheduled at any point on the timeline of a primary media asset. They can be scheduled against both Video on Demand (VOD) and live primary content, including Low-Latency HLS streams.
- URL Specification: Interstitials are specified by URLs. When scheduled, the player loads the resource specified by the URL after buffering the primary asset to the scheduled interstitial playback time. This flexibility allows for late binding to ad inventory.
- Multiple Interstitials: Interstitial requests can involve either a single interstitial asset or a list of assets. In the latter case, the server can determine the composition of the list when responding to the interstitial request.
- Codec and Language Independence: Interstitials do not need to match the codec or language structure of the primary content, although matching is recommended. Using different codecs may cause transition delays on certain devices.
- Navigation Restriction: It's possible to restrict user navigation during interstitial playback, ensuring a seamless viewer experience.
- Compatibility: Devices that do not support HLS Interstitials will gracefully ignore server-generated interstitial events when playing a primary asset. Content providers can choose backward-compatible static interstitial insertion techniques if necessary.
- Metadata Tags: The server can insert EXT-X-DATERANGE tags to schedule interstitial playback. The "com.apple.hls.interstitial" CLASS within these tags specifies how interstitials are to be scheduled.
Attributes of Interstitial EXT-X-DATERANGE Tags
- CLASS: The CLASS attribute is required and must be set to "com.apple.hls.interstitial"
- X-ASSET-URI: Specifies a quoted-string absolute URL for a single interstitial asset.
- X-ASSET-LIST: Specifies a quoted-string URL to a JSON object containing a list of interstitial assets with their URIs and durations.
- X-RESUME-OFFSET: Specifies a time offset, in seconds, for when primary playback should resume after interstitial playback.
- X-SNAP: Enumerated values (OUT and IN) to control segment transitions during interstitial playback.
- X-PLAYOUT-LIMIT: Sets a limit on the playout time of the entire interstitial.
- X-RESTRICT: Enumerated values (SKIP and JUMP) for user navigation restrictions during interstitial playback.
- Vendor-defined Attributes: Content vendors can define additional attributes for customization.
Rules and Usage
Clients can override restrictions specified by EXT-X-DATERANGE RESTRICT attributes if consistent with the presentation rules for an asset.
Multiple interstitials scheduled at the same START-DATE are played in the order of their EXT-X-DATERANGE tags. X-RESUME-OFFSET values are cumulative in this case.
What's New in HLS Interstitials?
HLS Interstitials have evolved to offer more control and optimization options:
- Ad Cueing Options: New cueing options (PRE, POST, and ONCE) allow you to specify where interstitials appear relative to the primary content, offering greater flexibility in ad placement.
- SNAP Attributes: SNAP attributes (OUT and IN) help address clock drift issues in live scenarios, ensuring precise interstitial transitions and resumptions.
How to test HLS Interstitials?
Here is a sample stream provided by iReplay.TV. As of 2023, very few players support HLS Interstitials. For now, it’s recommended to use it only in AVPlayer-based apps.
https://ireplay.tv/carsandroads/brands.m3u8 (
Copy URL) fmp4 HLS interstitials test stream
Conclusion
HLS Interstitials have come a long way since their introduction in 2021. They provide content providers and streaming platforms with powerful tools to schedule interstitials, ads, and other content dynamically. With new features like ad cueing options and query parameters, you have more control and optimization capabilities than ever before. As technology continues to evolve, HLS Interstitials remain at the forefront of enhancing the viewer experience in online video content delivery.