Working with Windows Azure Media Services

Introduction

Microsoft offers a varied range of services under its cloud computing banner. With the rise of media content, there is a very high demand for services that can help with media content.

Microsoft’s Azure platform offers services targeted for media content under the banner of “Windows Azure Media Services”. These services offer Platform-As-A-Service (PAAS) solutions for media management, with the scalability of cloud computing.

The media services offerings include:

  • Content ingestion
  • Encoding
  • Format conversion
  • Content protection
  • On-demand streaming
  • Live Streaming

Windows Azure Media Services are built upon cloud-hosted instances of the Microsoft Media platform, which is a complete set of technologies from Microsoft for digital media encoding, delivery, and playback for virtually any network-connected device.

Microsoft Media Platform offers the ability to encode and transcode live and archived media assets using industry standard H.264 and VC-1 codecs. It also supports delivery of media via traditional streaming, dynamic adaptive streaming over HTTP, and intelligent progressive download. Additionally, It supports creating immersive end-user media experiences for a broad range of devices using Smooth Streaming client SDKs and Player Frameworks with advanced playback functions and support for closed captions.

With Windows Azure Media services, cloud engineers can:

  • Build entire workflows to handle their media – With Windows Azure Media Services, complete workflows can be crafted, which will process the media entirely in the cloud. Activities like uploading, storage, encoding, format conversion, content protection and delivery can be provisioned as workflows that run entirely in the cloud.
  • Use custom tools to work with media workflows – Windows Azure Media services allow integration of custom tools and processes with workflows. Services expose REST APIs, which allow easy integration.

Pricing

Like the other Windows Azure services, Windows Azure Media Services are charge based on the amount of data processed. Having reserved instances to process parallel media tasks can cost more.

Getting Started

To get started with using Windows Azure Media Services, we need to:

  • Create a Media Services account with a Windows Azure subscription.
  • A PC with Windows7, Windows 2008 R2 , Windows 8, or Windows 8.1
  • VS 2012 or VS 2013.
  • Windows Azure Media Services SDK for .NET.

To install Windows Azure Media Services SDK, open Package Manager Console in Visual Studio and execute the following command – “Install-Package windowsazure.mediaservices”

To create a Media Services account, navigate to Windows Azure Management Console.

Windows Azure Management Console
Windows Azure Management Console

Click on the Media Services link on the left, and then click “Create a media service account”.

Create a media service account
Create a media service account

Provide a valid name and click the “Create Media Service” link at the bottom.

It will take a few minutes for the creation to be complete. When it has completed successfully, it will resemble the screenshot below.

Media Service Creation Complete
Media Service Creation Complete

Now that the media services account is created, we can create a simple Windows Azure Media Services project in Visual Studio.

Create a new Visual Studio Console application titled WindowsAzureMediaServicesDemo.

New Visual Studio Console Application
New Visual Studio Console Application

Open Package Manager Console and execute the following command.

PM> Install-Package windowsazure.mediaservices
Attempting to resolve dependency 'Microsoft.Data.OData (≥ 5.6.0)'.
Attempting to resolve dependency 'System.Spatial (= 5.6.0)'.
Attempting to resolve dependency 'Microsoft.Data.Edm (= 5.6.0)'.
Attempting to resolve dependency 'Microsoft.Data.Services.Client (≥ 5.6.0)'.
Attempting to resolve dependency 'TransientFaultHandling.Core (≥ 5.1.1209.1)'.
Attempting to resolve dependency 'WindowsAzure.Storage (≥ 2.0.6.1)'.
Attempting to resolve dependency 'Microsoft.WindowsAzure.ConfigurationManager (≥ 1.8.0.0)'.
Attempting to resolve dependency 'Microsoft.WindowsAzure.ConfigurationManager (≥ 2.0.3.0)'.
Installing 'System.Spatial 5.6.0'.
You are downloading System.Spatial from Microsoft Corporation, the license agreement to which is available at http://go.microsoft.com/?linkid=9809688. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'System.Spatial 5.6.0'.
Installing 'Microsoft.Data.Edm 5.6.0'.
You are downloading Microsoft.Data.Edm from Microsoft Corporation, the license agreement to which is available at http://go.microsoft.com/?linkid=9809688. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'Microsoft.Data.Edm 5.6.0'.
Installing 'Microsoft.Data.OData 5.6.0'.
You are downloading Microsoft.Data.OData from Microsoft Corporation, the license agreement to which is available at http://go.microsoft.com/?linkid=9809688. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'Microsoft.Data.OData 5.6.0'.
Installing 'Microsoft.Data.Services.Client 5.6.0'.
You are downloading Microsoft.Data.Services.Client from Microsoft Corporation, the license agreement to which is available at http://go.microsoft.com/?linkid=9809688. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'Microsoft.Data.Services.Client 5.6.0'.
Installing 'TransientFaultHandling.Core 5.1.1209.1'.
You are downloading TransientFaultHandling.Core from Microsoft, the license agreement to which is available at http://www.opensource.org/licenses/ms-pl. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'TransientFaultHandling.Core 5.1.1209.1'.
Installing 'WindowsAzure.Storage 2.0.6.1'.
You are downloading WindowsAzure.Storage from Microsoft, the license agreement to which is available at http://go.microsoft.com/fwlink/?LinkId=235170. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'WindowsAzure.Storage 2.0.6.1'.
Installing 'Microsoft.WindowsAzure.ConfigurationManager 2.0.3'.
You are downloading Microsoft.WindowsAzure.ConfigurationManager from Microsoft, the license agreement to which is available at http://aka.ms/windowsazureapache2. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'Microsoft.WindowsAzure.ConfigurationManager 2.0.3'.
Installing 'windowsazure.mediaservices 3.0.0.2'.
You are downloading windowsazure.mediaservices from Microsoft Corporation, the license agreement to which is available at http://go.microsoft.com/fwlink/?LinkID=272666&clcid=0x409. Check the package for additional dependencies, which may come with their own license agreement(s). Your use of the package and dependencies constitutes your acceptance of their license agreements. If you do not accept the license agreement(s), then delete the relevant components from your device.
Successfully installed 'windowsazure.mediaservices 3.0.0.2'.
Adding 'System.Spatial 5.6.0' to WindowsAzureMediaServicesDemo.
Successfully added 'System.Spatial 5.6.0' to WindowsAzureMediaServicesDemo.
Adding 'Microsoft.Data.Edm 5.6.0' to WindowsAzureMediaServicesDemo.
Successfully added 'Microsoft.Data.Edm 5.6.0' to WindowsAzureMediaServicesDemo.
Adding 'Microsoft.Data.OData 5.6.0' to WindowsAzureMediaServicesDemo.
Successfully added 'Microsoft.Data.OData 5.6.0' to WindowsAzureMediaServicesDemo.
Adding 'Microsoft.Data.Services.Client 5.6.0' to WindowsAzureMediaServicesDemo.
Successfully added 'Microsoft.Data.Services.Client 5.6.0' to WindowsAzureMediaServicesDemo.
Adding 'TransientFaultHandling.Core 5.1.1209.1' to WindowsAzureMediaServicesDemo.
Successfully added 'TransientFaultHandling.Core 5.1.1209.1' to WindowsAzureMediaServicesDemo.
Adding 'WindowsAzure.Storage 2.0.6.1' to WindowsAzureMediaServicesDemo.
Successfully added 'WindowsAzure.Storage 2.0.6.1' to WindowsAzureMediaServicesDemo.
Adding 'Microsoft.WindowsAzure.ConfigurationManager 2.0.3' to WindowsAzureMediaServicesDemo.
Successfully added 'Microsoft.WindowsAzure.ConfigurationManager 2.0.3' to WindowsAzureMediaServicesDemo.
Adding 'windowsazure.mediaservices 3.0.0.2' to WindowsAzureMediaServicesDemo.
Successfully added 'windowsazure.mediaservices 3.0.0.2' to WindowsAzureMediaServicesDemo.

If we open up Solution Explorer, you will notice that the Windows Azure Media Services assemblies are now included in the project.

Solution Explorer
Solution Explorer

Our working environment is now ready to build Media Services applications.

Summary

In this article, we learned about Windows Azure Media Services and how we can get ready to build applications

About the Author

Vipul Patel is a Program Manager currently working at Amazon Corporation. He has formerly worked at Microsoft in the Lync team and in the .NET team (in the Base Class libraries and the Debugging and Profiling team). He can be reached at vipul.patel@hotmail.com

More by Author

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Must Read