Feb 09, 2024
In the blog we will talk about utilising AWS Step Functions for Media Workflow orchestration.
There are many different use cases in media workflows. There is a huge difference in whether you are deploying a 24/7/365 linear live channel or a channel for 2 hours for a sporting event. In this blog we look into a use case for a 2 hour sporting event, but similar patterns can be applied for linear channels.
Our ideal workflow is one where someone with limited technical knowledge can perform media workflow scheduling tasks.
A media workflow like this includes, selecting the source, linking metadata, scheduling and preparing the updates to a content management system (which pushes it forwards to clients), and creating the actual (redundant) media delivery pipeline for packetization, DRM and CDN.
Solution
When defining the solution, we initially try to understand the customer business flow. What existing systems are required to be integrated with, what functionality needs to be delivered.
When these business requirements are set, we are capturing it in an API design. By performing these tasks from a business requirements perspective, scope creep is avoided.
Often it is not required for example to have the encoding profile completely modelled to the detail, but rather an quality indication is important on API level (e.g. SD, HD, UDH). These standardised profiles translated to complex profiles in the code.
Typically these technical complex configurations should not be changed on the fly without extensive testing.
The implementation pattern we follow is often the same. We have an AWS API Gateway which serves the rest API, after the request validation an AWS Lambda is invoked which starts 1 or more AWS Step Functions which orchestrate the different AWS Elemental Media services and potentially invoke 3rd parties to make them aware of the existing of the event.
The following picture depicts this:
The main reason for utilising AWS StepFunction is that it provides a simple way to manage dependencies (e.g. no CDN routing can be set up before the media package endpoints are known), and it allows us to isolate the software components which integrate with specific AWS services.
An example of a step function implementation is shown below:
This step function creates a complete media chain from media live input up to the content distribution network. For observability it deploys a CloudWatch dashboard with the most important metrics.
Note that a reference implementation can be found in the Qibb catalog, see https://www.qibb.com/application/merapar-mdk-live-streaming/.
After a live event, an equal step function is invoked which, in reverse order, deletes all resources and updates and required 3rd party systems.
Contact Merapar to get more information around implementing your media workflow orchestration utilising AWS Elemental Media services and AWS Step Functions.