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.