Amazon Web Services (AWS) offers its customers several methods to cost-effectively deliver live video content to a global audience on the AWS Cloud. One method is to combine multiple AWS services to build OTT solutions for live video streaming.

This webpage provides best practices and guidance to consider when choosing a live video streaming solution, and an AWS-provided solution that builds a highly available and cost-effective architecture that delivers a reliable real-time viewing experience.

The following sections assume basic knowledge of architecting on the AWS Cloud, live video streaming, adaptive bitrate (ABR) streaming, video encoding, and video packaging. AWS provides training on video compression basics and video delivery basics.

When streaming live video in the cloud, there are some universal video-streaming principles that will help you build highly scalable, performant, and resilient live streaming video solutions. Before you implement a streaming video solution, determine the requirements for your use case. Consider your input, 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 live streaming on the AWS Cloud:

  • To maximize the number of different devices you can target, encode your source at high quality (resolution and bitrate) for contribution to the cloud. Once in the AWS Cloud, transcode the stream into multiple playout resolutions and formats. Transcoding and packaging your stream into multiple playout formats allows your content to be viewed on computers, set-top boxes, tablets, smartphones, gaming consoles, and connected TVs.
  • 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 formats automatically adjust the quality of the delivered content to match the bandwidth available to each client device. ABR-based video delivery greatly reduces buffering, provides a fast start time, and provides an optimal viewing experience for a customer's available bandwidth.
  • 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 live streaming video 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 provides a live streaming solution that combines AWS Elemental MediaLive and AWS Elemental MediaPackage with Amazon CloudFront to build a highly resilient and scalable architecture that delivers your live content worldwide. 

The diagram below presents the live streaming video architecture you can automatically deploy using the solution's implementation guide and accompanying AWS CloudFormation template.

  1. The solution deploys AWS Elemental MediaLive, which ingests two input feeds and transcodes your content into two adaptive bitrate (ABR) HTTP Live Streaming (HLS) streams as output.
  2. AWS Elemental MediaPackage ingests the MediaLive output and packages the live stream into HLS, Dynamic Adaptive Streaming over HTTP (DASH), and Microsoft Smooth Streaming (MSS) formats that are delivered to three MediaPackage custom endpoints.
  3. An Amazon CloudFront distribution is configured to use the MediaPackage custom endpoints as its origin. The CloudFront distribution delivers your live stream to viewers with low latency and high transfer speeds.
  4. The solution also includes a demo HTML preview player that you can use to test the solution. The player is a static website hosted in an Amazon Simple Storage Service (Amazon S3) bucket. Amazon CloudFront is used to restrict access to the solution's website bucket contents.  
Deploy Solution
Implementation Guide

What you'll accomplish:

Deploy the live streaming solution using AWS CloudFormation. The CloudFormation template will automatically launch and configure the AWS components necessary to stream live video content on the AWS Cloud.

Build a highly resilient and secure architecture using AWS Elemental MediaLive, MediaPackage, and Amazon CloudFront.

What you'll need before starting:

An AWS account: You will need an AWS account to begin provisioning  

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

Q: What resolutions does this solution support?

The solution includes the following output resolutions: 1080p at 6500kbps, 720p at 5000kbps and 3300kbps, 540p at 2000kbps, 432p at 1200kbps, 360p at 800kbps, 270p at 400kbps, and 234p at 200kbps.

Q: What ingest formats does the solution support?

The solution can use all input formats that AWS Elemental MediaLive supports including Real-Time Transport Protocol (RTP) push, Real-Time Messaging Protocol (RTMP) push or pull, and HLS streams pull.

Q: Does this solution support digital rights management (DRM)?

The solution does not support DRM at this time but it can be customized to support DRM. For an example of how to integrate DRM using Secure Packager and Encoding Key Exchange with AWS Elemental MediaPackage, see this GitHub repository.

Q: Where can I find the source code for this solution?

You can visit our GitHub repository to download the templates and scripts for this solution, and to share your customizations with others.

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

You must deploy this solution in an AWS Region that supports AWS Elemental MediaLive and MediaPackage. For more information, see AWS service offerings by region.

Tell us what you think