AWS Media Services represent a set of cloud-based solutions created to assist with video processing. They process, store and deliver video content using OTT (Over-the-Top) technology.
These services offer a pay-as-you-go pricing model which means they’re great for building scalable solutions within a pretty short timeframe.
Underneath, I’ve listed the solutions that come into AWS Media Services family and explained what they serve for in a nutshell:
So why AWS Media Services are worth using? First of all, they reduce infrastructure expenses and optimize the content delivery process for broadcast organizers and media content providers.
For content owners, they allow creating content in the format of on-demand video for broadcasts of any scale. While media companies can broaden their audience due to OTT technology.
Let’s get to practice now.
The real-time video streaming can be built by means of the following services:
Here is a short version of what you need to do for setting up a live video broadcast:
Let’s consider the aforementioned points in more detail.
The first step to undertake is the creation of AWS MediaPackage channel for processing the recoded video stream. You can do so by using the AWS SDK or developers console.
(The following examples are based on working with developers console, but it’s pretty easy to do it with SDK as well.)
To create a channel you should specify its ID and description (optional). As for now, AWS Elemental MediaPackage works with HLS protocol only. So keep that in mind.
The next step is to configure endpoints (addresses that end-users need to follow to get a streaming video).
Here are all the supported options:
Once MediaPackage is all set you can proceed with tuning AWS MediaLive. First, you need to create the Input (source of a video stream).
MediaLive can receive at the input :
As an example, let’s create an input receiving a screen record via OBS (Open Broadcaster Software) using RTMP protocol.
For this, you need to specify the name, create an IAM role (or pick already existing one). Then you should choose the previously created input along with output group (destination for converted media stream) to provide the rights needed for integration with other services.
As an output, AWS MediaLive supports:
It’s possible to create your own output group or pick one from templates. Let’s take a ‘Live event’ template as an example for the creation of an output HLS stream with the support for four resolutions (240p, 480p, 720p, and 1080p).
In the settings of the output stream, you should specify the destination address. (For example, in the case with HLS output, it can be such services as MediaPackage, MediaStore, S3 or Akamai CDN). One more thing to specify is an input address of the MediaPackage channel.
After that, you’ll be able to change the video’s encoding settings or add outputs for other screen resolutions and bitrates. Finally, by clicking the ‘Create channel’ button, you’ll create the channel itself.
To finally start broadcasting, you should specify the address you’ve got during the creation of RTMP.
The broadcast view will be available at the addresses created in the MediaPackage endpoint.
If there is a necessity to save the broadcast, you should use MediaStore or S3 instead of MediaPackage.
AWS Elemental MediaConvert is used to deliver on-demand video content. It works similarly to MediaLive with the only difference that MediaLive processes video streams in a real-time, while MediaConvert does the same with video files taken from the S3 storage.
Amazon gives developers an open-source solution which takes several steps to be tuned:
Underneath I’ve left a schematic picture illustrating how it all works.