How to: Get a Media Processor Instance


In Media Services a media processor is a component that handles a specific processing task, such as encoding, format conversion, encrypting, or decrypting media content. You typically create a media processor when you are creating a task to encode, encrypt, or convert the format of media content.

The following table provides the name and description of each available media processor.

Media Processor Name Description More Information
Media Encoder Standard Provides standard capabilities for on-demand encoding. Overview and Comparison of Azure On Demand Media Encoders
Media Encoder Premium Workflow Lets you run encoding tasks using Media Encoder Premium Workflow. Overview and Comparison of Azure On Demand Media Encoders
Azure Media Indexer Enables you to make media files and content searchable, as well as generate closed captioning tracks and keywords. Azure Media Indexer
Azure Media Hyperlapse (preview) Enables you to smooth out the "bumps" in your video with video stabilization. Also allows you to speed up your content into a consumable clip. Azure Media Hyperlapse
Azure Media Encoder Deprecated
Storage Decryption Deprecated
Azure Media Packager Deprecated
Azure Media Encryptor Deprecated

Get Media Processor

The following method shows how to get a media processor instance. The code example assumes the use of a module-level variable named _context to reference the server context as described in the section How to: Connect to Media Services Programmatically.

private static IMediaProcessor GetLatestMediaProcessorByName(string mediaProcessorName)
    var processor = _context.MediaProcessors.Where(p => p.Name == mediaProcessorName).
    ToList().OrderBy(p => new Version(p.Version)).LastOrDefault();

    if (processor == null)
    throw new ArgumentException(string.Format("Unknown media processor", mediaProcessorName));

    return processor;

Media Services learning paths

You can view Azure Media Services learning paths here:

Provide feedback

Use the User Voice forum to provide feedback and make suggestions on how to improve Azure Media Services. You can also go directly to one of the following categories:

Next Steps

Now that you know how to get a media processor instance, go to the How to Encode an Asset topic which will show you how to use the Media Encoder Standard to encode an asset.