Author – Stuti Dhebar, Cloud Engineer Intern
We can prepare our own media workflows from scratch but it comes with many challenges like huge capital investments, monitoring and managing media assets, improving content discoverability, and more. That’s where Azure Media Services comes in the scenario.
What is Azure Media Service?
Azure Media Services is a cloud and edge media workflow that enables us to build complex and demanding media-driven applications. It provides several features like asset management, high-performance computing, and more in a cloud-based platform that can be accessed at any point of time in the day. With Media Services, we do not have to worry about huge capital investments, space requirements, etc. as all of this is managed by the cloud provider.
It enables us to perform a variety of tasks such as:
- Live and on-demand streaming,
- Multi-device and multi-browser delivery services,
- Live and batch video analytics using Video Indexer,
- Content protection,
- Integrating Azure Cognitive Services into media services to add subtitles, captions, face detection, and more,
- Using Azure Content Delivery Network for delivering high-bandwidth content to users across the globe and with minimum latency.
To use media services, we need an Azure account, a media services account (as shown below), and a standard or premium streaming endpoint.
The following are some common concepts that we will come across when building solutions using media services:
Assets allow us to store media files and publish media for streaming. They are mapped to a blob container in the Azure Storage Account and we can store files like videos, audios, images, thumbnails, and more.
Once we upload the files in the asset, we can encode it. Encoding is the process of compressing our media files to convert them from one format to another. The process is performed to reduce the size of the files and/or convert media files into a format that can be played on multiple devices and browsers. In order to perform encoding, we need to create:
- Transform – It defines the workflow of tasks for processing media files. Each transform can apply more than one rule.
- Job – It is the request to apply the transform to the media files. It specifies information like the location of the input video and the output.
It is a dynamic packaging and origin service that enables us to deliver our content to the end users’ applications with the help of streaming protocols like Smooth Streaming, HLS (HTTP Live Streaming), and DASH (Dynamic Adaptive Streaming over HTTP). When we create a media services account, a streaming endpoint is created by default but we can add more streaming endpoints if required.
We need to create streaming locators and streaming URLs so that we can make our content available for playback. Publishing is the process of creating streaming locators. While creating a streaming locator, we need to specify the asset’s name and a streaming policy. A streaming policy defines how our content can be viewed by the users. There are several streaming policies like ‘Predefined_DownloadOnly’, ‘Predefined_ClearStreamingOnly’, ‘Predefined_ClearKey’, and more.
Using Azure Media Services, we can encrypt live and on-demand content dynamically with Advanced Encryption Standard (AES-128) and/or use any of the three major DRM systems – Microsoft PlayReady, Google Widevine, and Apple FairPlay.
The following diagram shows the process for on-demand streaming.
Interested in Microsoft Azure, Let’s CONNECT!