Using Azure Media Services to encode videos

Mohammed Brückner
Serverless and Low Code pioneers
2 min readOct 8, 2022

The nice thing about Azure Media Services is that it allows you to perform complex video encoding at scale and with plenty of settings to tweak and tune — without worrying about the underlying infrastructure. If you are not encoding that much nor plan to do it with high concurrency, maybe using FFMPEG in containers will do the trick for you.

This Dall-E2 generated art describes the joy of doing great things and leaving out on the heavy lifting at the same time.

If you are looking for a pro-solution stay tuned though. The way Azure Media services works can be basically broken down to the steps as follow.

Get more on the basic schema of AMS here: https://learn.microsoft.com/en-us/azure/media-services/latest/encode-concept
  1. Create a Transform.
  2. Submit Jobs under that Transform.
  3. List Transforms.
  4. Delete a Transform, if you aren’t planning to use it in the future.

The transform is basically a recipe for how assets (=video material) are going to be dealt with. What encoding mechanism, what bit rates, audio tracks and encoding, subtitle and tracks and what not. There are plenty of levers. Now that can be imitating at the beginning. Don’t worry too much though and just take an example, dissect and play with it.

Like this Typescript as follows. Pay attention to the code comments.

If you want to know how to use this within an Azure Function and how to hook that Function into a Logic App doing some complex, cool stuff check out this article.

Other than that, if you want to delve into the taxonomy of Azure Media Services along with more how-to’s, check this out. Word of notice: You can spend some time getting your head around the full spectrum of options. =)

--

--

Mohammed Brückner
Serverless and Low Code pioneers

Author of "IT is not magic, it's architecture", "The DALL-E Cookbook For Great AI Art: For Artists. For Enthusiasts."- Visit https://platformeconomies.com