Eksportér (0) Udskriv
Udvid alt
Dette indhold er ikke tilgængeligt på dit sprog, men her er den engelske version.

Dynamic Packaging

Updated: January 13, 2015

Microsoft Azure Media Services can be used to deliver many media source file formats, media streaming formats, and content protection formats to a variety of client technologies (for example, iOS, XBOX, Silverlight, Windows 8). These clients understand different protocols, for example iOS requires an HTTP Live Streaming (HLS) V4 format and Silverlight and Xbox require Smooth Streaming. If you have a set of adaptive bitrate (multi-bitrate) MP4 (ISO Base Media 14496-12) files or a set of adaptive bitrate Smooth Streaming files that you want to serve to clients that understand MPEG DASH, HLS or Smooth Streaming, you should take advantage of Media Services dynamic packaging. To encode your media files to adaptive bitrate files, see Encoding with Azure Media Encoder.

With dynamic packaging all you need is to create an asset that contains a set of adaptive bitrate MP4 files or adaptive bitrate Smooth Streaming files. Then, based on the specified format in the manifest or fragment request, the On-Demand Streaming server will ensure that you receive the stream in the protocol you have chosen. As a result, you only need to store and pay for the files in single storage format and Media Services service will build and serve the appropriate response based on requests from a client.


To take advantage of dynamic packaging, you must first get at least one On-demand streaming unit for the streaming endpoint from which you plan to delivery your content. For more information, see How to Scale Media Services.

To deliver protected content, use dynamic encryption with dynamic packaging. For more information, see Securing Media.

It is recommended to use dynamic packaging. However, there are scenarios that can only be achieved with static packaging. You have to use static packaging to validate your MP4 files that were encoded with external encoders. For more information, see . Validating Adaptive Bitrate MP4s Encoded with External Encoders

This topic walks you through the steps of

To prepare your asset for dynamic streaming you have the two options described in this section.

Not all MP4 file-formats are supported by dynamic packaging, for more information, see Unsupported formats for dynamic packaging.

To take advantage of dynamic packaging, you must perform the following steps:

  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).

  2. Encode your mezzanine file to H.264 MP4 adaptive bitrate sets.

  3. Publish the asset that contains the adaptive bitrate MP4 set by creating the On-Demand Locator.

  4. Build the streaming URLs to access and stream your content.

The Creating an Encoding Job with the Media Services SDK for .NET topic demonstrates how to perform these steps.

You would typically want to perform this task if you are uploading a set of adaptive bitrate MP4 files that were not encoded with Media Services Encoder. The Validating Adaptive Bitrate MP4s Encoded with External Encoders topic shows how to achieve this task.

Once you have the adaptive bitrate sets on the Azure Media On-demand Streaming server, you can request a locator and compose the streaming URLs for Smooth Steaming, MPEG DASH, HLS, and HDS (for Adobe PrimeTime/Access licensees only).

Make sure to get at least one On-demand Streaming reserved units. For more information, see How to Scale a Media Service.

To provide users with streaming URLs, you first must create an OnDemandOrigin locator. 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


Smooth Streaming 2.0 manifest (legacy manifest)

By default Smooth Streaming manifest format contains the repeat tag (r-tag).

However, some players do not support the r-tag. Such clients can use format that disables the r-tag:

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



{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)


For more information about streaming the content see: Delivering Content, Delivering Assets with the Media Services SDK for .NET, and Delivering Assets with the Media Services REST API.

The following source file formats are not supported by dynamic packaging.

Dolby digital plus mp4 files.

Dolby digital plus smooth files.

See Also

© 2015 Microsoft