I have a project that requires creating a video streaming service, where users get to upload their video content, the video stream service is suppose to handle transcoding into different resolutions, add watermark and other steps. i need guidance building such a robust system on aws, that is also cost effective.
I have tried to setup a basic lambda from the aws docs, and use mediaconvert, but i feel like i still need to create more of a system, and i am also looking at the aws cost, someone suggested a custom solution
2
Answers
We have developed this way.
You can follow this architecture help from AWS.
https://aws.amazon.com/developer/application-security-performance/articles/video-streaming-architectures/
[![enter image description here][1]][1]
Here is a high-level architecture and steps you can follow:
the source location for videos before transcoding.
video is uploaded to the S3 bucket. Lambda can be configured to run
in response to S3 events (e.g., an object creation event).
transcode the uploaded video into different resolutions. Define the
output settings according to your requirements.
another Lambda function to overlay the watermark on the transcoded
videos. You might use an image stored in an S3 bucket as the
watermark.
status, etc., in Amazon DynamoDB. This can be useful for tracking the
status of transcoding jobs and managing the state of the system.
From Cost effectiveness purpose:
a. Optimize the Lambda function execution time to minimize costs. Consider using provisioned concurrency if you have consistent traffic.
b. Consider using reserved capacity for AWS Elemental MediaConvert if you have predictable and consistent transcoding workloads.
c. Utilize S3 storage classes based on access patterns. Infrequent Access (S3 IA) or Glacier might be more cost-effective for videos that are accessed less frequently.
d. Regularly monitor and analyze your AWS costs using AWS Cost Explorer and set up billing alerts to stay within your budget.
e. For burstable transcoding workloads, consider using AWS Elemental MediaConvert with Spot Instances to potentially reduce costs.