During the development stage of video processing solutions, some technical troubles may arise and it is not a surprise. When you build video-on-demand software or a live streaming solution, the first thing you should decide is what services you will use to integrate them into your software. AWS Media Services are the ones you should consider.
Amazon needs no introduction and it's Amazon Web Services infrastructure provides software developers with a large number of different solutions. Let’s find out how you can integrate AWS Media Services during your media project development and what it is about actually.
AWS Media Services: a word about
AWS Media Services are cloud solutions for video processing that makes it possible to process, store and transmit video using OTT technology (Over-the-Top). Charge for services is made when everything is implemented and they make it possible to create scalable solutions for video content processing without substantial time delays.
Check it out how AWS Lambda accelerates a development process. Read High-tech serverless platform to reduce your app development cost
AWS Media Services provide developers with the following kit of solutions for the development of media apps and websites:
- AWS Elemental MediaConnect;
- AWS Elemental MediaConvert;
- AWS Elemental MediaLive;
- AWS Elemental MediaPackage;
- AWS Elemental MediaStore;
- AWS Elemental MediaTailor.
To have a full picture about these tools, we will give you a short description of each one.
AWS Elemental MediaConnect is an optimized service for safe and reliable video stream transmission.
AWS Elemental MediaConvert is a service that processes video files and clips and allows developers to create streaming content in a video-on-demand” format.
AWS Elemental MediaLive is a service for live streaming that makes it possible to convert video content for live streaming.
AWS Elemental MediaPackage is a service for preparation and protection of video content that is delivered from the web. Using one source, it creates video streams on it's basis with the help of different standards and formats MPEG-DASH, Smooth Streaming, HLS, and CMAF) for playback on various devices (TVs, mobile phones, PCs, tablets and game consoles).
AWS Elemental MediaStore is an AWS storage optimized for video content in a real-time mode. It allows to make low reading and recording delays with a large number of requests, so users can get high-quality services.
AWS Elemental MediaTailor is a service that makes it possible for video providers to integrate advertising into their video content on a server side.
AWS Media Services allows content owners to create video-on-demand content for broadcasting on any scale. As for media companies, AWS makes it possible to expand the audience providing them with web services using OTT technology. Also, AWS influences on costs reduction on infrastructure and it optimized content delivery processes for media content providers and broadcasters.
Do you what are the best repositories to store source codes? Watch this video:
Top 3 Source Code Repository Hosts
Now you know about these services and how they can be helpful for your media app. Now let’s study how AWS media Services can be used.
How to use AWS Media Services for media projects
We can single out the following use cases of media services from Amazon for your projects:
- creating live streaming;
- create a content library in video-on-demand format.
Set up live streaming
First, let’s start with live streaming integration.
The process of video broadcasting consists of the following:
- AWS Elemental MediaLive. A converting/coding of video and audio streams using various codecs, subtitles overlay and watermark adding;
- AWS MediaStorage. An optimized media content storage, in case if it is necessary to store live video stream record with a further on-demand delivery (optionally). Sometimes it can function improperly and Amazon recommends to use AWS S3;
- AWS Elemental Media Package. Distribution of recoded video stream on targeted devices using various technologies (Apple HLS, MPEG-DASH, CMAF, Microsoft Smooth Streaming);
- AWS CloudFront. CDN service will accelerate delivery in various geographical regions (optionally).
A scheme of functionality is on a picture below.
Scheme of video broadcasting process
The process of live streaming development can be divided into a few parts:
To create live streaming for your media project, the first thing you should do is to create a channel in AWS Elemental MediaPackage for the processing of recoded video stream. It can be implemented using AWS SDK or using developer’s console (further examples are based on interaction with the developer’s console, but it can also be easily implemented with SDK). To create a channel, it is necessary to indicate channel ID and description (optionally). At the moment, at the input AWS Elemental MediaPackage works only as an HLS protocol.
A channel creation in AWS Elemental MediaPackage
It is necessary to customize endpoints (addresses where the end user will be able to receive a streaming video), the following options are supported:
- Apple HLS;
- Microsoft Smooth;
- Common Media Application Format (CMAF);
When MediaPackage is customized, you can proceed to customization of MediaLive. For a start, it is necessary to create Input (video stream source). At the input MediaLive can receive a file (MP4), a stream sent through RTMP/RTP/HLS protocols or a stream sent through AWS MediaConnect.
Find out what cloud platform prevails. Read Heroku vs AWS: Which Cloud Platform to Choose in 2018?
For example, let’s create Input that receives a record from the screen over OBS (Open Broadcaster Software), it utilizes RTMP protocol.
Then, you need to create a video stream processing channel in MediaLive. To perform it, you need to indicate a name, create IAM role (or choose already existing one) to give rights required for the integration with other services, select the Input created previously and create output group (a destination for a converted media stream).
Video stream processing channel setting up in MediaLive
AWS MediaLive supports the following output group types:
- Apple HLS;
- Archivation of a video stream to S3;
- RTMP (broadcasting of video stream to streaming services: YouTube, Twitch etc.);
- Microsoft Smooth;
Output group types
It is possible to create your own output group or select one using a template. As an example, let’s take a Live event template for creating HLS output stream with the support of 4 resolutions (240p, 480p, 720p, and 1080p).
Create your own output group
In settings of the output stream, you should indicate the destination address (in case of HLS output, it can be MediaPackage, MediaStore, S3 or Akamai CDN services) and authorization data, in this case, it is input addresses of MediaPackage channel. Then you can change settings of video coding or add outputs for other screen resolutions or with other bitrates. Clicking on Create channel button will help you create a channel.
Then you need to launch MediaLive channel, in OBS settings you should indicate the address that you have received when created RTMP input and start streaming.
Streaming will be available using addresses created in MediaPackage endpoint.
In case if you need to save streaming, you need to use storage services (MediaStore or S3) instead of MediaPackage.
We hope that everything is clear with live streaming. Now let’s discuss shortly how to create a video-on-demand format in your new media project.
Video on demand
In short, AWS Elemental MediaConvert service is used to create a streaming on-demand video with the help of Amazon tools. The principle of functionality is similar to MediaLive service with the difference that MediaLive processes streaming video in real time, and MediaConvert implements the same with video files from S3 storage and result is saved on S3 as well.
VoD processing using Amazon tools
Amazon provides developers with an open source solution that consists of a few steps:
- A source file is uploaded to S3 with a note for archiving to AWS S3 Glacier;
- Validation of a source video, on the basis of metadata template for AWS MediaConvert is selected, and all received data is stored to a database;
- Job in AWS MediaConvert for video processing is created on the basis of a profile;
- Upon converting completion, video result is stored to S3, and database record is updated;
- Processed data from S3 are cached in CloudFront for acceleration of delivery in various geographical regions;
- CloudWatch is used to find errors.
Delve into the process of Blockbuster service improvement. Read How we improve Blockbuster video streaming app
A scheme of functionality is on a picture below.
Source video processing scheme
The process of AWS Media Services integration is not very easy but it requires specific skills and experience to implement everything and achieve a good result. Our developers are always ready to help you with your media app or website, so just contact us and don’t forget to click a Subscribe button.