Manage Media Delivery in the Cloud with Microsoft Azure and Media Services


Editor’s note: In partnership with Microsoft Press, MVPs have been contributing to an ongoing guest series on their official team blog. Today’s article is from ASP.Net/IIS MVP Julien Corioland. Thanks, Julien!  This article talks about managing media workflows in the cloud using Microsoft Azure Media Services.

Introduction

Today, people want be able to consume videos from any devices and any places: at home on their computers or TV over large bandwidth connections or on the go with their mobile phones over mobile networks.

The diversity of Internet connection qualities, devices and formats is very hard to assume for OVP (Online Video Providers). They need to provide videos that may be readable on phones, tablets, connected-TVs, games consoles, PCs and so more. This is a big issue for them because they need to create files for each platform. The principal effect is the increase of storage cost.

For example, there is currently three different formats that are mostly used to do adaptive streaming: HLS for Apple and Android, Smooth Streaming for Microsoft platforms and MPEG-DASH that is emerging as the one that will be the way to do adaptive streaming in the future, and that is supported by modern web browsers, without plugin, using the HTML 5 video tag.

Media Services is a Microsoft Azure feature that allows to manage media workflows in order to simplify them and reduce the storage costs related to the devices and formats diversity. It can be used in two scenarios: VOD (Video-on-demand) and Live Channels.

In this article, I will cover the first scenario and show you how to use Microsoft Azure and Media Services to build an online video platform that can stream content to a very large panel of devices (like iPhone, iPads, Windows, Android or modern web browsers). To reduce storage costs, Microsoft propose a feature called Dynamic Packaging that allows to package content on-demand in the format the customer is asking for. In this way, you can do adaptive streaming in HLS, Smooth Streaming or MPEG-DASH using the same asset (mezzanine file) and package it on the fly.

 

 

Media workflows with Microsoft Azure

The schema bellow describes the way that Media Services may be used to handle media management workflows with Microsoft Azure:

 

Media Services uses the Microsoft Azure blob storage to store all media assets. It is possible to split the process in 5 steps:

1)      Ingest: the source media file is uploaded in the Azure blob storage. In most of the cases, this file is a high definition media asset (a H264 MP4 file, for example).

2)      The file is processed by a media encoder that may be used to encode the file in other formats or qualities. In our case, we will ask Media Services to generate a multi-bitrate MP4. (A multi-bitrate asset contains multiple MP4 files encoded with different bitrate / quality and a metadata file that describe the different files. It allows the server to switch between qualities to adapt the stream to the bandwidth)

3)      Once the original asset is processed, all output files are also stored in the Azure blob storage

4)      To distribute the file, Media Services offers media packagers that may be used to package the media in different formats to do Smooth Streaming, HLS or MPEG-DASH. Media packagers can be used dynamically or statically. In this example, they will be used dynamically.

5)      The file is streamed in the format the consumer ask for

In addition to Azure Media Services, Microsoft Azure offers a lot of Platform-as-a-Service (PaaS) features that you can use to build an online video platform: Azure web jobs and web sites for compute, Azure service bus for distributed messaging and scalability, Azure Active Directory for security and so on…

To keep the article simple I have chosen to divide all steps of the workflow in small console applications. Some of them will be executed in Azure web Jobs on specific triggers (like new blob in a container or new message in a queue) and others will be executed directly on your machine.

The code is available on GitHub: https://github.com/jcorioland/techdays2015/. For readability I have not detailed all the code, so do not hesitate to clone the repository and look directly in the code while reading this article.  Continue reading full article here

Acknowledgements

Special thanks to the following collaborators who volunteered their time to tech review this article:

About the author

Julien is developer, consultant and speaker about Microsoft technologies since 8 years. First, he was developing client applications using Windows Forms, WPF and Silverlight. He also has worked on the first versions of Windows Phone SDKs and wrote a book about it (French) with two coworkers. Since 2012, Julien works mostly with web and cloud technologies, like ASP.NET MVC, Web API and Microsoft Azure even if he continues to look at the client technologies and develop some personal projects. He is Microsoft MVP since 2010, now in the ASP.NET / IIS category and has a technical blog at http://www.juliencorioland.net and often speaks on Microsoft events like Tech Days. He is also active on Twitter @jcorioland, so feel free to contact him.

About MVP Monday

The MVP Monday Series is created by Melissa Travers. In this series we work to provide readers with a guest post from an MVP every Monday. Melissa is a Community Program Manager, formerly known as MVP Lead, for Messaging and Collaboration (Exchange, Lync, Office 365 and SharePoint) and Microsoft Dynamics in the US. She began her career at Microsoft as an Exchange Support Engineer and has been working with the technical community in some capacity for almost a decade. In her spare time she enjoys going to the gym, shopping for handbags, watching period and fantasy dramas, and spending time with her children and miniature Dachshund. Melissa lives in North Carolina and works out of the Microsoft Charlotte office.

Comments (0)

Skip to main content