AWS Elemental MediaConnect is a live video transport service that is used for a wide array of enterprise video streaming use-cases. It provides reliability and flexibility for live video transmissions to and from the cloud over the public internet or AWS Direct Connect. It also allows users to stream directly into their own AWS VPCs.
For some video processing use-cases, AWS provides other useful media services:
- AWS Elemental MediaLive is a live video encoding service that outputs HLS, RTMP, etc.
- AWS Elemental MediaPackage is a live video content distribution and origination service.
- Amazon Kinesis Video Streams is a video ingest service for analytics and machine learning.
Sometimes we want to take a set of incoming live video streams, transform them, and then output a new set of live video streams. Examples include live object detection, watermarks or logos, and noise reduction.
In this use-case, we want to build a multiviewer that takes a set of video inputs and transforms them into a single video stream that contains a video tile for each input.
We can use the open-source tool FFmpeg running on an Amazon ECS container to perform this video transformation. Other tools and frameworks such as GStreamer, OpenCV, or an AWS Elemental Live server could also perform similar transformations.
Each MediaConnect flow is configured so that a video input can be streamed in via the SRT protocol. The FFmpeg container connects to the output of four MediaConnect flows, applies a set of filters, and then streams the result to another MediaConnect flow.
Source code can be found in the GitHub repo joeykilpatrick/aws-mediaconnect-multiviewer and the entire solution can be deployed with the AWS CDK.
For simplicity, the provided source code streams all video over the public internet, but all five MediaConnect flows could be configured to use a VPC interface so that all traffic stays within the AWS cloud. This has important reliability, security, latency, and pricing ramifications.
From a pricing perspective, it’s important to remember that data transfer into AWS is free. However, data transfer out of AWS is not. When evaluating these type of solutions, check the current MediaConnect pricing.