Encoding scenario-based migration guidance

migration guide logo


migration steps 2

This article provides encoding scenario based guidance that will assist you in migrating from Azure Media Services v2 to v3.

Prerequisites

Before start changing your encoding workflow, you should understand the differences in the way storage is managed. In AMS V3, the Azure Storage API is used to manage the storage account(s) associated with your Media Services account.

Note

Jobs and tasks created in v2 do not show up in v3 as they are not associated with a transform. The recommendation is to switch to v3 transforms and jobs.

Encoding workflow comparison

Take a few minutes to look at the flowcharts below for a visual comparison of the encoding workflows for V2 and V3.

V2 encoding workflow

Click on the image below to see a larger version.

Encoding workflow for V2

  1. Setup
    1. Create an asset or use and existing asset. If using a new asset, upload content to that asset. If using an existing asset, you should be encoding files that already exist in the asset.
    2. Get the values of the following items:
      • Media processor ID or object
      • Encoder string (name) of the encoder you want to use
      • Asset ID of new asset OR the asset ID of the existing asset
    3. For monitoring, create either a job or task level notification subscription or an SDK event handler
  2. Create the job that contains the task or tasks. Each task should include the above items and:
    • A directive that an output asset needs to be created. The output asset is created by the system.
    • Optional name for the output asset
  3. Submit the job.
  4. Monitor the job.

V3 encoding workflow

Encoding workflow for V3

  1. Set up
    1. Create an asset or use an existing asset. If using a new asset, upload content to that asset. If using an existing asset, you should be encoding files that already exist in the asset. You shouldn't upload more content to that asset.
    2. Create an output asset. The output asset is where the encoded files and input and output metadata will be stored.
    3. Get values for the transform:
      • Standard Encoder preset
      • AMS resource group
      • AMS account name
    4. Create the transform or use an existing transform. Transforms are reusable. It isn't necessary to create a new transform each time you want to submit a job.
  2. Create a job
    1. For the job, get the values for the following items:
      • Transform name
      • Base-URI for the SAS URL for your asset, the HTTPs source path of your file share, or the local path of the files. The JobInputAsset can also use an asset name as an input.
      • File name(s)
      • Output asset(s)
      • A resource group
      • AMS account name
  3. Use Event Grid for monitoring your job.
  4. Submit the job.

Custom presets from V2 to V3 encoding

If your V2 code called the Standard Encoder with a custom preset, you first need to create a new transform with the custom Standard Encoder preset before submitting a job.

Custom presets are now JSON and no longer XML based. Recreate your preset in JSON following the custom preset schema as defined in the Transform Open API (Swagger) documentation.

Input and output metadata files from an encoding job

In v2, XML input and output metadata files get generated as the result of an encoding job. In v3, the metadata format changed from XML to JSON. For more information about metadata, see Input metadata and Output metadata.

Jobs with inputs that are on HTTPS hosted URLs

You can now submit jobs in V3 from files stored either in Azure storage, stored locally, or external web servers using the HTTP(S) job input support.

If you previously used workflows to copy files from Azure blob files into empty assets before submitting jobs, you may be able to simplify your workflow by passing a SAS URL for the file in Azure blob storage directly into the job.

Indexer v1 audio transcription to the new AudioAnalyzer "basic mode"

For customers using the Indexer v1 processor in the v2 API, you need to create a transform that invokes the new AudioAnalyzer in basic mode prior to submitting a Job.

Encoding, transforms and jobs concepts, tutorials and how to guides