Microsoft.Media mediaServices/transforms 2019-05-01-preview

Bicep resource definition

The mediaServices/transforms resource type can be deployed to:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Media/mediaServices/transforms resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.Media/mediaServices/transforms@2019-05-01-preview' = {
  name: 'string'
  parent: resourceSymbolicName
  properties: {
    description: 'string'
    outputs: [
      {
        onError: 'string'
        preset: {
          '@odata.type': 'string'
          // For remaining properties, see Preset objects
        }
        relativePriority: 'string'
      }
    ]
  }
}

Preset objects

Set the @odata.type property to specify the type of object.

For #Microsoft.Media.BuiltInStandardEncoderPreset, use:

  '@odata.type': '#Microsoft.Media.BuiltInStandardEncoderPreset'
  presetName: 'string'

For #Microsoft.Media.FaceDetectorPreset, use:

  '@odata.type': '#Microsoft.Media.FaceDetectorPreset'
  resolution: 'string'

For #Microsoft.Media.StandardEncoderPreset, use:

  '@odata.type': '#Microsoft.Media.StandardEncoderPreset'
  codecs: [
    {
      label: 'string'
      '@odata.type': 'string'
      // For remaining properties, see Codec objects
    }
  ]
  filters: {
    crop: {
      height: 'string'
      left: 'string'
      top: 'string'
      width: 'string'
    }
    deinterlace: {
      mode: 'string'
      parity: 'string'
    }
    overlays: [
      {
        audioGainLevel: int
        end: 'string'
        fadeInDuration: 'string'
        fadeOutDuration: 'string'
        inputLabel: 'string'
        start: 'string'
        '@odata.type': 'string'
        // For remaining properties, see Overlay objects
      }
    ]
    rotation: 'string'
  }
  formats: [
    {
      filenamePattern: 'string'
      '@odata.type': 'string'
      // For remaining properties, see Format objects
    }
  ]

For #Microsoft.Media.VideoAnalyzerPreset, use:

  '@odata.type': '#Microsoft.Media.VideoAnalyzerPreset'
  audioLanguage: 'string'
  insightsToExtract: 'string'

Codec objects

Set the @odata.type property to specify the type of object.

For #Microsoft.Media.AacAudio, use:

  '@odata.type': '#Microsoft.Media.AacAudio'
  bitrate: int
  channels: int
  profile: 'string'
  samplingRate: int

For #Microsoft.Media.CopyAudio, use:

  '@odata.type': '#Microsoft.Media.CopyAudio'

For #Microsoft.Media.CopyVideo, use:

  '@odata.type': '#Microsoft.Media.CopyVideo'

For #Microsoft.Media.H264Video, use:

  '@odata.type': '#Microsoft.Media.H264Video'
  complexity: 'string'
  keyFrameInterval: 'string'
  layers: [
    {
      '@odata.type': 'string'
      adaptiveBFrame: bool
      bFrames: int
      bitrate: int
      bufferWindow: 'string'
      entropyMode: 'string'
      frameRate: 'string'
      height: 'string'
      label: 'string'
      level: 'string'
      maxBitrate: int
      profile: 'string'
      referenceFrames: int
      slices: int
      width: 'string'
    }
  ]
  sceneChangeDetection: bool
  stretchMode: 'string'

For #Microsoft.Media.JpgImage, use:

  '@odata.type': '#Microsoft.Media.JpgImage'
  keyFrameInterval: 'string'
  layers: [
    {
      '@odata.type': 'string'
      height: 'string'
      label: 'string'
      quality: int
      width: 'string'
    }
  ]
  range: 'string'
  start: 'string'
  step: 'string'
  stretchMode: 'string'

For #Microsoft.Media.PngImage, use:

  '@odata.type': '#Microsoft.Media.PngImage'
  keyFrameInterval: 'string'
  layers: [
    {
      '@odata.type': 'string'
      height: 'string'
      label: 'string'
      width: 'string'
    }
  ]
  range: 'string'
  start: 'string'
  step: 'string'
  stretchMode: 'string'

Overlay objects

Set the @odata.type property to specify the type of object.

For #Microsoft.Media.AudioOverlay, use:

  '@odata.type': '#Microsoft.Media.AudioOverlay'

For #Microsoft.Media.VideoOverlay, use:

  '@odata.type': '#Microsoft.Media.VideoOverlay'
  cropRectangle: {
    height: 'string'
    left: 'string'
    top: 'string'
    width: 'string'
  }
  opacity: int
  position: {
    height: 'string'
    left: 'string'
    top: 'string'
    width: 'string'
  }

Format objects

Set the @odata.type property to specify the type of object.

For #Microsoft.Media.JpgFormat, use:

  '@odata.type': '#Microsoft.Media.JpgFormat'

For #Microsoft.Media.Mp4Format, use:

  '@odata.type': '#Microsoft.Media.Mp4Format'
  outputFiles: [
    {
      labels: [
        'string'
      ]
    }
  ]

For #Microsoft.Media.PngFormat, use:

  '@odata.type': '#Microsoft.Media.PngFormat'

For #Microsoft.Media.TransportStreamFormat, use:

  '@odata.type': '#Microsoft.Media.TransportStreamFormat'
  outputFiles: [
    {
      labels: [
        'string'
      ]
    }
  ]

Property values

mediaServices/transforms

Name Description Value
name The resource name

See how to set names and types for child resources in Bicep.
string (required)
parent In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource.

For more information, see Child resource outside parent resource.
Symbolic name for resource of type: mediaServices
properties The resource properties. TransformProperties

TransformProperties

Name Description Value
description An optional verbose description of the Transform. string
outputs An array of one or more TransformOutputs that the Transform should generate. TransformOutput[] (required)

TransformOutput

Name Description Value
onError A Transform can define more than one outputs. This property defines what the service should do when one output fails - either continue to produce other outputs, or, stop the other outputs. The overall Job state will not reflect failures of outputs that are specified with 'ContinueJob'. The default is 'StopProcessingJob'. 'ContinueJob'
'StopProcessingJob'
preset Preset that describes the operations that will be used to modify, transcode, or extract insights from the source file to generate the output. Preset (required)
relativePriority Sets the relative priority of the TransformOutputs within a Transform. This sets the priority that the service uses for processing TransformOutputs. The default priority is Normal. 'High'
'Low'
'Normal'

Preset

Name Description Value
@odata.type Set the object type #Microsoft.Media.BuiltInStandardEncoderPreset
#Microsoft.Media.FaceDetectorPreset
#Microsoft.Media.StandardEncoderPreset
#Microsoft.Media.VideoAnalyzerPreset (required)

BuiltInStandardEncoderPreset

Name Description Value
@odata.type The discriminator for derived types. '#Microsoft.Media.BuiltInStandardEncoderPreset' (required)
presetName The built-in preset to be used for encoding videos. 'AACGoodQualityAudio'
'AdaptiveStreaming'
'ContentAwareEncodingExperimental'
'H264MultipleBitrate1080p'
'H264MultipleBitrate720p'
'H264MultipleBitrateSD'
'H264SingleBitrate1080p'
'H264SingleBitrate720p'
'H264SingleBitrateSD' (required)

FaceDetectorPreset

Name Description Value
@odata.type The discriminator for derived types. '#Microsoft.Media.FaceDetectorPreset' (required)
resolution Specifies the maximum resolution at which your video is analyzed. The default behavior is "SourceResolution," which will keep the input video at its original resolution when analyzed. Using "StandardDefinition" will resize input videos to standard definition while preserving the appropriate aspect ratio. It will only resize if the video is of higher resolution. For example, a 1920x1080 input would be scaled to 640x360 before processing. Switching to "StandardDefinition" will reduce the time it takes to process high resolution video. It may also reduce the cost of using this component (see https://azure.microsoft.com/pricing/details/media-services/#analytics for details). However, faces that end up being too small in the resized video may not be detected. 'SourceResolution'
'StandardDefinition'

StandardEncoderPreset

Name Description Value
@odata.type The discriminator for derived types. '#Microsoft.Media.StandardEncoderPreset' (required)
codecs The list of codecs to be used when encoding the input video. Codec[] (required)
filters One or more filtering operations that are applied to the input media before encoding. Filters
formats The list of outputs to be produced by the encoder. Format[] (required)

Codec

Name Description Value
label An optional label for the codec. The label can be used to control muxing behavior. string
@odata.type Set the object type #Microsoft.Media.AacAudio
#Microsoft.Media.CopyAudio
#Microsoft.Media.CopyVideo
#Microsoft.Media.H264Video
#Microsoft.Media.JpgImage
#Microsoft.Media.PngImage (required)

AacAudio

Name Description Value
@odata.type The discriminator for derived types. '#Microsoft.Media.AacAudio' (required)
bitrate The bitrate, in bits per second, of the output encoded audio. int
channels The number of channels in the audio. int
profile The encoding profile to be used when encoding audio with AAC. 'AacLc'
'HeAacV1'
'HeAacV2'
samplingRate The sampling rate to use for encoding in hertz. int

CopyAudio

Name Description Value
@odata.type The discriminator for derived types. '#Microsoft.Media.CopyAudio' (required)

CopyVideo

Name Description Value
@odata.type The discriminator for derived types. '#Microsoft.Media.CopyVideo' (required)

H264Video

Name Description Value
@odata.type The discriminator for derived types. '#Microsoft.Media.H264Video' (required)
complexity Tells the encoder how to choose its encoding settings. The default value is Balanced. 'Balanced'
'Quality'
'Speed'
keyFrameInterval The distance between two key frames, thereby defining a group of pictures (GOP). The value should be a non-zero integer in the range [1, 30] seconds, specified in ISO 8601 format. The default is 2 seconds (PT2S). string
layers The collection of output H.264 layers to be produced by the encoder. H264Layer[]
sceneChangeDetection Whether or not the encoder should insert key frames at scene changes. If not specified, the default is false. This flag should be set to true only when the encoder is being configured to produce a single output video. bool
stretchMode The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize 'AutoFit'
'AutoSize'
'None'

H264Layer

Name Description Value
@odata.type The discriminator for derived types. string (required)
adaptiveBFrame Whether or not adaptive B-frames are to be used when encoding this layer. If not specified, the encoder will turn it on whenever the video profile permits its use. bool
bFrames The number of B-frames to be used when encoding this layer. If not specified, the encoder chooses an appropriate number based on the video profile and level. int
bitrate The average bitrate in bits per second at which to encode the input video when generating this layer. This is a required field. int (required)
bufferWindow The VBV buffer window length. The value should be in ISO 8601 format. The value should be in the range [0.1-100] seconds. The default is 5 seconds (for example, PT5S). string
entropyMode The entropy mode to be used for this layer. If not specified, the encoder chooses the mode that is appropriate for the profile and level. 'Cabac'
'Cavlc'
frameRate The frame rate (in frames per second) at which to encode this layer. The value can be in the form of M/N where M and N are integers (For example, 30000/1001), or in the form of a number (For example, 30, or 29.97). The encoder enforces constraints on allowed frame rates based on the profile and level. If it is not specified, the encoder will use the same frame rate as the input video. string
height The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in height as the input. string
label The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming the output file. string
level We currently support Level up to 6.2. The value can be Auto, or a number that matches the H.264 profile. If not specified, the default is Auto, which lets the encoder choose the Level that is appropriate for this layer. string
maxBitrate The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill. If not specified, defaults to the same value as bitrate. int
profile We currently support Baseline, Main, High, High422, High444. Default is Auto. 'Auto'
'Baseline'
'High'
'High422'
'High444'
'Main'
referenceFrames The number of reference frames to be used when encoding this layer. If not specified, the encoder determines an appropriate number based on the encoder complexity setting. int
slices The number of slices to be used when encoding this layer. If not specified, default is zero, which means that encoder will use a single slice for each frame. int
width The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in width as the input. string

JpgImage

Name Description Value
@odata.type The discriminator for derived types. '#Microsoft.Media.JpgImage' (required)
keyFrameInterval The distance between two key frames, thereby defining a group of pictures (GOP). The value should be a non-zero integer in the range [1, 30] seconds, specified in ISO 8601 format. The default is 2 seconds (PT2S). string
layers A collection of output JPEG image layers to be produced by the encoder. JpgLayer[]
range The position in the input video at which to stop generating thumbnails. The value can be in absolute timestamp (ISO 8601, e.g: PT5M30S to stop at 5 minutes and 30 seconds), or a frame count (For example, 300 to stop at the 300th frame), or a relative value (For example, 100%). string
start The position in the input video from where to start generating thumbnails. The value can be in absolute timestamp (ISO 8601, e.g: PT05S), or a frame count (For example, 10 for the 10th frame), or a relative value (For example, 1%). Also supports a macro {Best}, which tells the encoder to select the best thumbnail from the first few seconds of the video. string (required)
step The intervals at which thumbnails are generated. The value can be in absolute timestamp (ISO 8601, e.g: PT05S for one image every 5 seconds), or a frame count (For example, 30 for every 30 frames), or a relative value (For example, 1%). string
stretchMode The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize 'AutoFit'
'AutoSize'
'None'

JpgLayer

Name Description Value
@odata.type The discriminator for derived types. string (required)
height The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in height as the input. string
label The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming the output file. string
quality The compression quality of the JPEG output. Range is from 0-100 and the default is 70. int
width The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in width as the input. string

PngImage

Name Description Value
@odata.type The discriminator for derived types. '#Microsoft.Media.PngImage' (required)
keyFrameInterval The distance between two key frames, thereby defining a group of pictures (GOP). The value should be a non-zero integer in the range [1, 30] seconds, specified in ISO 8601 format. The default is 2 seconds (PT2S). string
layers A collection of output PNG image layers to be produced by the encoder. PngLayer[]
range The position in the input video at which to stop generating thumbnails. The value can be in absolute timestamp (ISO 8601, e.g: PT5M30S to stop at 5 minutes and 30 seconds), or a frame count (For example, 300 to stop at the 300th frame), or a relative value (For example, 100%). string
start The position in the input video from where to start generating thumbnails. The value can be in absolute timestamp (ISO 8601, e.g: PT05S), or a frame count (For example, 10 for the 10th frame), or a relative value (For example, 1%). Also supports a macro {Best}, which tells the encoder to select the best thumbnail from the first few seconds of the video. string (required)
step The intervals at which thumbnails are generated. The value can be in absolute timestamp (ISO 8601, e.g: PT05S for one image every 5 seconds), or a frame count (For example, 30 for every 30 frames), or a relative value (For example, 1%). string
stretchMode The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize 'AutoFit'
'AutoSize'
'None'

PngLayer

Name Description Value
@odata.type The discriminator for derived types. string (required)
height The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in height as the input. string
label The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming the output file. string
width The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in width as the input. string

Filters

Name Description Value
crop The parameters for the rectangular window with which to crop the input video. Rectangle
deinterlace The de-interlacing settings. Deinterlace
overlays The properties of overlays to be applied to the input video. These could be audio, image or video overlays. Overlay[]
rotation The rotation, if any, to be applied to the input video, before it is encoded. Default is Auto 'Auto'
'None'
'Rotate0'
'Rotate180'
'Rotate270'
'Rotate90'

Rectangle

Name Description Value
height The height of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%). string
left The number of pixels from the left-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%). string
top The number of pixels from the top-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%). string
width The width of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%). string

Deinterlace

Name Description Value
mode The deinterlacing mode. Defaults to AutoPixelAdaptive. 'AutoPixelAdaptive'
'Off'
parity The field parity for de-interlacing, defaults to Auto. 'Auto'
'BottomFieldFirst'
'TopFieldFirst'

Overlay

Name Description Value
audioGainLevel The gain level of audio in the overlay. The value should be in the range [0, 1.0]. The default is 1.0. int
end The position in the input video at which the overlay ends. The value should be in ISO 8601 duration format. For example, PT30S to end the overlay at 30 seconds in to the input video. If not specified the overlay will be applied until the end of the input video if inputLoop is true. Else, if inputLoop is false, then overlay will last as long as the duration of the overlay media. string
fadeInDuration The duration over which the overlay fades in onto the input video. The value should be in ISO 8601 duration format. If not specified the default behavior is to have no fade in (same as PT0S). string
fadeOutDuration The duration over which the overlay fades out of the input video. The value should be in ISO 8601 duration format. If not specified the default behavior is to have no fade out (same as PT0S). string
inputLabel The label of the job input which is to be used as an overlay. The Input must specify exactly one file. You can specify an image file in JPG or PNG formats, or an audio file (such as a WAV, MP3, WMA or M4A file), or a video file. See https://aka.ms/mesformats for the complete list of supported audio and video file formats. string (required)
start The start position, with reference to the input video, at which the overlay starts. The value should be in ISO 8601 format. For example, PT05S to start the overlay at 5 seconds in to the input video. If not specified the overlay starts from the beginning of the input video. string
@odata.type Set the object type #Microsoft.Media.AudioOverlay
#Microsoft.Media.VideoOverlay (required)

AudioOverlay

Name Description Value
@odata.type The discriminator for derived types. '#Microsoft.Media.AudioOverlay' (required)

VideoOverlay

Name Description Value
@odata.type The discriminator for derived types. '#Microsoft.Media.VideoOverlay' (required)
cropRectangle An optional rectangular window used to crop the overlay image or video. Rectangle
opacity The opacity of the overlay. This is a value in the range [0 - 1.0]. Default is 1.0 which mean the overlay is opaque. int
position The location in the input video where the overlay is applied. Rectangle

Format

Name Description Value
filenamePattern The pattern of the file names for the generated output files. The following macros are supported in the file name: {Basename} - The base name of the input video {Extension} - The appropriate extension for this format. {Label} - The label assigned to the codec/layer. {Index} - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to thumbnails. {Codec} - The type of the audio/video codec. Any unsubstituted macros will be collapsed and removed from the filename. string (required)
@odata.type Set the object type #Microsoft.Media.JpgFormat
#Microsoft.Media.Mp4Format
#Microsoft.Media.PngFormat
#Microsoft.Media.TransportStreamFormat (required)

JpgFormat

Name Description Value
@odata.type The discriminator for derived types. '#Microsoft.Media.JpgFormat' (required)

Mp4Format

Name Description Value
@odata.type The discriminator for derived types. '#Microsoft.Media.Mp4Format' (required)
outputFiles The list of output files to produce. Each entry in the list is a set of audio and video layer labels to be muxed together . OutputFile[]

OutputFile

Name Description Value
labels The list of labels that describe how the encoder should multiplex video and audio into an output file. For example, if the encoder is producing two video layers with labels v1 and v2, and one audio layer with label a1, then an array like '[v1, a1]' tells the encoder to produce an output file with the video track represented by v1 and the audio track represented by a1. string[] (required)

PngFormat

Name Description Value
@odata.type The discriminator for derived types. '#Microsoft.Media.PngFormat' (required)

TransportStreamFormat

Name Description Value
@odata.type The discriminator for derived types. '#Microsoft.Media.TransportStreamFormat' (required)
outputFiles The list of output files to produce. Each entry in the list is a set of audio and video layer labels to be muxed together . OutputFile[]

VideoAnalyzerPreset

Name Description Value
@odata.type The discriminator for derived types. '#Microsoft.Media.VideoAnalyzerPreset' (required)
audioLanguage The language for the audio payload in the input using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). The list of supported languages are English ('en-US' and 'en-GB'), Spanish ('es-ES' and 'es-MX'), French ('fr-FR'), Italian ('it-IT'), Japanese ('ja-JP'), Portuguese ('pt-BR'), Chinese ('zh-CN'), German ('de-DE'), Arabic ('ar-EG' and 'ar-SY'), Russian ('ru-RU'), Hindi ('hi-IN'), and Korean ('ko-KR'). If you know the language of your content, it is recommended that you specify it. If the language isn't specified or set to null, automatic language detection will choose the first language detected and process with the selected language for the duration of the file. This language detection feature currently supports English, Chinese, French, German, Italian, Japanese, Spanish, Russian, and Portuguese. It does not currently support dynamically switching between languages after the first language is detected. The automatic detection works best with audio recordings with clearly discernable speech. If automatic detection fails to find the language, transcription would fallback to 'en-US'." string
insightsToExtract Defines the type of insights that you want the service to generate. The allowed values are 'AudioInsightsOnly', 'VideoInsightsOnly', and 'AllInsights'. The default is AllInsights. If you set this to AllInsights and the input is audio only, then only audio insights are generated. Similarly if the input is video only, then only video insights are generated. It is recommended that you not use AudioInsightsOnly if you expect some of your inputs to be video only; or use VideoInsightsOnly if you expect some of your inputs to be audio only. Your Jobs in such conditions would error out. 'AllInsights'
'AudioInsightsOnly'
'VideoInsightsOnly'

ARM template resource definition

The mediaServices/transforms resource type can be deployed to:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Media/mediaServices/transforms resource, add the following JSON to your template.

{
  "type": "Microsoft.Media/mediaServices/transforms",
  "apiVersion": "2019-05-01-preview",
  "name": "string",
  "properties": {
    "description": "string",
    "outputs": [
      {
        "onError": "string",
        "preset": {
          "@odata.type": "string"
          // For remaining properties, see Preset objects
        },
        "relativePriority": "string"
      }
    ]
  }
}

Preset objects

Set the @odata.type property to specify the type of object.

For #Microsoft.Media.BuiltInStandardEncoderPreset, use:

  "@odata.type": "#Microsoft.Media.BuiltInStandardEncoderPreset",
  "presetName": "string"

For #Microsoft.Media.FaceDetectorPreset, use:

  "@odata.type": "#Microsoft.Media.FaceDetectorPreset",
  "resolution": "string"

For #Microsoft.Media.StandardEncoderPreset, use:

  "@odata.type": "#Microsoft.Media.StandardEncoderPreset",
  "codecs": [
    {
      "label": "string",
      "@odata.type": "string"
      // For remaining properties, see Codec objects
    }
  ],
  "filters": {
    "crop": {
      "height": "string",
      "left": "string",
      "top": "string",
      "width": "string"
    },
    "deinterlace": {
      "mode": "string",
      "parity": "string"
    },
    "overlays": [
      {
        "audioGainLevel": "int",
        "end": "string",
        "fadeInDuration": "string",
        "fadeOutDuration": "string",
        "inputLabel": "string",
        "start": "string",
        "@odata.type": "string"
        // For remaining properties, see Overlay objects
      }
    ],
    "rotation": "string"
  },
  "formats": [
    {
      "filenamePattern": "string",
      "@odata.type": "string"
      // For remaining properties, see Format objects
    }
  ]

For #Microsoft.Media.VideoAnalyzerPreset, use:

  "@odata.type": "#Microsoft.Media.VideoAnalyzerPreset",
  "audioLanguage": "string",
  "insightsToExtract": "string"

Codec objects

Set the @odata.type property to specify the type of object.

For #Microsoft.Media.AacAudio, use:

  "@odata.type": "#Microsoft.Media.AacAudio",
  "bitrate": "int",
  "channels": "int",
  "profile": "string",
  "samplingRate": "int"

For #Microsoft.Media.CopyAudio, use:

  "@odata.type": "#Microsoft.Media.CopyAudio"

For #Microsoft.Media.CopyVideo, use:

  "@odata.type": "#Microsoft.Media.CopyVideo"

For #Microsoft.Media.H264Video, use:

  "@odata.type": "#Microsoft.Media.H264Video",
  "complexity": "string",
  "keyFrameInterval": "string",
  "layers": [
    {
      "@odata.type": "string",
      "adaptiveBFrame": "bool",
      "bFrames": "int",
      "bitrate": "int",
      "bufferWindow": "string",
      "entropyMode": "string",
      "frameRate": "string",
      "height": "string",
      "label": "string",
      "level": "string",
      "maxBitrate": "int",
      "profile": "string",
      "referenceFrames": "int",
      "slices": "int",
      "width": "string"
    }
  ],
  "sceneChangeDetection": "bool",
  "stretchMode": "string"

For #Microsoft.Media.JpgImage, use:

  "@odata.type": "#Microsoft.Media.JpgImage",
  "keyFrameInterval": "string",
  "layers": [
    {
      "@odata.type": "string",
      "height": "string",
      "label": "string",
      "quality": "int",
      "width": "string"
    }
  ],
  "range": "string",
  "start": "string",
  "step": "string",
  "stretchMode": "string"

For #Microsoft.Media.PngImage, use:

  "@odata.type": "#Microsoft.Media.PngImage",
  "keyFrameInterval": "string",
  "layers": [
    {
      "@odata.type": "string",
      "height": "string",
      "label": "string",
      "width": "string"
    }
  ],
  "range": "string",
  "start": "string",
  "step": "string",
  "stretchMode": "string"

Overlay objects

Set the @odata.type property to specify the type of object.

For #Microsoft.Media.AudioOverlay, use:

  "@odata.type": "#Microsoft.Media.AudioOverlay"

For #Microsoft.Media.VideoOverlay, use:

  "@odata.type": "#Microsoft.Media.VideoOverlay",
  "cropRectangle": {
    "height": "string",
    "left": "string",
    "top": "string",
    "width": "string"
  },
  "opacity": "int",
  "position": {
    "height": "string",
    "left": "string",
    "top": "string",
    "width": "string"
  }

Format objects

Set the @odata.type property to specify the type of object.

For #Microsoft.Media.JpgFormat, use:

  "@odata.type": "#Microsoft.Media.JpgFormat"

For #Microsoft.Media.Mp4Format, use:

  "@odata.type": "#Microsoft.Media.Mp4Format",
  "outputFiles": [
    {
      "labels": [ "string" ]
    }
  ]

For #Microsoft.Media.PngFormat, use:

  "@odata.type": "#Microsoft.Media.PngFormat"

For #Microsoft.Media.TransportStreamFormat, use:

  "@odata.type": "#Microsoft.Media.TransportStreamFormat",
  "outputFiles": [
    {
      "labels": [ "string" ]
    }
  ]

Property values

mediaServices/transforms

Name Description Value
type The resource type 'Microsoft.Media/mediaServices/transforms'
apiVersion The resource api version '2019-05-01-preview'
name The resource name

See how to set names and types for child resources in JSON ARM templates.
string (required)
properties The resource properties. TransformProperties

TransformProperties

Name Description Value
description An optional verbose description of the Transform. string
outputs An array of one or more TransformOutputs that the Transform should generate. TransformOutput[] (required)

TransformOutput

Name Description Value
onError A Transform can define more than one outputs. This property defines what the service should do when one output fails - either continue to produce other outputs, or, stop the other outputs. The overall Job state will not reflect failures of outputs that are specified with 'ContinueJob'. The default is 'StopProcessingJob'. 'ContinueJob'
'StopProcessingJob'
preset Preset that describes the operations that will be used to modify, transcode, or extract insights from the source file to generate the output. Preset (required)
relativePriority Sets the relative priority of the TransformOutputs within a Transform. This sets the priority that the service uses for processing TransformOutputs. The default priority is Normal. 'High'
'Low'
'Normal'

Preset

Name Description Value
@odata.type Set the object type #Microsoft.Media.BuiltInStandardEncoderPreset
#Microsoft.Media.FaceDetectorPreset
#Microsoft.Media.StandardEncoderPreset
#Microsoft.Media.VideoAnalyzerPreset (required)

BuiltInStandardEncoderPreset

Name Description Value
@odata.type The discriminator for derived types. '#Microsoft.Media.BuiltInStandardEncoderPreset' (required)
presetName The built-in preset to be used for encoding videos. 'AACGoodQualityAudio'
'AdaptiveStreaming'
'ContentAwareEncodingExperimental'
'H264MultipleBitrate1080p'
'H264MultipleBitrate720p'
'H264MultipleBitrateSD'
'H264SingleBitrate1080p'
'H264SingleBitrate720p'
'H264SingleBitrateSD' (required)

FaceDetectorPreset

Name Description Value
@odata.type The discriminator for derived types. '#Microsoft.Media.FaceDetectorPreset' (required)
resolution Specifies the maximum resolution at which your video is analyzed. The default behavior is "SourceResolution," which will keep the input video at its original resolution when analyzed. Using "StandardDefinition" will resize input videos to standard definition while preserving the appropriate aspect ratio. It will only resize if the video is of higher resolution. For example, a 1920x1080 input would be scaled to 640x360 before processing. Switching to "StandardDefinition" will reduce the time it takes to process high resolution video. It may also reduce the cost of using this component (see https://azure.microsoft.com/pricing/details/media-services/#analytics for details). However, faces that end up being too small in the resized video may not be detected. 'SourceResolution'
'StandardDefinition'

StandardEncoderPreset

Name Description Value
@odata.type The discriminator for derived types. '#Microsoft.Media.StandardEncoderPreset' (required)
codecs The list of codecs to be used when encoding the input video. Codec[] (required)
filters One or more filtering operations that are applied to the input media before encoding. Filters
formats The list of outputs to be produced by the encoder. Format[] (required)

Codec

Name Description Value
label An optional label for the codec. The label can be used to control muxing behavior. string
@odata.type Set the object type #Microsoft.Media.AacAudio
#Microsoft.Media.CopyAudio
#Microsoft.Media.CopyVideo
#Microsoft.Media.H264Video
#Microsoft.Media.JpgImage
#Microsoft.Media.PngImage (required)

AacAudio

Name Description Value
@odata.type The discriminator for derived types. '#Microsoft.Media.AacAudio' (required)
bitrate The bitrate, in bits per second, of the output encoded audio. int
channels The number of channels in the audio. int
profile The encoding profile to be used when encoding audio with AAC. 'AacLc'
'HeAacV1'
'HeAacV2'
samplingRate The sampling rate to use for encoding in hertz. int

CopyAudio

Name Description Value
@odata.type The discriminator for derived types. '#Microsoft.Media.CopyAudio' (required)

CopyVideo

Name Description Value
@odata.type The discriminator for derived types. '#Microsoft.Media.CopyVideo' (required)

H264Video

Name Description Value
@odata.type The discriminator for derived types. '#Microsoft.Media.H264Video' (required)
complexity Tells the encoder how to choose its encoding settings. The default value is Balanced. 'Balanced'
'Quality'
'Speed'
keyFrameInterval The distance between two key frames, thereby defining a group of pictures (GOP). The value should be a non-zero integer in the range [1, 30] seconds, specified in ISO 8601 format. The default is 2 seconds (PT2S). string
layers The collection of output H.264 layers to be produced by the encoder. H264Layer[]
sceneChangeDetection Whether or not the encoder should insert key frames at scene changes. If not specified, the default is false. This flag should be set to true only when the encoder is being configured to produce a single output video. bool
stretchMode The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize 'AutoFit'
'AutoSize'
'None'

H264Layer

Name Description Value
@odata.type The discriminator for derived types. string (required)
adaptiveBFrame Whether or not adaptive B-frames are to be used when encoding this layer. If not specified, the encoder will turn it on whenever the video profile permits its use. bool
bFrames The number of B-frames to be used when encoding this layer. If not specified, the encoder chooses an appropriate number based on the video profile and level. int
bitrate The average bitrate in bits per second at which to encode the input video when generating this layer. This is a required field. int (required)
bufferWindow The VBV buffer window length. The value should be in ISO 8601 format. The value should be in the range [0.1-100] seconds. The default is 5 seconds (for example, PT5S). string
entropyMode The entropy mode to be used for this layer. If not specified, the encoder chooses the mode that is appropriate for the profile and level. 'Cabac'
'Cavlc'
frameRate The frame rate (in frames per second) at which to encode this layer. The value can be in the form of M/N where M and N are integers (For example, 30000/1001), or in the form of a number (For example, 30, or 29.97). The encoder enforces constraints on allowed frame rates based on the profile and level. If it is not specified, the encoder will use the same frame rate as the input video. string
height The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in height as the input. string
label The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming the output file. string
level We currently support Level up to 6.2. The value can be Auto, or a number that matches the H.264 profile. If not specified, the default is Auto, which lets the encoder choose the Level that is appropriate for this layer. string
maxBitrate The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill. If not specified, defaults to the same value as bitrate. int
profile We currently support Baseline, Main, High, High422, High444. Default is Auto. 'Auto'
'Baseline'
'High'
'High422'
'High444'
'Main'
referenceFrames The number of reference frames to be used when encoding this layer. If not specified, the encoder determines an appropriate number based on the encoder complexity setting. int
slices The number of slices to be used when encoding this layer. If not specified, default is zero, which means that encoder will use a single slice for each frame. int
width The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in width as the input. string

JpgImage

Name Description Value
@odata.type The discriminator for derived types. '#Microsoft.Media.JpgImage' (required)
keyFrameInterval The distance between two key frames, thereby defining a group of pictures (GOP). The value should be a non-zero integer in the range [1, 30] seconds, specified in ISO 8601 format. The default is 2 seconds (PT2S). string
layers A collection of output JPEG image layers to be produced by the encoder. JpgLayer[]
range The position in the input video at which to stop generating thumbnails. The value can be in absolute timestamp (ISO 8601, e.g: PT5M30S to stop at 5 minutes and 30 seconds), or a frame count (For example, 300 to stop at the 300th frame), or a relative value (For example, 100%). string
start The position in the input video from where to start generating thumbnails. The value can be in absolute timestamp (ISO 8601, e.g: PT05S), or a frame count (For example, 10 for the 10th frame), or a relative value (For example, 1%). Also supports a macro {Best}, which tells the encoder to select the best thumbnail from the first few seconds of the video. string (required)
step The intervals at which thumbnails are generated. The value can be in absolute timestamp (ISO 8601, e.g: PT05S for one image every 5 seconds), or a frame count (For example, 30 for every 30 frames), or a relative value (For example, 1%). string
stretchMode The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize 'AutoFit'
'AutoSize'
'None'

JpgLayer

Name Description Value
@odata.type The discriminator for derived types. string (required)
height The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in height as the input. string
label The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming the output file. string
quality The compression quality of the JPEG output. Range is from 0-100 and the default is 70. int
width The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in width as the input. string

PngImage

Name Description Value
@odata.type The discriminator for derived types. '#Microsoft.Media.PngImage' (required)
keyFrameInterval The distance between two key frames, thereby defining a group of pictures (GOP). The value should be a non-zero integer in the range [1, 30] seconds, specified in ISO 8601 format. The default is 2 seconds (PT2S). string
layers A collection of output PNG image layers to be produced by the encoder. PngLayer[]
range The position in the input video at which to stop generating thumbnails. The value can be in absolute timestamp (ISO 8601, e.g: PT5M30S to stop at 5 minutes and 30 seconds), or a frame count (For example, 300 to stop at the 300th frame), or a relative value (For example, 100%). string
start The position in the input video from where to start generating thumbnails. The value can be in absolute timestamp (ISO 8601, e.g: PT05S), or a frame count (For example, 10 for the 10th frame), or a relative value (For example, 1%). Also supports a macro {Best}, which tells the encoder to select the best thumbnail from the first few seconds of the video. string (required)
step The intervals at which thumbnails are generated. The value can be in absolute timestamp (ISO 8601, e.g: PT05S for one image every 5 seconds), or a frame count (For example, 30 for every 30 frames), or a relative value (For example, 1%). string
stretchMode The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize 'AutoFit'
'AutoSize'
'None'

PngLayer

Name Description Value
@odata.type The discriminator for derived types. string (required)
height The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in height as the input. string
label The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming the output file. string
width The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in width as the input. string

Filters

Name Description Value
crop The parameters for the rectangular window with which to crop the input video. Rectangle
deinterlace The de-interlacing settings. Deinterlace
overlays The properties of overlays to be applied to the input video. These could be audio, image or video overlays. Overlay[]
rotation The rotation, if any, to be applied to the input video, before it is encoded. Default is Auto 'Auto'
'None'
'Rotate0'
'Rotate180'
'Rotate270'
'Rotate90'

Rectangle

Name Description Value
height The height of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%). string
left The number of pixels from the left-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%). string
top The number of pixels from the top-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%). string
width The width of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%). string

Deinterlace

Name Description Value
mode The deinterlacing mode. Defaults to AutoPixelAdaptive. 'AutoPixelAdaptive'
'Off'
parity The field parity for de-interlacing, defaults to Auto. 'Auto'
'BottomFieldFirst'
'TopFieldFirst'

Overlay

Name Description Value
audioGainLevel The gain level of audio in the overlay. The value should be in the range [0, 1.0]. The default is 1.0. int
end The position in the input video at which the overlay ends. The value should be in ISO 8601 duration format. For example, PT30S to end the overlay at 30 seconds in to the input video. If not specified the overlay will be applied until the end of the input video if inputLoop is true. Else, if inputLoop is false, then overlay will last as long as the duration of the overlay media. string
fadeInDuration The duration over which the overlay fades in onto the input video. The value should be in ISO 8601 duration format. If not specified the default behavior is to have no fade in (same as PT0S). string
fadeOutDuration The duration over which the overlay fades out of the input video. The value should be in ISO 8601 duration format. If not specified the default behavior is to have no fade out (same as PT0S). string
inputLabel The label of the job input which is to be used as an overlay. The Input must specify exactly one file. You can specify an image file in JPG or PNG formats, or an audio file (such as a WAV, MP3, WMA or M4A file), or a video file. See https://aka.ms/mesformats for the complete list of supported audio and video file formats. string (required)
start The start position, with reference to the input video, at which the overlay starts. The value should be in ISO 8601 format. For example, PT05S to start the overlay at 5 seconds in to the input video. If not specified the overlay starts from the beginning of the input video. string
@odata.type Set the object type #Microsoft.Media.AudioOverlay
#Microsoft.Media.VideoOverlay (required)

AudioOverlay

Name Description Value
@odata.type The discriminator for derived types. '#Microsoft.Media.AudioOverlay' (required)

VideoOverlay

Name Description Value
@odata.type The discriminator for derived types. '#Microsoft.Media.VideoOverlay' (required)
cropRectangle An optional rectangular window used to crop the overlay image or video. Rectangle
opacity The opacity of the overlay. This is a value in the range [0 - 1.0]. Default is 1.0 which mean the overlay is opaque. int
position The location in the input video where the overlay is applied. Rectangle

Format

Name Description Value
filenamePattern The pattern of the file names for the generated output files. The following macros are supported in the file name: {Basename} - The base name of the input video {Extension} - The appropriate extension for this format. {Label} - The label assigned to the codec/layer. {Index} - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to thumbnails. {Codec} - The type of the audio/video codec. Any unsubstituted macros will be collapsed and removed from the filename. string (required)
@odata.type Set the object type #Microsoft.Media.JpgFormat
#Microsoft.Media.Mp4Format
#Microsoft.Media.PngFormat
#Microsoft.Media.TransportStreamFormat (required)

JpgFormat

Name Description Value
@odata.type The discriminator for derived types. '#Microsoft.Media.JpgFormat' (required)

Mp4Format

Name Description Value
@odata.type The discriminator for derived types. '#Microsoft.Media.Mp4Format' (required)
outputFiles The list of output files to produce. Each entry in the list is a set of audio and video layer labels to be muxed together . OutputFile[]

OutputFile

Name Description Value
labels The list of labels that describe how the encoder should multiplex video and audio into an output file. For example, if the encoder is producing two video layers with labels v1 and v2, and one audio layer with label a1, then an array like '[v1, a1]' tells the encoder to produce an output file with the video track represented by v1 and the audio track represented by a1. string[] (required)

PngFormat

Name Description Value
@odata.type The discriminator for derived types. '#Microsoft.Media.PngFormat' (required)

TransportStreamFormat

Name Description Value
@odata.type The discriminator for derived types. '#Microsoft.Media.TransportStreamFormat' (required)
outputFiles The list of output files to produce. Each entry in the list is a set of audio and video layer labels to be muxed together . OutputFile[]

VideoAnalyzerPreset

Name Description Value
@odata.type The discriminator for derived types. '#Microsoft.Media.VideoAnalyzerPreset' (required)
audioLanguage The language for the audio payload in the input using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). The list of supported languages are English ('en-US' and 'en-GB'), Spanish ('es-ES' and 'es-MX'), French ('fr-FR'), Italian ('it-IT'), Japanese ('ja-JP'), Portuguese ('pt-BR'), Chinese ('zh-CN'), German ('de-DE'), Arabic ('ar-EG' and 'ar-SY'), Russian ('ru-RU'), Hindi ('hi-IN'), and Korean ('ko-KR'). If you know the language of your content, it is recommended that you specify it. If the language isn't specified or set to null, automatic language detection will choose the first language detected and process with the selected language for the duration of the file. This language detection feature currently supports English, Chinese, French, German, Italian, Japanese, Spanish, Russian, and Portuguese. It does not currently support dynamically switching between languages after the first language is detected. The automatic detection works best with audio recordings with clearly discernable speech. If automatic detection fails to find the language, transcription would fallback to 'en-US'." string
insightsToExtract Defines the type of insights that you want the service to generate. The allowed values are 'AudioInsightsOnly', 'VideoInsightsOnly', and 'AllInsights'. The default is AllInsights. If you set this to AllInsights and the input is audio only, then only audio insights are generated. Similarly if the input is video only, then only video insights are generated. It is recommended that you not use AudioInsightsOnly if you expect some of your inputs to be video only; or use VideoInsightsOnly if you expect some of your inputs to be audio only. Your Jobs in such conditions would error out. 'AllInsights'
'AudioInsightsOnly'
'VideoInsightsOnly'

Terraform (AzAPI provider) resource definition

The mediaServices/transforms resource type can be deployed to:

  • Resource groups

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Media/mediaServices/transforms resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Media/mediaServices/transforms@2019-05-01-preview"
  name = "string"
  parent_id = "string"
  body = jsonencode({
    properties = {
      description = "string"
      outputs = [
        {
          onError = "string"
          preset = {
            @odata.type = "string"
            // For remaining properties, see Preset objects
          }
          relativePriority = "string"
        }
      ]
    }
  })
}

Preset objects

Set the @odata.type property to specify the type of object.

For #Microsoft.Media.BuiltInStandardEncoderPreset, use:

  @odata.type = "#Microsoft.Media.BuiltInStandardEncoderPreset"
  presetName = "string"

For #Microsoft.Media.FaceDetectorPreset, use:

  @odata.type = "#Microsoft.Media.FaceDetectorPreset"
  resolution = "string"

For #Microsoft.Media.StandardEncoderPreset, use:

  @odata.type = "#Microsoft.Media.StandardEncoderPreset"
  codecs = [
    {
      label = "string"
      @odata.type = "string"
      // For remaining properties, see Codec objects
    }
  ]
  filters = {
    crop = {
      height = "string"
      left = "string"
      top = "string"
      width = "string"
    }
    deinterlace = {
      mode = "string"
      parity = "string"
    }
    overlays = [
      {
        audioGainLevel = int
        end = "string"
        fadeInDuration = "string"
        fadeOutDuration = "string"
        inputLabel = "string"
        start = "string"
        @odata.type = "string"
        // For remaining properties, see Overlay objects
      }
    ]
    rotation = "string"
  }
  formats = [
    {
      filenamePattern = "string"
      @odata.type = "string"
      // For remaining properties, see Format objects
    }
  ]

For #Microsoft.Media.VideoAnalyzerPreset, use:

  @odata.type = "#Microsoft.Media.VideoAnalyzerPreset"
  audioLanguage = "string"
  insightsToExtract = "string"

Codec objects

Set the @odata.type property to specify the type of object.

For #Microsoft.Media.AacAudio, use:

  @odata.type = "#Microsoft.Media.AacAudio"
  bitrate = int
  channels = int
  profile = "string"
  samplingRate = int

For #Microsoft.Media.CopyAudio, use:

  @odata.type = "#Microsoft.Media.CopyAudio"

For #Microsoft.Media.CopyVideo, use:

  @odata.type = "#Microsoft.Media.CopyVideo"

For #Microsoft.Media.H264Video, use:

  @odata.type = "#Microsoft.Media.H264Video"
  complexity = "string"
  keyFrameInterval = "string"
  layers = [
    {
      @odata.type = "string"
      adaptiveBFrame = bool
      bFrames = int
      bitrate = int
      bufferWindow = "string"
      entropyMode = "string"
      frameRate = "string"
      height = "string"
      label = "string"
      level = "string"
      maxBitrate = int
      profile = "string"
      referenceFrames = int
      slices = int
      width = "string"
    }
  ]
  sceneChangeDetection = bool
  stretchMode = "string"

For #Microsoft.Media.JpgImage, use:

  @odata.type = "#Microsoft.Media.JpgImage"
  keyFrameInterval = "string"
  layers = [
    {
      @odata.type = "string"
      height = "string"
      label = "string"
      quality = int
      width = "string"
    }
  ]
  range = "string"
  start = "string"
  step = "string"
  stretchMode = "string"

For #Microsoft.Media.PngImage, use:

  @odata.type = "#Microsoft.Media.PngImage"
  keyFrameInterval = "string"
  layers = [
    {
      @odata.type = "string"
      height = "string"
      label = "string"
      width = "string"
    }
  ]
  range = "string"
  start = "string"
  step = "string"
  stretchMode = "string"

Overlay objects

Set the @odata.type property to specify the type of object.

For #Microsoft.Media.AudioOverlay, use:

  @odata.type = "#Microsoft.Media.AudioOverlay"

For #Microsoft.Media.VideoOverlay, use:

  @odata.type = "#Microsoft.Media.VideoOverlay"
  cropRectangle = {
    height = "string"
    left = "string"
    top = "string"
    width = "string"
  }
  opacity = int
  position = {
    height = "string"
    left = "string"
    top = "string"
    width = "string"
  }

Format objects

Set the @odata.type property to specify the type of object.

For #Microsoft.Media.JpgFormat, use:

  @odata.type = "#Microsoft.Media.JpgFormat"

For #Microsoft.Media.Mp4Format, use:

  @odata.type = "#Microsoft.Media.Mp4Format"
  outputFiles = [
    {
      labels = [
        "string"
      ]
    }
  ]

For #Microsoft.Media.PngFormat, use:

  @odata.type = "#Microsoft.Media.PngFormat"

For #Microsoft.Media.TransportStreamFormat, use:

  @odata.type = "#Microsoft.Media.TransportStreamFormat"
  outputFiles = [
    {
      labels = [
        "string"
      ]
    }
  ]

Property values

mediaServices/transforms

Name Description Value
type The resource type "Microsoft.Media/mediaServices/transforms@2019-05-01-preview"
name The resource name string (required)
parent_id The ID of the resource that is the parent for this resource. ID for resource of type: mediaServices
properties The resource properties. TransformProperties

TransformProperties

Name Description Value
description An optional verbose description of the Transform. string
outputs An array of one or more TransformOutputs that the Transform should generate. TransformOutput[] (required)

TransformOutput

Name Description Value
onError A Transform can define more than one outputs. This property defines what the service should do when one output fails - either continue to produce other outputs, or, stop the other outputs. The overall Job state will not reflect failures of outputs that are specified with 'ContinueJob'. The default is 'StopProcessingJob'. "ContinueJob"
"StopProcessingJob"
preset Preset that describes the operations that will be used to modify, transcode, or extract insights from the source file to generate the output. Preset (required)
relativePriority Sets the relative priority of the TransformOutputs within a Transform. This sets the priority that the service uses for processing TransformOutputs. The default priority is Normal. "High"
"Low"
"Normal"

Preset

Name Description Value
@odata.type Set the object type #Microsoft.Media.BuiltInStandardEncoderPreset
#Microsoft.Media.FaceDetectorPreset
#Microsoft.Media.StandardEncoderPreset
#Microsoft.Media.VideoAnalyzerPreset (required)

BuiltInStandardEncoderPreset

Name Description Value
@odata.type The discriminator for derived types. "#Microsoft.Media.BuiltInStandardEncoderPreset" (required)
presetName The built-in preset to be used for encoding videos. "AACGoodQualityAudio"
"AdaptiveStreaming"
"ContentAwareEncodingExperimental"
"H264MultipleBitrate1080p"
"H264MultipleBitrate720p"
"H264MultipleBitrateSD"
"H264SingleBitrate1080p"
"H264SingleBitrate720p"
"H264SingleBitrateSD" (required)

FaceDetectorPreset

Name Description Value
@odata.type The discriminator for derived types. "#Microsoft.Media.FaceDetectorPreset" (required)
resolution Specifies the maximum resolution at which your video is analyzed. The default behavior is "SourceResolution," which will keep the input video at its original resolution when analyzed. Using "StandardDefinition" will resize input videos to standard definition while preserving the appropriate aspect ratio. It will only resize if the video is of higher resolution. For example, a 1920x1080 input would be scaled to 640x360 before processing. Switching to "StandardDefinition" will reduce the time it takes to process high resolution video. It may also reduce the cost of using this component (see https://azure.microsoft.com/pricing/details/media-services/#analytics for details). However, faces that end up being too small in the resized video may not be detected. "SourceResolution"
"StandardDefinition"

StandardEncoderPreset

Name Description Value
@odata.type The discriminator for derived types. "#Microsoft.Media.StandardEncoderPreset" (required)
codecs The list of codecs to be used when encoding the input video. Codec[] (required)
filters One or more filtering operations that are applied to the input media before encoding. Filters
formats The list of outputs to be produced by the encoder. Format[] (required)

Codec

Name Description Value
label An optional label for the codec. The label can be used to control muxing behavior. string
@odata.type Set the object type #Microsoft.Media.AacAudio
#Microsoft.Media.CopyAudio
#Microsoft.Media.CopyVideo
#Microsoft.Media.H264Video
#Microsoft.Media.JpgImage
#Microsoft.Media.PngImage (required)

AacAudio

Name Description Value
@odata.type The discriminator for derived types. "#Microsoft.Media.AacAudio" (required)
bitrate The bitrate, in bits per second, of the output encoded audio. int
channels The number of channels in the audio. int
profile The encoding profile to be used when encoding audio with AAC. "AacLc"
"HeAacV1"
"HeAacV2"
samplingRate The sampling rate to use for encoding in hertz. int

CopyAudio

Name Description Value
@odata.type The discriminator for derived types. "#Microsoft.Media.CopyAudio" (required)

CopyVideo

Name Description Value
@odata.type The discriminator for derived types. "#Microsoft.Media.CopyVideo" (required)

H264Video

Name Description Value
@odata.type The discriminator for derived types. "#Microsoft.Media.H264Video" (required)
complexity Tells the encoder how to choose its encoding settings. The default value is Balanced. "Balanced"
"Quality"
"Speed"
keyFrameInterval The distance between two key frames, thereby defining a group of pictures (GOP). The value should be a non-zero integer in the range [1, 30] seconds, specified in ISO 8601 format. The default is 2 seconds (PT2S). string
layers The collection of output H.264 layers to be produced by the encoder. H264Layer[]
sceneChangeDetection Whether or not the encoder should insert key frames at scene changes. If not specified, the default is false. This flag should be set to true only when the encoder is being configured to produce a single output video. bool
stretchMode The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize "AutoFit"
"AutoSize"
"None"

H264Layer

Name Description Value
@odata.type The discriminator for derived types. string (required)
adaptiveBFrame Whether or not adaptive B-frames are to be used when encoding this layer. If not specified, the encoder will turn it on whenever the video profile permits its use. bool
bFrames The number of B-frames to be used when encoding this layer. If not specified, the encoder chooses an appropriate number based on the video profile and level. int
bitrate The average bitrate in bits per second at which to encode the input video when generating this layer. This is a required field. int (required)
bufferWindow The VBV buffer window length. The value should be in ISO 8601 format. The value should be in the range [0.1-100] seconds. The default is 5 seconds (for example, PT5S). string
entropyMode The entropy mode to be used for this layer. If not specified, the encoder chooses the mode that is appropriate for the profile and level. "Cabac"
"Cavlc"
frameRate The frame rate (in frames per second) at which to encode this layer. The value can be in the form of M/N where M and N are integers (For example, 30000/1001), or in the form of a number (For example, 30, or 29.97). The encoder enforces constraints on allowed frame rates based on the profile and level. If it is not specified, the encoder will use the same frame rate as the input video. string
height The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in height as the input. string
label The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming the output file. string
level We currently support Level up to 6.2. The value can be Auto, or a number that matches the H.264 profile. If not specified, the default is Auto, which lets the encoder choose the Level that is appropriate for this layer. string
maxBitrate The maximum bitrate (in bits per second), at which the VBV buffer should be assumed to refill. If not specified, defaults to the same value as bitrate. int
profile We currently support Baseline, Main, High, High422, High444. Default is Auto. "Auto"
"Baseline"
"High"
"High422"
"High444"
"Main"
referenceFrames The number of reference frames to be used when encoding this layer. If not specified, the encoder determines an appropriate number based on the encoder complexity setting. int
slices The number of slices to be used when encoding this layer. If not specified, default is zero, which means that encoder will use a single slice for each frame. int
width The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in width as the input. string

JpgImage

Name Description Value
@odata.type The discriminator for derived types. "#Microsoft.Media.JpgImage" (required)
keyFrameInterval The distance between two key frames, thereby defining a group of pictures (GOP). The value should be a non-zero integer in the range [1, 30] seconds, specified in ISO 8601 format. The default is 2 seconds (PT2S). string
layers A collection of output JPEG image layers to be produced by the encoder. JpgLayer[]
range The position in the input video at which to stop generating thumbnails. The value can be in absolute timestamp (ISO 8601, e.g: PT5M30S to stop at 5 minutes and 30 seconds), or a frame count (For example, 300 to stop at the 300th frame), or a relative value (For example, 100%). string
start The position in the input video from where to start generating thumbnails. The value can be in absolute timestamp (ISO 8601, e.g: PT05S), or a frame count (For example, 10 for the 10th frame), or a relative value (For example, 1%). Also supports a macro {Best}, which tells the encoder to select the best thumbnail from the first few seconds of the video. string (required)
step The intervals at which thumbnails are generated. The value can be in absolute timestamp (ISO 8601, e.g: PT05S for one image every 5 seconds), or a frame count (For example, 30 for every 30 frames), or a relative value (For example, 1%). string
stretchMode The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize "AutoFit"
"AutoSize"
"None"

JpgLayer

Name Description Value
@odata.type The discriminator for derived types. string (required)
height The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in height as the input. string
label The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming the output file. string
quality The compression quality of the JPEG output. Range is from 0-100 and the default is 70. int
width The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in width as the input. string

PngImage

Name Description Value
@odata.type The discriminator for derived types. "#Microsoft.Media.PngImage" (required)
keyFrameInterval The distance between two key frames, thereby defining a group of pictures (GOP). The value should be a non-zero integer in the range [1, 30] seconds, specified in ISO 8601 format. The default is 2 seconds (PT2S). string
layers A collection of output PNG image layers to be produced by the encoder. PngLayer[]
range The position in the input video at which to stop generating thumbnails. The value can be in absolute timestamp (ISO 8601, e.g: PT5M30S to stop at 5 minutes and 30 seconds), or a frame count (For example, 300 to stop at the 300th frame), or a relative value (For example, 100%). string
start The position in the input video from where to start generating thumbnails. The value can be in absolute timestamp (ISO 8601, e.g: PT05S), or a frame count (For example, 10 for the 10th frame), or a relative value (For example, 1%). Also supports a macro {Best}, which tells the encoder to select the best thumbnail from the first few seconds of the video. string (required)
step The intervals at which thumbnails are generated. The value can be in absolute timestamp (ISO 8601, e.g: PT05S for one image every 5 seconds), or a frame count (For example, 30 for every 30 frames), or a relative value (For example, 1%). string
stretchMode The resizing mode - how the input video will be resized to fit the desired output resolution(s). Default is AutoSize "AutoFit"
"AutoSize"
"None"

PngLayer

Name Description Value
@odata.type The discriminator for derived types. string (required)
height The height of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in height as the input. string
label The alphanumeric label for this layer, which can be used in multiplexing different video and audio layers, or in naming the output file. string
width The width of the output video for this layer. The value can be absolute (in pixels) or relative (in percentage). For example 50% means the output video has half as many pixels in width as the input. string

Filters

Name Description Value
crop The parameters for the rectangular window with which to crop the input video. Rectangle
deinterlace The de-interlacing settings. Deinterlace
overlays The properties of overlays to be applied to the input video. These could be audio, image or video overlays. Overlay[]
rotation The rotation, if any, to be applied to the input video, before it is encoded. Default is Auto "Auto"
"None"
"Rotate0"
"Rotate180"
"Rotate270"
"Rotate90"

Rectangle

Name Description Value
height The height of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%). string
left The number of pixels from the left-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%). string
top The number of pixels from the top-margin. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%). string
width The width of the rectangular region in pixels. This can be absolute pixel value (e.g 100), or relative to the size of the video (For example, 50%). string

Deinterlace

Name Description Value
mode The deinterlacing mode. Defaults to AutoPixelAdaptive. "AutoPixelAdaptive"
"Off"
parity The field parity for de-interlacing, defaults to Auto. "Auto"
"BottomFieldFirst"
"TopFieldFirst"

Overlay

Name Description Value
audioGainLevel The gain level of audio in the overlay. The value should be in the range [0, 1.0]. The default is 1.0. int
end The position in the input video at which the overlay ends. The value should be in ISO 8601 duration format. For example, PT30S to end the overlay at 30 seconds in to the input video. If not specified the overlay will be applied until the end of the input video if inputLoop is true. Else, if inputLoop is false, then overlay will last as long as the duration of the overlay media. string
fadeInDuration The duration over which the overlay fades in onto the input video. The value should be in ISO 8601 duration format. If not specified the default behavior is to have no fade in (same as PT0S). string
fadeOutDuration The duration over which the overlay fades out of the input video. The value should be in ISO 8601 duration format. If not specified the default behavior is to have no fade out (same as PT0S). string
inputLabel The label of the job input which is to be used as an overlay. The Input must specify exactly one file. You can specify an image file in JPG or PNG formats, or an audio file (such as a WAV, MP3, WMA or M4A file), or a video file. See https://aka.ms/mesformats for the complete list of supported audio and video file formats. string (required)
start The start position, with reference to the input video, at which the overlay starts. The value should be in ISO 8601 format. For example, PT05S to start the overlay at 5 seconds in to the input video. If not specified the overlay starts from the beginning of the input video. string
@odata.type Set the object type #Microsoft.Media.AudioOverlay
#Microsoft.Media.VideoOverlay (required)

AudioOverlay

Name Description Value
@odata.type The discriminator for derived types. "#Microsoft.Media.AudioOverlay" (required)

VideoOverlay

Name Description Value
@odata.type The discriminator for derived types. "#Microsoft.Media.VideoOverlay" (required)
cropRectangle An optional rectangular window used to crop the overlay image or video. Rectangle
opacity The opacity of the overlay. This is a value in the range [0 - 1.0]. Default is 1.0 which mean the overlay is opaque. int
position The location in the input video where the overlay is applied. Rectangle

Format

Name Description Value
filenamePattern The pattern of the file names for the generated output files. The following macros are supported in the file name: {Basename} - The base name of the input video {Extension} - The appropriate extension for this format. {Label} - The label assigned to the codec/layer. {Index} - A unique index for thumbnails. Only applicable to thumbnails. {Bitrate} - The audio/video bitrate. Not applicable to thumbnails. {Codec} - The type of the audio/video codec. Any unsubstituted macros will be collapsed and removed from the filename. string (required)
@odata.type Set the object type #Microsoft.Media.JpgFormat
#Microsoft.Media.Mp4Format
#Microsoft.Media.PngFormat
#Microsoft.Media.TransportStreamFormat (required)

JpgFormat

Name Description Value
@odata.type The discriminator for derived types. "#Microsoft.Media.JpgFormat" (required)

Mp4Format

Name Description Value
@odata.type The discriminator for derived types. "#Microsoft.Media.Mp4Format" (required)
outputFiles The list of output files to produce. Each entry in the list is a set of audio and video layer labels to be muxed together . OutputFile[]

OutputFile

Name Description Value
labels The list of labels that describe how the encoder should multiplex video and audio into an output file. For example, if the encoder is producing two video layers with labels v1 and v2, and one audio layer with label a1, then an array like '[v1, a1]' tells the encoder to produce an output file with the video track represented by v1 and the audio track represented by a1. string[] (required)

PngFormat

Name Description Value
@odata.type The discriminator for derived types. "#Microsoft.Media.PngFormat" (required)

TransportStreamFormat

Name Description Value
@odata.type The discriminator for derived types. "#Microsoft.Media.TransportStreamFormat" (required)
outputFiles The list of output files to produce. Each entry in the list is a set of audio and video layer labels to be muxed together . OutputFile[]

VideoAnalyzerPreset

Name Description Value
@odata.type The discriminator for derived types. "#Microsoft.Media.VideoAnalyzerPreset" (required)
audioLanguage The language for the audio payload in the input using the BCP-47 format of 'language tag-region' (e.g: 'en-US'). The list of supported languages are English ('en-US' and 'en-GB'), Spanish ('es-ES' and 'es-MX'), French ('fr-FR'), Italian ('it-IT'), Japanese ('ja-JP'), Portuguese ('pt-BR'), Chinese ('zh-CN'), German ('de-DE'), Arabic ('ar-EG' and 'ar-SY'), Russian ('ru-RU'), Hindi ('hi-IN'), and Korean ('ko-KR'). If you know the language of your content, it is recommended that you specify it. If the language isn't specified or set to null, automatic language detection will choose the first language detected and process with the selected language for the duration of the file. This language detection feature currently supports English, Chinese, French, German, Italian, Japanese, Spanish, Russian, and Portuguese. It does not currently support dynamically switching between languages after the first language is detected. The automatic detection works best with audio recordings with clearly discernable speech. If automatic detection fails to find the language, transcription would fallback to 'en-US'." string
insightsToExtract Defines the type of insights that you want the service to generate. The allowed values are 'AudioInsightsOnly', 'VideoInsightsOnly', and 'AllInsights'. The default is AllInsights. If you set this to AllInsights and the input is audio only, then only audio insights are generated. Similarly if the input is video only, then only video insights are generated. It is recommended that you not use AudioInsightsOnly if you expect some of your inputs to be video only; or use VideoInsightsOnly if you expect some of your inputs to be audio only. Your Jobs in such conditions would error out. "AllInsights"
"AudioInsightsOnly"
"VideoInsightsOnly"