0
votes

I am trying to run some video encoding using Azure Media Encoder Standard. However, the process runs and then errors out with this vague error coming from the Task object in the state changed event:

Error code: Unknown
Error message: The given key was not present in the dictionary.

The code that queues the encoding is roughly this:

IMediaProcessor mediaProcessor = GetLatestMediaProcessorByName(context, "Media Encoder Standard");

var jobName = this._inputAsset.Name + "_EncodingJob";
var job = context.Jobs.Create(jobName);
ITask encodingTask = job.Tasks.AddNew(
this._inputAsset.Name + "_EncodingTask",
    mediaProcessor,
    "H264 Adaptive Bitrate MP4 Set 720p",
    TaskOptions.ProtectedConfiguration);
encodingTask.InputAssets.Add(this._inputAsset);
encodingTask.OutputAssets.AddNew(this._inputAsset.Name + "_EncodingOutput", AssetCreationOptions.None);

job.StateChanged += job_StateChanged;

The video I'm trying to encode is already an MP4 and the asset is created with the video blob in its container before the above code executes.

1

1 Answers

1
votes

I think that you are trying to use a Azure Media Encoder preset with Media Encoder Standard. The lists of supported presets are not the same between the two encoders.

You'll find the presets for Media Encoder Standard on this page : https://msdn.microsoft.com/en-us/library/azure/mt269960.aspx

And the presets for Azure Media Encoder on this page : https://msdn.microsoft.com/en-us/library/azure/dn619392.aspx

Hope this helps,

Julien