AWS for M&E Blog
Support for HLS Interstitials in AWS Elemental MediaTailor
Amazon Web Services (AWS) is pleased to announce support for HLS Interstitials for video-on-demand (VOD) workflows in AWS Elemental MediaTailor. The implementation of support for interstitials introduces server-guided ad insertion (SGAI) in MediaTailor, which complements existing server-side ad insertion (SSAI) support. HLS Interstitials offer a versatile and efficient solution for managing and integrating advertising content within HLS streams. By adopting SGAI, customers can benefit from improved video start times (VST), optimized ad render rates, seamless ad insertion, and reduced manifest delivery latencies. To understand more about the benefits of HLS Interstitials and SGAI, read this AWS for M&E blog post detailing how you can increase monetization while lowering total cost of ownership (TCO) with server-guided ad insertion.
Understanding HLS Interstitials
In 2021, Apple introduced HLS (HTTP Live Streaming) Interstitials, aimed at streamlining the management of advertisements and other ancillary content within HLS streams. HLS Interstitials offer a straightforward method to schedule ads seamlessly into content streams. Interstitials themselves are self-contained media assets, which eliminates the need for complex manipulation of manifests and simplifies the ad scheduling process by referencing the respective ad playlist from the primary content. HLS Interstitials empower content providers to reduce VST, optimize ad inventory, and enhance ad delivery during playback by employing late binding and using a distinct player instance for interstitials play out.
The following figures visualize the differences between SSAI stitched ads vs SGAI interstitials.
HLS Interstitials in AWS MediaTailor
The following figure shows the process when VOD HLS Interstitials are used in MediaTailor. It’s important to note that there is no interaction with the ad decision server (ADS) until the client encounters an HLS Interstitial EXT-X-DATERANGE
tag and requests the ASSET-LIST
URI from MediaTailor. This facilitates some of the benefits that are outlined in the next section.
Why AWS MediaTailor for HLS Interstitials
- Seamless Viewing Experience – AWS Elemental MediaTailor offers the capability to dynamically condition ad assets to match the ABR ladder of content streams. This allows content providers to enhance the viewing experience by providing a seamless transition between ads and content streams.
- Improved Cacheability of Variant Manifests – AWS Elemental MediaTailor employs the
#EXT-X-DEFINE
tag, which allows for variable substitutions, resulting in a common manifest that is highly cacheable and can be used to serve multiple MediaTailor sessions. - Reduce Video Start Time for VOD Sessions – Significantly shorten the time-to-first-frame (TTFF) for viewers. MediaTailor will only make requests to the ADS for ads when the client play head nears the
EXT-X-DATERANGE
tag and requests theASSET-LIST
from MediaTailor. In turn, this can facilitate reduced load on the ADS and improved render rates if viewers drop from the stream prior to the end of the play-out. - Flexibility and Session State – Currently, device support for HLS Interstitials is not widespread and some devices may never be fully compatible, so MediaTailor supports a hybrid ad insertion mode that allows customers to designate SSAI or SGAI, on a per session basis.
- Observability – AWS MediaTailor integrates with AWS CloudWatch by offering a suite of CloudWatch Metrics and CloudWatch logs, enabling effective monitoring of MediaTailor resources.
- Scalability and Reliability – AWS Elemental MediaTailor has been proven to support millions of concurrent viewer sessions, providing a robust and reliable service to support ad insertion for high viewership events.
- Flexible ADS Transactions – AWS Elemental MediaTailor will perform scheduling of interstitials based on supported SCTE markers, as well as parsing of SCTE35 parameters to provide signaling for the ADS.
Get started with HLS Interstitials in MediaTailor
AWS Elemental MediaTailor playback configurations must be configured to allow SGAI sessions before players can initialize HLS Interstitials-enabled sessions. Prior to enabling SGAI on your MediaTailor playback configurations, make sure that your clients support the playback of HLS Interstitials. The following methods demonstrate how to enable SGAI-mode on a MediaTailor playback configuration.
API
Use the new field "InsertionMode": "PLAYER_SELECT"
in the PutPlaybackConfiguration API to enable the ability for players to initialize MediaTailor sessions with either GUIDED
(SGAI – HLS Interstitials) or STITCHED
(SSAI) mode. The default for InsertionMode
is STITCHED_ONLY
, which does not allow players to initialize MediaTailor sessions with HLS Interstitials. To understand more about the PutPlaybackConfiguration request syntax, see the public docs here.
Console
Customers may also use the AWS Console to enable HLS Interstitials on a MediaTailor playback configuration. A new field called “Ad Insertion Mode” now exists with the following values:
- “Stitched only” – This is the default selection. This value only enables SSAI mode on the playback configuration.
- “Player select” – Select this option to allow HLS Interstitials sessions on the playback configuration.
Session state
Once a MediaTailor playback configuration is enabled with SGAI, the HLS Interstitials feature can be enabled during session initialization on a per-session basis. The process to enable the feature differs from creating sessions using the HLS/DASH playback prefix (implicit session initialization), versus the session initialization prefix (explicit session initialization).
How to enable HLS Interstitials for the session using HLS playback prefixes
From the player, initialize a new MediaTailor playback session using the following query string:
On the player, construct a JSON message body for the session initialization request to MediaTailor:
- Inside an adsParams object, provide any parameters that MediaTailor should pass to the ADS. These parameters correspond to [player_params.param] settings in the ADS template URL of the MediaTailor configuration.
- To enable HLS Interstitials, add the insertionMode key at the top level of the session initialization body and set the value to GUIDED, as seen in the following example. The default InsertionMode value is STITCHED.
- To understand more about client-side session initialization, see the public docs here.
Multi-variant manifest
For SGAI-enabled sessions, MediaTailor includes the unique, encoded player session data as a #EXT-X-DEFINE:
value in the multi-variant manifest, which will dynamically replace the #EXT-X-DEFINE:IMPORT
variable in the variant playlists, when requesting the ASSET-LIST
s.
Example origin multi-variant manifest
Example personalized multi-variant manifest:
Variant manifest
For SGAI-enabled sessions, there are no changes required to how ad breaks are signaled in the template manifest. MediaTailor will insert EXT-X-DATERANGE
tags at the ad break markers. For VOD workflows, MediaTailor also includes a PROGRAM-DATE-TIME
(PDT) tag on the first media sequence segment in the manifest. The interstitials have EXT-X-DATERANGE START-DATE
values relative to this PDT, based on the ad break position in the timeline.
Example origin variant manifest using CUE-OUT in a VOD workflow:
Example MediaTailor output variant manifest using CUE-OUT in a VOD workflow:
To maximize the efficiency of using HLS Interstitials, MediaTailor combines the use of interstitials signaling with the #EXT-X-DEFINE
tag, a feature introduced by Apple HLS to support variable substitution. This gives MediaTailor the ability to deliver the same child playlist to all sessions that are HLS Interstitials-enabled. The EXT-X-DEFINE
variable in the multi-variant playlists directs each MediaTailor session client to fetch personalized ad asset lists. Using this variable, MediaTailor is capable of generating common variant manifests and manifest URIs across various MediaTailor sessions. As a result, these variant manifests are highly cacheable and smaller in size, when compared to fully stitched manifests, which allows for lower manifest request latency when delivered by a content delivery network (CDN). Beyond that, MediaTailor makes use of the X-RESUME-OFFSET
tag, which players can leverage to ensure frame-accurate transitions between ads and content.
ASSET-LIST
The ASSET-LIST
attribute carries the URI to a JSON file that contains a list of ad asset URIs and their duration for a particular ad break. The ASSET-LIST
response contains client tracking information, including beacon URIs and beacon timing for each ad. Upon the ASSET-LIST
request from the client, MediaTailor will request ads from the ad decision server to fill the break and personalize the ASSET-LIST
response. If the ad decision server responds with a VAST XML, MediaTailor will fill that particular break with all of the ads in the VAST response. If the ADS responds with a VMAP XML containing ads for all of the breaks in the template manifest, MediaTailor will pre-schedule all of the ads for each break specified in the VMAP response.
Example ASSET-LIST call to MediaTailor
The following example is a template of how the asset-list URI is constructed:
The availData parameter includes information about the particular ad break based on timing and SCTE-35 data in the origin manifest. It is unique to a particular break but shared among all player sessions. The sessionData parameter includes information about the individual player sessions. The sessionData query parameter should be dynamically replaced with the sessionData value that exists in the session’s multi-variant playlist. For example:
Example ASSET-LIST JSON response
Conclusion
The support for HLS Interstitials in AWS Elemental MediaTailor is a response to the evolving needs of the streaming media industry, providing you with more tools to enhance content delivery and monetization strategies. Customers can leverage the AWS Elemental MediaTailor support for HLS Interstitials to provide an improved viewer experience. Video players can take advantage of HLS Interstitials to provide seamless ad transitions with frame accuracy, lower video startup times, and improved render rates. With identical manifests for all end-user sessions, CDN providers have the ability to cache and deliver manifests at the edge to achieve lower latencies. ADS requests also benefit from lower latencies, as players only request ads when reaching an HLS Interstitials tag.
Now available
HLS Interstitials for VOD workflows is supported in all the regions where AWS Elemental MediaTailor is available. Check the full region list for future updates. With pay-as-you-go pricing, you only pay for the number of interstitials scheduled by MediaTailor. To learn more, see the MediaTailor pricing page in the AWS documentation.