Export (0) Print
Expand All

Delivering Media with Azure Media Services

Updated: July 8, 2014

Azure Media Services provides a way for you to deliver your media assets that have been uploaded to Media Services. You can deliver Media Services content in numerous application scenarios:

  1. Download media content directly from Azure Storage

  2. Access Media in Azure Storage

  3. Stream media content to a client

  4. Send media content to another application or to another content provider

You can use Media Services to deliver content that has been simply stored in Media Services as described in the topic Ingesting Assets with the Media Services SDK for .NET. Or it can include content that has been also processed or encoded in various ways, as described in the topic Static Packaging. With the current release of Media Services, the options for delivering content are downloading, providing various locator URLs to directly access on demand assets, or streaming assets on a server (or a CDN).

Accessing content in Media Services always requires some sort of Locator. A Locator is an abstraction that combines a URL to the media file and a set of time-based access permissions (for example read, write, or list permissions). There are two types of Locators: Shared Access Signature (SAS) and OnDemandOrigin.

A SAS Locator grants access rights to media assets. By specifying a Shared Access Signature, you can grant users who have the URL access to a specific resource for a specified period of time. You can also specify what operations can be performed on a resource that's accessed via a Shared Access Signature. An OnDemandOrigin Locator is used when streaming content to a client player application. OnDemandOrigin Locators are exposed by the Media Services Origin Service which pulls the content from Azure Storage and delivers it to the client.

To download media from Azure Storage create a SAS locator. For sample code showing how to do this see Download Media Assets.

You may want to give others access to content stored in Azure Storage. To do this you must create a full SAS URL to each file contained in the media asset. This is done by taking the Locater and appending the file name. For sample code showing how to do this, see Create a SAS Locator to On Demand Content.

Media Services also provides a way to directly access streaming media content. To do this, create an OnDemandOrigin Locator, which allows direct access to Smooth Streaming or Apple HTTP Live Streaming (HLS). Similar to the SAS locator example, create a locator, then build a full URL to a specific file, and then access the content. With OnDemandOrigin Locators, you build the full URL to a streaming manifest file (the manifest file has an .ism file extension) in an asset. You can then provide the URL to a client application that can play streaming content. For sample code showing how to do this, see Create an Origin Locator to Smooth Streaming or HLS Content.

When streaming media using OnDemandOrigin Locators you can take advantage of Dynamic Packaging. When using Dynamic Packaging, your video is stored in one encoded format, usually an adaptive bitrate MP4 file. When a video player requests the video it specifies the format it requires. The Origin Service converts the MP4 adaptive bitrate file to the format requested by the player. This allows you to store only one format of your videos, reducing the storage costs. Dynamic Packaging is the preferred method of publishing your video. Note: Dynamic Packaging only supports un-encrypted source files and produces un-encrypted output streams. For more information about Dynamic Packaging, see Walkthrough: Dynamic Packaging Assets.

For improved performance and scalability when streaming media with Origin Services, you can deliver content by using a Content Delivery Network (CDN). Currently only 3rd party CDNs are supported for a list of third-party CDNs like Aspera, see the Azure Store

Azure Media Services allows you to protect your content by encrypting content before/during uploading to storage (also called Ingestion), storing your content in an encrypted form, and publishing your content in a protected manner. For more information see Content Protection with Azure Media Services.

© 2014 Microsoft