Skip to content

Latest commit

 

History

History
43 lines (27 loc) · 3.77 KB

encode-concept-preset-overrides.md

File metadata and controls

43 lines (27 loc) · 3.77 KB
title description author ms.service ms.topic ms.date ms.author
Using preset overrides to change transform settings on job submission
This article how to use preset overrides to adjust transform settings on a per-job instance
IngridAtMicrosoft
media-services
conceptual
01/09/2023
inhenkel

Using preset overrides to control per-job settings

[!INCLUDE media services api v3 logo]

[!INCLUDE tip-samples]

Transforms and jobs overview

To encode with Media Services v3, you need to create a Transform and a Job. The transform defines a recipe for your encoding settings and outputs; the job is an instance of the recipe. For more information, see Transforms and Jobs.

When encoding or using analytics with Media Services you can define custom presets in a transform to define what settings to use. Sometimes it is required to override the settings on a transform on a per-job basis to avoid having to create a custom transform for every scenario. To override any setting on your transform preset, you can use the preset override property of the job output asset prior to submitting the job to the transform.

Preset overrides

Preset overrides give you the ability to pass in a customized preset that will override the settings supplied to a transform object after it was created. This property is available on the job output asset when submitting a new job to a transform.

This can be useful for situations where you need to override some properties of your custom defined transforms, or a property on a built-in preset. For example, consider the scenario where you have created a custom transform that uses the audio analyzer built-in preset, but you initially set up that preset to use the audio language setting of "en-us" for English. This would result in a transform where each job submitted would be sent to the speech-to-text transcription engine as US English only. Every job submitted to that transform would be locked to the "en-us" language setting. You could work around this scenario by having a transform defined for every language, but that would be much more difficult to manage and you could hit transform quota limitations in your account. To best solve for this scenario, you use a preset override on the job output asset prior to submitting the job to the transform. You can then define a single "Audio transcription" transform and pass in the required language settings per-job.

The preset override provides you a way to pass in a new custom preset definition with each job submitted to the transform. This property is available on the job output entity in all SDK versions based off the 2021-06-01 version of the API.

For reference, see the presetOverride property on the job output entity in the REST documentation.

Note

You can only use preset overrides to override the settings on a defined preset in the transform. You cannot switch from one specific preset to another type. For example, attempting to override a transform created with the built-in content-aware encoding preset to use another preset like the audio analyzer would result in an error message.

[!INCLUDE audio-analyzer-preset-note]

Sample code

[!INCLUDE media-services-community]