Using Azure Media Services to encode videos
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.
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.
- Create a Transform.
- Submit Jobs under that Transform.
- List Transforms.
- 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. =)