Export (0) Print
Expand All

Delivering Content

Updated: August 13, 2014

When working with Media Services, one of the common scenarios is:

  1. Upload an input file (called a mezzanine file). For example, H.264, MP4, or WMV (for the list of supported formats see Formats Supported by the Media Services Encoder).

    For example of how to upload your files, see Uploading Media.

  2. Encode your mezzanine file into a set of adaptive bitrate MP4s.

    For more information, see Encoding and Packaging and Dynamic Packaging.

  3. Deliver the content to your clients in any of the following formats: MPEG DASH, Apple HLS, or Smooth Streaming.

    This topic gives an overview of different content delivery methods and links to the topics that show how to do it (Media Services SDK for .NET or REST API).

Azure Media Services does not directly support streaming through HTTPS. In most cases you will be using a CDN which would provide HTTPS support.

You might want to deliver your content through streaming URLs or let users download media assets on their computers. Your content can include media assets that you have simply uploaded and stored in Media Services as described in Uploading Media. Or it can include media assets that you have encoded and\or packaged in various ways, as described in Encoding and Packaging.

Currently, Media Services supports the following content delivery options:

  • Streaming your content to clients. To provide users with streaming URLs, you first must create an OnDemandOriginLocator. Creating the locator, gives you the base Path to the asset that contains the content you want to stream. However, to be able to stream this content you need to modify this path further. To construct a full URL to the streaming manifest file, you must concatenate the locator’s Path value and the manifest (filename.ism) file name. Then, append /Manifest and an appropriate format (if needed) to the origin locator path. The following table describes the formats and gives examples:


    Smooth Streaming

    {media services account name}.origin.mediaservices.net/{locator ID}/{filename}.ism/Manifest



    {media services account name}.origin.mediaservices.net/{locator ID}/{filename}.ism/Manifest(format=mpd-time-csf) 


    Apple HTTP Live Streaming (HLS) V4

    {media services account name}.origin.mediaservices.net/{locator ID}/{filename}.ism/Manifest(format=m3u8-aapl)


    Apple HTTP Live Streaming (HLS) V3

    {media services account name}.origin.mediaservices.net/{locator ID}/{filename}.ism/Manifest(format=m3u8-aapl-v3)


    HDS (for Adobe PrimeTime/Access licensees only)

    {media services account name}.origin.mediaservices.net/{locator ID}/{filename}.ism/Manifest(format=f4m-f4f)

  • Downloading your content onto client devices or progressively downloading content (start playing media before the entire MP4 file has been downloaded). To download content, you must create a SAS Locator. The SAS locator gives you access the Azure Storage container where your file is located. To build the download URL, you have to embed the file name between the host and SAS signature.

    To progressively download content, you can also use the OnDemandOrigin type of locator.

    You must decrypt any storage encrypted assets that you wish to stream from the origin service for progressive download.

    A download that has not completed within 12 hours will fail.

    The following example shows the URL that is based on the SAS locator:


The Delivering Content with Media Services SDK for .NET and Delivering Content with REST API topics demonstrate how to use OnDemandOrigin and SAS locators to access or download your content.

The rest of the topic:

  1. Concepts

  2. Gives links to players than can help you test your URL

The following list describes useful terminology and concepts when delivering media.

Access policy –The AccessPolicy entity defines permissions (like read, write, and list) and duration of access to an asset. You would usually pass an AccessPolicy object to a locator that would then be used to access the files contained in an asset. Note, that the list permission (AccessPermissions.List) should not be used when creating an OrDemandOrigin locator.

Dynamic packaging – It is recommended to use Dynamic Packaging to deliver your content. For more information see, Dynamic Packaging.

The alternative to Dynamic Packaging is Static Packaging.

HLS - HTTP Live Streaming (HLS), is an adaptive bitrate streaming technology developed by Apple. Azure Media Services supports creating HLS assets protected with AES-128 transport stream encryption. Also, see Android HLS playback via Azure media services.

LocatorLocators provide an entry point to access the files contained in an asset. Media Services supports two types of locators: OnDemandOrigin locators, used to stream media (for example, MPEG DASH, HLS, or Smooth Streaming) and Access Signature (SAS) URL locators, used to download media files. An access policy is used to define the permissions (such as read, write, and list) and duration that a client has access to a given asset. Note, that the list permission (AccessPermissions.List) should not be used when creating an OrDemandOrigin locator.

Locators are not designed to manage per-user access control. To give different access rights to individual users, use Digital Rights Management (DRM) solutions. For more information, see Securing Media.

When you create a locator for media content, there may be a 30-second delay due to required storage and propagation processes in Azure Storage.

MPEG DASH - MPEG DASH is an international standard adaptive bitrate streaming protocol developed by the Motion Picture Experts Group (MPEG).

Progressive download - Progressive download allows you to start playing media before the entire file has been downloaded. You can only progressively download an MP4 file. 

Smooth Streaming - Smooth Streaming is an adaptive bitrate streaming technology developed by Microsoft.

For more information, see Securing Media.

Once you generate the streaming URLs you can test them using the following players:

To test the Smooth Streaming URL, use the smf.cloudapp.net/healthmonitor player.

To test the MPEG DASH URL, use the dashif.org/reference/players/javascript/ player.

To test the HLS URL, use Safari on an iOS device or 3ivx-hls-player.

For more information, see Developing Video Player Applications.

See Also

© 2014 Microsoft