AWS for M&E Blog
Monitoring QoS of virtual linear OTT channels with dynamic ad insertion
Overview
This is part two of a blog series about virtual linear channel creation and management. The first blog post in the series discussed how to create virtual linear OTT channels that can sequentially deliver both video on demand (VOD) and live streaming video by defining a channel schedule in AWS Elemental MediaTailor using Channel Assembly. This blog post describes the set up of dynamic ad insertion using an ad decision server (ADS) and AWS Elemental MediaTailor.
Customers who want to spin up free ad-supported TV (FAST) channels on Amazon Web Services (AWS) can personalize ads based on the query string parameters received from the client session and the configured parameter groups. They can also visualize Channel Assembly logs, VAST logs from an ADS, and ad transcoding logs, and perform ad tracking using either server-side or client-side ad reporting . This is a comprehensive solution for serving FAST channels as well as visualizing Quality of Service (QoS) with dynamic ads.
Components
Following are the main components of the set up:
- A linear OTT channel created using MediaTailor Channel Assembly where we declare the source of the content and the upcoming program schedule for prediction of the sequence of the live and VOD content, as well as ad breaks.
- A MediaTailor configuration that acts as a manifest manipulator to replace the ad markers with dynamic ad segments.
- An Ad decision service that responds to the MediaTailor service over VAST(video ad serving template) protocol with the decision of relevant ad to insert as well as provides the URI of the ad assets.
- Amazon CloudWatch dashboard to visualize the QoS of the live stream along with the relevant server-side ad insertion (SSAI) metrics.
Architecture
Figure 1: Dynamic SSAI and QoS monitoring with MediaTailor Channel Assembly
Description
Create a MediaTailor configuration
In order to create a MediaTailor configuration for dynamic ad insertion, we configure the playback URL of our MediaTailor Channel Assembly output as the video content source (origin). You can use your own choice of ad decision server that provides dynamic VAST responses. In this case, we use one of the published VAST tags from DFP like the single inline linear tag.
Figure 2: MediaTailor Configuration Creation with a Dynamic ADS
We use Amazon CloudFront as the CDN for scalable and resilient content distribution. In order to do that, we create a new distribution from the AWS Console and configure it with the MediaTailor ad configuration (i.e. content segment domain as well as ad segment domain) as two separate origins from the Origin Settings. For optimal caching, we associate separate behaviors for each origin using the Cache Behavior Settings.
Assign a path pattern of /v1/* to the content segment origin and set the cache policy to “Caching Disabled” and create an Origin Request Policy to be assigned as follows:
Figure 3: MediaTailor content segment Origin Request Policy
Assign the default (*) path pattern to the ad segment origin and choose “Caching Optimized” from the cache policy dropdown. Do not choose any Origin Request Policy for this behavior.
For both the behaviors, the Response Header Policy should be set as follows:
Figure 4: MediaTailor Origin Response Header Policy
Confirm playback of dynamic server-side ads for your linear channel
The new playback URL can be derived as follows:
Locate the HLS playback prefix of your MediaTailor configuration from the “Content & Origin Details” section and replace the MediaTailor domain name with your CloudFront distribution domain name. Append “index.m3u8” as the suffix.
https://dxyz123abc.cloudfront.net/v1/master/<configuration_UUID>/<configuration_name>/index.m3u8
To test playback of the virtual linear OTT channel, go to https://www.hlsplayer.net/, introduce the URL copied in the previous step, and press “Play”.
Figure 5: Origin segment playback on a HLS player
Figure 6: Ad segment playback on a HLS player
Monitor metrics and set up ad reporting
Key to a successful observability ecosystem when delivering a FAST channel with dynamic ads is to choose the right performance metrics. Some of these include:
- Ad decision server (ADS) response time (
AdDecisionServer.Latency
): This metric measures the time it takes for MediaTailor to receive a response from the ADS. A high ADS response time can indicate that there is a problem with the ADS or with the network connection between MediaTailor and the ADS andcan cause delays in the ad delivery process, which can lead to poor viewer experience. - Ad insertion latency (
GetManifest.Latency
): This metric measures the time it takes for MediaTailor to insert an ad into the video stream. A high ad insertion latency can indicate that there is a problem with the MediaTailor service or with the network connection between MediaTailor and the viewer andcan cause ads to appear out of sync with the video, which can be jarring for viewers. - Ad fill rate (
Avail.FillRate
): This metric measures the percentage of ad avails that were filled with ads. A low ad fill rate can indicate that there are not enough ads available for the number of ad avails. This metric is crucial because it affects the revenue generated from ad impressions. - Available ad duration (
Avail.Duration
):This MediaTailor metric is the total amount of time that an ad avail (SCTE-35 cue-out marker) was available for insertion. This information can be used to optimize ad inventory and to ensure that ads are being inserted in a timely manner. The avail duration metric is also important because it can be used to calculate the ad fill rate. - Ad completion rate (
Avail.Impression
): This metric measures the percentage of ads that were played to one quartile, two quartiles, three quartiles, or completion. A low ad completion rate can indicate that viewers are not interested in the ads or that the ads are not being delivered in a timely manner. - Ad click-through rate: This metric measures the percentage of ads that were clicked on. A low ad click-through rate can indicate that the ads are not relevant to viewers or that ads are not being displayed in a prominent location. This metric can be tracked with a third party ad-tracking tool and is not currently reported back to the MediaTailor service.
For the most accurate decision making, whether in tactical control room operations or strategic investments in procuring the right ad assets for your audience, it is extremely crucial to track and visualize:
1. The total number of requests made by the players to receive updated manifests.
2. The latency between MediaTailor and ADS as well as the latency to generate updated manifests.
3. The duration of the available ad opportunity indicated in the SCTE-35 markers, as well as the actual duration of the dynamic ads received from the ADS.
4. The fill rate of the delivered ads of both ads filled by ADS and ads of filled by MediaTailor
5. The timeout and errors that indicate the uptime and availability of both the origin server and the ADS.
By tracking these metrics, you can identify and address any problems that may affect the delivery of your ads. This helps make sure that your ads are delivered in a timely and effective manner, which can lead to improved viewer experience, increased revenue, and a more successful ad delivery system.
Visualize QoS and ad reporting errors
The following image represents how to visualize QoS and ad reporting using CloudWatch. This CloudWatch dashboard provides real-time monitoring for crucial performance indicators like AdDecisionServerTimeouts, AdDecisionServerLatency, AvailDuration, AvailFillRate, AdsBilled, AvailImpression and other relevant origin metrics like RequestCount, TotalTime for each request and 4xx/5xx errors.
Figure 7: Cloudwatch dashboard for monitoring QoS of the Linear Channel with Dynamic Ad Insertion
Conclusion
In this blog post, we created a MediaTailor configuration that takes a Channel Assembly output (i.e. a virtual linear channel feed as the content source) and replaces ad opportunity markers with dynamic server side ads. We identified the key performance metrics that determine the QoS for end viewers and consolidated them for visualization using a CloudWatch dashboard. We also walked through the steps to set up ad reporting for a linear channel and derived meaningful insights from reporting logs. Finally, we verified the successful playback of the channel in a web-based test HLS video player. Customers can now stitch more personalized and dynamic server side ads into their virtual linear OTT channel as well as perform QoS monitoring of their channels using a CloudWatch dashboard that visualizes the key performance metrics collected from end viewer requests.