SALES: 1-800-867-1380

Encoder Guides

Updated: August 29, 2014

Azure Media Services enables you to encode and stream your video to a variety of devices, from desktop PCs, to smart phones, tablets, and set-top-boxes. The most efficient way of reaching all devices is to use Dynamic Packaging. Encode your media to either MP4 or Smooth Streaming and Media Services can convert your media to HLS or MPEG-DASH in real time. You only need to store one format of your content which reduces the encoding jobs you need to run and the storage space required to store your content. Dynamic packaging requires the purchase of Streaming Reserved Units.

Alternatively you can encode and package your media to MP4, HLS, or Smooth Streaming using the static packager. However, using this method you will have to encode and/or package each format separately as well as store a copy of each format in your Media Services account.

Configuring the Azure Media Encoder is done by using a predefined system preset or using a preset XML file. A system preset represents a collection of predefined best practice encoder settings. Using a system preset is the quickest way to start encoding with Media Services. For more information, see Media Services Encoder System Presets. If you want to use one of the predefined system presets as a starting point and modify the settings according to your needs you can see XML files with each string preset here Task Presets for Media Services Encoder.

Encoding for iOS

All iOS devices natively support HTTP Live Streaming (HLS). You can encode to MP4 and use Dynamic Packaging to convert the MP4 to HLS in real-time. When using Dynamic Packaging, make sure you choose an encoding resolution that will work with all of your target devices, or encode to each resolution required. Alternatively you can encode to Smooth Streaming and use the Azure Media Packager (also called the Static Packager) to convert from Smooth Streaming to HLS.

Each iOS device supports different resolutions and video formats. For more information, see HTTP Live Streaming on Apple’s website.

When encoding for an iOS device keep in mind the target resolution of the device. For iOS devices the following Media Services System resets can be used:

To use PlayReady DRM, first encode to Smooth Streaming, then use the Media Services Encryptor to encrypt using PlayReady, next use the Media Services Packager to convert the PlayReady Protected Asset to HLS. Note: You cannot use HLS + PlayReady with Dynamic Packaging.

Encoding to Smooth Streaming

Smooth Streaming is also supported on iOS devices with the iOS Porting Kit for Smooth Streaming. The Smooth Streaming Porting Kit allows you to create a native iOS video player application that can consume Smooth Streaming assets. To encode to Smooth Streaming for use one of the following predefined system presets:

  • H264 Smooth Streaming 1080p

  • H264 Smooth Streaming 720p

  • H264 Smooth Streaming 720p for 3G or 4G

  • H264 Smooth Streaming SD 16x9

  • H264 Smooth Streaming SD 4x3

Encoding to HTTP Live Streaming (HLS)

While Media Services does not support encoding directly into HLS, you can encode to Smooth Streaming and use the Static Packager to convert from Smooth Streaming to HLS. To convert Smooth Streaming content to HLS use the Media Services Packager and the Smooth to HLS packaging system preset. Configuration for the Smooth to HLS Packaging Task can be found here: Task Preset for Azure Media Packager Alternatively you can encode to MP4 or Smooth Streaming and use the Dynamic Packaging Feature. Note: Dynamic Packager requires at least 1 Streaming Reserve Unit. For more information, see Streaming Reserved Units[ Link the Streaming RU docs}

Encyrpting HLS Content

HLS supports AES 128 bit encryption. You can also use PlayReady DRM to protect HLS content.

HLS and AES 128 bit Encryption

To use AES 128 bit encryption, set the AssetCreationOptions property of the output asset to AssetCreationOptions.EnvelopeEncrypted. And use the Media Services Packager with the Smooth To HLS task. Configuration for the Smooth to HLS Packaging Task can be found here: Task Preset for Azure Media Packager

HLS and PlayReady DRM

Since Media Services does not encode directly to HLS, you must first encode to Smooth Streaming as described previously. You can then use the Media Service Encryptor to protect the content with PlayReady DRM. Finally take the PlayReady protected Smooth Streaming content and use the Media Services Packager to convert the content to PlayReady protected HLS content.

Encoding for Android

There are many different versions of the Android OS as well as many different devices. HLS is supported in Android OS 3.1 and greater. Smooth Streaming is supported via the OSMF Plug-in when the device supports Flash. The following table shows examples of supported video encoding parameters taken from http://developer.android.com/guide/appendix/media-formats.html

 

  SD (Low Quality) SD (High Quality) HD 720p

Video resolution

176 x 144

480 x 360

1280 x 720

Video frame rate

12 fps

30 fps

30 fps

Video bitrate

56 kbps

500 kbps

2mbps

Audio codec

AAC-LC

AAC-LC

AAC-LC

Audio channels

1

2

2

Audio bitrate

24 kbps

128 kbps

192 kbps

Encoding for Windows

Windows provides support for Smooth Streaming, MP4 progressive download, and MPEG-DASH (with IE 11 and DASH.js). To encode for progressive download use one of the following System Presets as a starting point:

To encode for MP4 adaptive bitrate use one of the following presets as a starting point:

To encode for Smooth Streaming adaptive bitrate use of the following presets as a starting point:

  1. H264 Smooth Streaming 1080p

  2. H264 Smooth Streaming 720p

  3. H264 Smooth Streaming 720p for 3G or 4G

  4. H264 Smooth Streaming SD 16x9

  5. H264 Smooth Streaming SD 4x3

To protect your content use PlayReady DRM.

ImportantImportant
Note PlayReady protection is currently not supported with the Dynamic Packaging feature.

Encoding for Xbox

Xbox 360 and Xbox One natively support Smooth Streaming. To encode for Xbox use the H264 Smooth Streaming 720p Xbox Live ADS preset.

See Also


Build Date:

2014-09-09
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft