AWS for M&E Blog

[Updated 3/15/2021] ZEE5 inserts millions of ads in live and VOD content using AWS

This post is co-authored by Girish Nair, SA, Media & Entertainment at Amazon Web Services and Vivek Yadav – Senior CDN Engineer at ZEE5

ZEE Entertainment is among the largest producers and aggregators of Hindi programming in the world, with an extensive library housing over 260k+ hours of television content with more than a billion users across 173 countries. ZEE Entertainment operates 41 domestic channels and 38 international channels. Within three years of its launch, ZEE Entertainment’s ZEE5, has become one of the biggest OTT platforms in India with approximately 65.9 million monthly active users, 5.4 million daily active users, and more than 500 million video views per month.

The challenge

ZEE5 is a hybrid AVOD and SVOD platform that sought a solution to quickly launch server-side ad insertion (SSAI) without the heavy lifting of scaling infrastructure to meet the demand of millions of users. The company needed to capture and report ad metrics, employ user level customization, implement new technology with its existing live linear and VOD workflows, and integrate with multiple CDNs and third-party services.

Why AWS Elemental MediaTailor?

AWS Elemental MediaTailor lets ZEE5 insert individually targeted advertising into its video streams without sacrificing broadcast-level quality-of-service. Using the MediaTailor service, ZEE5 can deliver live and on-demand content with video streams that combine content with ads personalized to viewers.

ZEE5 leverages AWS Media Services for multiple workloads. It uses AWS Elemental MediaLive to encode and deliver 80+ live channels to viewers, AWS Elemental MediaConvert to transcode hundreds of hours of video on demand, and AWS Elemental MediaPackage to perform just-in-time packaging of 20+ channels with AWS Elemental MediaTailor performing ad insertion.

ZEE5 realizes the following benefits from with its implementation of AWS Elemental MediaTailor:

  • Scale: ZEE5 can easily scale and monetize unexpected high-demand viewing events with no up-front costs using MediaTailor.
  • Choice and ease-of-reporting: MediaTailor delivers automated reporting based on both client and server-side ad delivery metrics, making it easy to accurately measure ad impressions and viewer behavior.
  • Flexible integration: ZEE5 integrated MediaTailor with the Amazon CloudFront content delivery network (CDN) as well as with Akamai, DFP ad decision server (ADS) for programmatic advertising, client devices like JIO phones that run on KaiOS, and third-party analysis platforms like MOAT.

Monetize VOD and live content

ZEE5 receives live channel input from its on-premises infrastructure as well as from third parties. For live channels, MediaTailor requires SCTE-35 markers to be embedded into video streams in order to insert ads.

On-premises, SCTE insertion is performed by AWS Elemental encoders. These appliances can process ad markers in two ways: A user can either define their own set of PID’s or allow the encoder to detect this information. For ZEE5, setting up custom PID’s did not initially work, leading to a change in configuration of the “detect input” option. Defining this option allows the encoder to detect an input stream and pass on whatever PID’s are detected without any manipulation. After this change, the markers processed correctly in the ZEE5 workflow.

For third-party content with SCTE-35 markers embedded in the video streams, passthrough of SCTE markers was enabled on MediaLive as well as MediaPackage. For more information about SCTE-35 markers in MediaLive, read the documentation.

For third-party content with no SCTE-35 markers embedded in the video streams, an API is available to insert markers. This API acts as proxy hosted on Amazon API Gateway, which forwards authenticated requests from third parties to insert SCTE markers on their channel.

ZEE5 VOD content did not have embedded SCTE-35 markers, making this workflow a bit different from the live workflow. For VOD content, MediaTailor makes a request to the ad decision server (ADS) and based on the response from the ADS, MediaTailor creates ad breaks. More detail is available is in the documentation.

Handling server-side ad insertion at scale

SSAI at scale without any complex configuration or code is a major benefit of MediaTailor. The initial plan for ZEE5 was to go live with six channels. Traffic on these channels was monitored to understand the scale and it was observed that at peak, ZEE5 viewers make requests for 7,000 updated manifests per second. This meant that MediaTailor would be required to stitch ads at a rate of 7,000 TPS. Although MediaTailor is capable of auto-scaling to cater to demand, default processing settings for MediaTailor are set to a maximum of 3,000 concurrent transactions per second across all request types. This is an account-level quota imposed to save an account from unintended traffic. With substantially higher transactions per second anticipated, the team increased this quota to support ZEE5 peak traffic.

Zee5 Workflow

ZEE5 high level architecture for video processing and ad insertion

Integrating with KaiOS, MOAT Analysis and DFP for Inserting programmatic Ads.

SSAI on KaiOS was the key requirement from ZEE as 30-40% of their user base uses feature phone with KaiOS. Due to the limited compute resource available & limitation of SSR for the platform, it becomes a challenging task. We have used client-side reporting with the player initially requesting for the modified master manifest as well as ad tracking URL from the MT. In turn MT provides the content URL & player keeps on hitting the tracking URL on each Ad quadrant. The tracking URL basically an endpoint to inform the DFP about the Ad playability to the subscriber.

ZEE5 uses DoubleClick for Publishers (DFP) as its ADS. One of the key requirements for ZEE5 was to deliver programmatic ads to end users. A standard test of video ad serving template (VAST) tags functionality would normally run in a browser and VAST inspector implemented with MediaTailor. When ZEE5 started its proof-of-concept, the VAST tag for programmatic ads was working with the DFP VAST Inspector but was unable to produce results on browser. The AWS support and service team inspected the issue and found the VAST inspector was adding additional query parameters to its request. The team added missing parameters and built new tags for MediaTailor. With new tags, ZEE5 was able to achieve programmatic ad insertion on MediaTailor with DFP.

In server-side reporting for live channels, DFP requires a channel identifier to report impressions per channel. MediaTailor accepts custom parameters that could be passed to an ADS; however, adding this parameter would require a change to the player, which would take months to push to every user because of the large user base and slow rate of app updates. So, we implemented Lambda@Edge to identify the channel based on the requested URL and introduced the same as a parameter to DFP.

ZEE5 is now is performing server-side ad insertion on more than 18 Live channels using MediaTailor. The company delivers  more than a hundred million ads every month on these channels. We at ZEE5 are busy expanding our content monetization for connected TVs and other platforms.

To learn more about server-side ad insertion, read our overview of SSAI here.

Vivek Yadav – Senior CDN Engineer at ZEE5