Add watermark to s3 video stream

0

Hy, I have a s3 bucket containing large video files. In a nodeJs server, I use Aws.s3.getObject from 'aws-sdk' npm to get the needed file. I need the response stream to contain a watermark layer that is a part of the file. i need the watermark to be dynamic for each account so it is not an option to store the file with a watermark when I upload it. when I request the file I don't want any changed to be done on the original file, just edit the response stream. is it possible to do something like that? I researched and found that something like that can be done using lamda function but I had a very hard time to find exactly what I need in your documentations.

Ill really appreciate any help to figure that out Thanks ahead! Aviv

1 Answer
0

You can use AWS Lambda@Edge to modify and process videos at the CloudFront edge locations as they are being retrieved from S3. This allows adding watermarks dynamically without pre-processing the videos.

The steps involve:

Write a Lambda@Edge function to overlay the watermark on the video stream
Associate the Lambda function with a CloudFront distribution behavior
When the video is requested through CloudFront, the function will execute and return the watermarked video stream

https://aws.amazon.com/getting-started/hands-on/amazon-s3-object-lambda-to-dynamically-watermark-images/

AWS
AWS TAM
answered a month ago
profile picture
EXPERT
reviewed 23 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions