Search code examples
indexingazure-media-services

How do I submit an indexing job with Azure Media SDK v3.5.2


According to the Microsoft documentation, I should be able to submit a new indexing job to Azure Media Services through the SDK using the following code:

// Get a reference to the Azure Media Indexer.
string MediaProcessorName = "Azure Media Indexer",
IMediaProcessor processor = GetLatestMediaProcessorByName(MediaProcessorName);

However, as of the latest version of the SDK (3.5.2) this method is no longer available, in addition, there is a class of MediaProcessorNames, but they are currently limited to:

WindowsAzureMediaEncoder WindowsAzureMediaEncrypter WindowsAzureMediaPackager

I can't seem to find any updated documentation anywhere. How do I submit an indexing job with the new libraries?


Solution

  • After a bit more digging it appears the resources have been moved, or the documentation was missing references.

    Now, you need to include the Azure Media Services Extensions library in your project.

    From there you can do something like:

    var mediaContext = new CloudMediaContext(accountName, accessKey);
    var mediaProcessorName = "Azure Media Indexer";
    var mediaProcessor = mediaContext.Processors.GetLatestMediaProcessorByName(mediaProcessorName);