We’ve fielded asks on a regular basis from customers for an on demand media encoder that is more agile – one that is able to support more input and output formats, and one that is more tolerant to how the input file was created. Today, I have a solution for those asks – a new file based media processor, named “Media Encoder Standard”. This new encoder, when compared to “Azure Media Encoder”:
- Has support for more file formats & codecs
- Has a better quality H.264 encoder
- Is built on a newer and more flexible pipeline
- Is more robust/resilient
Over the next several months, we will be updating this new encoder regularly and introducing additional features, such as additional file format/codec support, thumbnail support, ability to trim a live archive Asset, and much more. Over time, the new “Media Encoder Standard” will replace “Azure Media Encoder”. Consequently, this new encoder has the same pricing as Azure Media Encoder (see the column labeled ENCODING here).
In this blog post, I will introduce the capabilities of the initial release of Media Encoder Standard, and provide a quick example for using it. Please visit our documentation center to learn more details about how to use this encoder.
Capabilities of Media Encoder Standard
In its initial release, Media Encoder Standard targets two use cases:
- Transcoding a variety of source formats into single bitrate H.264 video and AAC audio, and package into either an ISO MP4 container, or an MPEG2-TS container. The output Asset can then be delivered to various devices/platforms via progressive download
- Transcoding a variety of source formats into multiple GOP-aligned H.264 video streams, and AAC audio, packaged into ISO MP4 containers. The result can subsequently be streamed via Dynamic Packaging.
You can transcode the entire input source, or you can select a portion (i.e. clip) of its timeline.
The following table gives you an idea of the most significant differences between Media Encoder Standard and Azure Media Encoder
Feature | Media Encoder Standard (New!) | Azure Media Encoder |
Supported input file formats | Adds support for F4V, MXF, GXF, Matroska/MKV, and DVR-MS | See this for the details |
Supported input video codecs | Adds support for DNxHD, DVCPro/DVCProHD, JPEG 2000, MPEG-4 Part 2, Theora | See this for the details |
Supported input audio codecs | Adds support for FLAC, Opus and Vorbis | See this for the details |
Supported output file formats | ISO MP4 and MPEG2-TS | ISO MP4 and ASF/WMV |
Supported output codecs | H.264 only | H.264 and VC-1/WMV |
Supported audio codecs | AAC (AAC-LC, AAC-HE, and AAC-HEv2; up to 5.1) only | In addition to AAC, also supports Dolby Digital Plus and WMA |
Thumbnails | Coming soon | Supported |
Clipping the input video | Supported | Supported |
Stitching together multiple inputs | Supported | Supported |
Audio and/or video overlays | Coming soon | Supported |
Metadata about input Asset | Supported | Supported |
Metadata about output Asset | Supported | Supported |
Support for two-pass encoding | Supported | Supported |
Using AMS Explorer to encode with Media Encoder Standard
The easiest way to submit encoding Tasks to this encoder is to use the Azure Media Services Explorer – you can read more about this excellent tool in this blog. To encode a video that has been uploaded into your Media Service account, first select that Asset:
Select the asset, right click and select “Encode asset(s) with Media Encoder Standard…”:
The dialog box for specifying the encoding preset opens up. You can select the default, which encodes the input to multiple bitrate ISO MP4 files, starting at a resolution up to 720p:
Click on “Launch encoding” to submit your encode Task. You can refer to this blog for descriptions on how to publish the output Asset, and stream it to a browser.
Note: Additional encoding presets, and detailed description of them, are available here.
Sample Code
In this section I will provide sample code to submit the above Task using our .NET SDK. Note that code in this topic uses Azure Media Services .NET SDK Extensions. The Media Services .NET SDK Extensions is a set of extension methods and helper functions that simplify your code and make it easier to develop with Media Services.
Following is the relevant code snippet (you can incorporate this into the full example in this blog):
// Declare a new job. IJob job = _context.Jobs.Create("Media Encoder Standard Job"); // Get a media processor reference, and pass to it the name of the // processor to use for the specific task. IMediaProcessor processor = GetLatestMediaProcessorByName("Media Encoder Standard"); // Create a task ITask task = job.Tasks.AddNew("Media Encoder Standard encoding task", processor, "H264 Multiple Bitrate 720p", TaskOptions.None); // Specify the input asset to be encoded. task.InputAssets.Add(sourceAsset); // Add an output asset to contain the results of the job. // This output is specified as AssetCreationOptions.None, which // means the output asset is not encrypted. task.OutputAssets.AddNew("Output asset", AssetCreationOptions.None); // Use the following event handler to check job progress. job.StateChanged += new EventHandler(StateChanged); // Launch the job. job.Submit();