Maximizing Video Monetization: A Guide to Personalized Ad Delivery Using AWS SSAI
In the rapidly evolving world of digital media, content providers are constantly seeking innovative ways to increase revenue and enhance viewer engagement. One of the most effective strategies is to deliver personalized ads within Video on Demand (VOD) content. By tailoring advertisements to individual viewer preferences, businesses can not only improve user experience but also significantly boost monetization.
AWS offers powerful tools to implement personalized ad delivery, particularly through Server-Side Ad Insertion (SSAI). AWS Elemental MediaConvert and AWS Elemental MediaTailor are two key services that enable dynamic ad stitching directly into VOD streams. This guide will walk you through how to maximize video monetization by leveraging these AWS services to deliver personalized ads seamlessly.
This guide will provide a complete setup for configuring VOD content with SSAI using MediaConvert and MediaTailor, streamlining the ad-stitching process on the fly.
What is Server-Side Ad Insertion?
Server-side ad Insertion (SSAI) is a technique where ads are stitched into video content on the server side before being delivered to the viewer. Unlike client-side ad insertion, where ads are inserted by the client or device, SSAI ensures that ads are seamlessly integrated into the content stream. This method allows for a smoother viewing experience, prevents ad-blocking, and can provide more targeted and personalized advertising.
![SSAI-ARC-Diag](https://www.tothenew.com/blog/wp-ttn-blog/uploads/2024/08/SSAI-ARC-Diag-1024x973.jpg)
How SSAI works
Why SSAI for VOD?
Server-Side Ad Insertion allows you to:
- Seamlessly insert ads into VOD content without disrupting the viewer experience.
- Bypass ad blockers by stitching ads directly into the content stream.
- Personalize ads based on viewer preferences, increasing ad relevance and revenue potential.
MediaService Component overview:
AWS Elemental MediaConvert
AWS Elemental MediaConvert is a file-based video transcoding service that enables you to convert video content into formats suitable for various devices and streaming platforms. It supports a wide range of input and output formats and provides advanced features such as SCTE-35 ad marker insertion, which allows you to embed ad signals into video content. This makes MediaConvert essential for preparing VOD assets and integrating ad markers for SSAI.
![MediaConvert](https://www.tothenew.com/blog/wp-ttn-blog/uploads/2024/08/MediaConvert-1024x327.png)
MediaConvert
AWS Elemental MediaTailor
AWS Elemental MediaTailor is a server-side ad insertion service that dynamically inserts ads into your video streams based on the SCTE-35 markers provided by MediaConvert. MediaTailor works with multiple ad decision servers (ADS) to deliver personalized and targeted ads to viewers. It ensures a seamless viewing experience by stitching ads directly into the content stream, avoiding ad blockers, and providing a smooth, uninterrupted playback.
![Mediatailor](https://www.tothenew.com/blog/wp-ttn-blog/uploads/2024/08/mediatailor2.webp)
Mediatailor
Amazon CloudFront
Amazon CloudFront is a Content Delivery Network (CDN) service that delivers content with low latency and high transfer speeds. It caches your content at edge locations worldwide, ensuring fast and reliable delivery to viewers regardless of their geographical location. By using CloudFront, you can ensure global distribution of your VOD content and achieve optimal performance for both video playback and ad delivery.
![Cloudfront](https://www.tothenew.com/blog/wp-ttn-blog/uploads/2024/08/cloudfront-1024x454.png)
Cloudfront
High-Level Architecture
This setup involves:
-
- AWS Elemental MediaConvert: For encoding VOD assets and inserting SCTE-35 ad markers.
- AWS Elemental MediaTailor: For dynamically stitching ads into the content stream based on the SCTE-35 markers.
- Amazon CloudFront: For delivering the content globally with low latency.
![VOD Architecture](https://www.tothenew.com/blog/wp-ttn-blog/uploads/2024/08/VOD-generic.png)
VOD Architecture
Prerequisites
Before starting, ensure you have:
-
- AWS Account with appropriate permissions.
- VOD Source Files in formats such as MP4, stored in Amazon S3.
- Ad Decision Server (ADS) like Google Ad Manager to deliver targeted ads.
- AWS CLI Access for command-line operations if needed.
Steps Overview
The following steps need to be followed:
-
- Use MediaConvert to encode and insert SCTE-35 markers in your VOD content.
- Set up MediaTailor to insert ads dynamically based on SCTE-35 markers.
- Deliver your VOD content globally using CloudFront.
Step 1: Prepare VOD Assets with AWS MediaConvert
In this step, you’ll use MediaConvert to process your VOD assets and insert SCTE-35 markers, which will indicate ad insertion points in your content.
1.1 Upload VOD Files to S3
First, upload your VOD file (e.g., video.mp4) to an S3 bucket:
aws s3 cp video.mp4 s3://<your-bucket>/video.mp4
1.2 Create a MediaConvert Job
- Go to the AWS MediaConvert Console and click Create Job.
- Select your uploaded VOD file as the input under the Input section.
Example Input:
Input File: s3://<your-bucket>/video.mp4
1.3 Configure Outputs with SCTE-35 Markers
In the Output Groups section:
- Choose HLS as the output group.
- Configure Resolution, Bitrate, and Segment Length (e.g., 6 seconds) based on your streaming requirements.
To enable SSAI, make sure to insert SCTE-35 markers:
- Under HLS Group Settings, set Ad Markers to SCTE-35.
- Define the positions where ads should be inserted by specifying Cue Points in the job settings (or use a pre-existing SCTE-35 cue file if available).
Example Output Settings:
Output Group: HLS Segment Length: 6 seconds Ad Markers: SCTE-35 Destination: s3://<your-bucket>/hls-output/
Submit the job to start processing the VOD content with SCTE-35 ad markers.
Step 2: Integrate SSAI with AWS MediaTailor
Now that SCTE-35 markers are embedded in the VOD stream, AWS MediaTailor can dynamically insert ads into the stream based on these markers.
2.1 Create a MediaTailor Configuration
- Go to the AWS MediaTailor Console and click Create Configuration.
- Set the Configuration Name and provide the Source URL as the MediaConvert HLS output location.
Source URL Example:
https://s3.<region>.amazonaws.com/<your-bucket>/hls-output/index.m3u8
- Provide the Ad Decision Server (ADS) URL. This is the URL where MediaTailor will request personalized ads from your ad server, like Google Ad Manager.
Example ADS URL:
https://pubads.g.doubleclick.net/gampad/ads?{ADS_PARAMETERS}
- Enable SCTE-35 ad markers in MediaTailor to ensure ads are stitched into the stream at the cue points inserted by MediaConvert.
2.2 Generate the SSAI Playback URL
MediaTailor will generate a playback URL with dynamically stitched ads based on the SCTE-35 markers in your VOD content.
Example SSAI Playback URL:
https://<mediatailor-region>.mediatailor.<region>.amazonaws.com/v1/master.m3u8
This URL can be used to stream VOD content with server-side ads, which are stitched seamlessly based on the markers.
Step 3: Distribute Content Using Amazon CloudFront
To ensure low-latency, global delivery of your VOD content with SSAI, set up a CloudFront distribution to cache and deliver the MediaTailor-processed content.
3.1 Create a CloudFront Distribution
- Go to the CloudFront Console and select Create Distribution.
- In the Origin Settings, set the Origin Domain Name as the MediaTailor playback URL.
Origin Example:
https://<mediatailor-region>.mediatailor.<region>.amazonaws.com/v1/master.m3u8
3.2 Configure Cache Behavior
To optimize the VOD playback performance:
- Set Minimum TTL to 0 to ensure ad insertion decisions remain dynamic.
- Set Maximum TTL to 86400 (24 hours) for non-ad content.
- Enable SSL for secure streaming using AWS Certificate Manager (ACM).
3.3 Set Up a Custom Domain (Optional)
You can add a custom domain name (e.g., vod.example.com) for your CloudFront distribution by configuring an Alternate Domain Name (CNAME) and provisioning an SSL certificate via ACM.
Step 4: Monitor and Scale
4.1 Monitor with AWS CloudWatch
Use CloudWatch to monitor your VOD SSAI workflow:
- Track metrics for playback success rates, ad insertion rates, and potential errors.
4.2 Scaling Considerations
AWS services like MediaConvert, MediaTailor, and CloudFront automatically scale to meet demand. Make sure you monitor your encoding and ad insertion performance to ensure optimal scaling and quality.
Complete Workflow Example Using AWS CLI
Here’s an example of automating the setup via AWS CLI:
Create a MediaConvert Job with SCTE-35 Markers
aws mediaconvert create-job \ --role <media-role-arn> \ --settings <json-file-with-settings> \ --output-groups '[{"Type": "HLS_GROUP_SETTINGS", "OutputGroupSettings": {"HlsGroupSettings": {"SegmentLength": 6, "AdMarkers": "SCTE-35", "Destination": "s3://<your-bucket>/output-folder"}}}]'
Create MediaTailor Configuration
aws mediatailor create-playback-configuration \ --name "MySSAISetup" \ --video-content-source-url "https://s3.<region>.amazonaws.com/<your-bucket>/hls-output/index.m3u8" \ --ad-decision-server-url "https://ads-server-url"
Create CloudFront Distribution
aws cloudfront create-distribution \ --origin-domain-name "<MediaTailor playback URL>" \ --default-root-object "index.html"
Conclusion
By following this guide, you can set up VOD content with Server-Side Ad Insertion (SSAI) using AWS MediaConvert to integrate SCTE-35 markers directly, and AWS MediaTailor to dynamically stitch ads based on those markers. With MediaTailor and CloudFront working together, your viewers can enjoy personalized, seamless ad experiences, while you maximize ad revenue.