Amazon Web Services (AWS) offers its customers several methods designed to cost-effectively deliver on-demand video content to a global audience. These methods help enable you to dynamically scale any combination of video storage, processing, and delivery services on the AWS Cloud.  

This webpage provides best practices and guidance to consider when implementing a video-on-demand workflow on the AWS Cloud, and introduces an AWS solution that automatically provisions the services necessary to build a scalable, distributed architecture that ingests, stores, processes, and delivers video content.

The following sections assume basic knowledge of architecting on the AWS Cloud, video-on-demand workflows, video encoding, and video packaging.

When streaming on-demand video in the cloud, there are some universal video-streaming principles that will help you build highly scalable, performant, and resilient on-demand streaming video solutions. Before you implement a streaming solution, determine the requirements for your use case. Consider your sources, encoding and playout formats, as well as the devices you want to target. Then, choose a solution that meets those requirements. Also, weigh the entire cost of the solution against the desired video quality and overall flexibility, scalability, and redundancy. Keeping these general principles in mind, consider the following best practices for streaming video-on-demand on the AWS Cloud:

  • To provide the best experience for all viewers, use HTTP-based adaptive bit rate (ABR) formats to let each device continually negotiate the highest quality bit-rate stream available. ABR streams automatically adjust the quality of the delivered content to match the bandwidth available to each client device. ABR-based delivery greatly reduces buffering, provides a fast start time, and provides an optimal viewing experience for a viewer's available bandwidth and for the device's resolution and capabilities.
  • Choose a streaming solution that complements your company’s existing processes and skill sets to ensure that you can manage and modify your solution to meet future requirements. This will streamline your video-on-demand workflow and reduce operational complexity for developers and operators.
  • Clearly define an end-to-end workflow with a specific and well-understood design for redundancy and failover. Ensure transcoding, packaging, and origination software and settings are optimized for troubleshooting and management at scale.

AWS offers a solution that ingests source videos, processes the videos for playback on a wide range of devices, and stores the transcoded media files for on-demand delivery to end users through Amazon CloudFront. The diagram below presents the video-on-demand architecture you can deploy in minutes using the solution's implementation guide and accompanying AWS CloudFormation template.

  1. This solution uses AWS Lambda to trigger AWS Step Functions ingest, processing, and publishing workflows.
  2. A step function ingests a source video, or a source video and metadata file, validates the source files, and generates metadata on the source video. A second step function generates an encoding profile based on the metadata and submits encoding jobs to AWS Elemental MediaConvert. After the video is encoded, a third step function validates the output.
  3. AWS Elemental MediaConvert use two-pass encoding to generate multiple high-quality versions of the original file.  
  4. Source and destination media files are stored in Amazon Simple Storage Service (Amazon S3) and file metadata is stored in Amazon DynamoDB. If enabled, source files are tagged to allow the files to be moved to Amazon Glacier using an Amazon S3 lifecycle policy.
  5. Amazon CloudFront  provides a global distribution of the on-demand video to end users.
  6. Amazon CloudWatch monitors log files and sends Amazon Simple Notification Service (Amazon SNS) notifications for encoding, publishing, and errors.
Deploy Solution
Implementation Guide

What you'll accomplish:

Deploy Video on Demand on AWS using AWS CloudFormation. The AWS CloudFormation template will automatically launch and configure the components necessary to ingest, store, process, and deliver video on demand.

Automatically transcode into multiple resolutions and formats including H.265 (HEVC) and H.264 (AVC up to 4K resolution). You can also create your own custom presets and job templates with AWS Elemental MediaConvert.

What you'll need before starting:

An AWS account: You will need an AWS account to begin provisioning resources. Sign up for AWS.

Skill level: This solution is intended for IT infrastructure architects, administrators, and DevOps professionals who have experience with video processing and delivery, and practical experience architecting on the AWS Cloud.

Q: What source video formats does the Video on Demand on AWS solution support?

By default, this solution can encode MP4, MPG, M4V, and MOV files. The solution can be customized to encode any media file type supported by AWS Elemental MediaConvert.

Q: What output formats does this solution create?

This solution can encode your source videos into H.264 and H.265; SD, HD, and 4K MP4; and SD and HD HTTP Live Streaming (HLS), and Dynamic Adaptive Streaming over HTTP (DASH). The workflow can be configured to encode all videos in the same or to use metadata files to apply encoding settings on a video-by-video basis.

Q: What resolutions does this solution output?

This solution outputs 4K, 1080p, and 720p MP4, and any combination of 1080p, 720p, 540p, 360p, and 270p HLS and DASH.

Q: Can I customize and extend this solution for my specific needs?

Yes. This solution leverages AWS Step Functions, which breaks the workflow into individual steps that each perform a discrete function, making it easier to customize or extend the architecture for your specific video-on-demand needs. For example, you can modify or replace the encoding steps to produce different content sets. You can also add steps to extend support for more complex workflows, including image processing for poster artwork or additional custom data to the metadata file that will then be stored in Amazon DynamoDB.

Q: Can I use Amazon Elastic Transcoder for encoding with this solution?

Yes. This solution includes an AWS CloudFormation template that deploys a workflow that leverages Amazon Elastic Transcoder. For more information, see the implementation guide.

Q: Can I deploy this solution in any AWS Region?

This solution uses AWS Step Functions and AWS Elemental MediaConvert. Therefore, you must deploy this solution in an AWS Region that supports these services. For more information, see AWS service availability by region.

Need more resources to get started with AWS? Visit the Getting Started Resource Center to find tutorials, projects and videos to get started with AWS.

Tell us what you think