- Newest
- Most votes
- Most comments
AWS Elemental MediaConvert currently exclusively supports .png and .tga file formats for overlays because these formats support transparency, which is essential for overlaying images on videos. On the other hand, JPEG, GIF, and BMP formats lack native transparency support.
To enable the use of JPG, GIF, and BMP files with MediaConvert, a potential workaround involves preprocessing these images to convert them into a compatible format such as .png or .tga.
Here's a high-level example of how you can achieve this using Amazon S3 and AWS Lambda:
-
Image Upload: Whenever an image (JPEG, GIF, BMP) intended for overlaying is uploaded to a designated S3 bucket, it triggers an event.
-
Lambda Function Trigger: This event triggers an AWS Lambda function, specifically designed to handle the image conversion process. The Lambda function's primary task is to convert the uploaded image into a .png file, which is supported by AWS MediaConvert for overlays. To perform the image conversion, you can employ an image processing library compatible with the runtime of your Lambda function, such as the Python Imaging Library (PIL) for Python runtime.
-
Image Conversion: The Lambda function reads the image file from the S3 bucket, performs the necessary conversion to a .png image while striving to preserve the image quality, and writes back the converted .png file into the S3 bucket.
-
MediaConvert Overlay: Subsequently, you can utilize the converted .png file as an overlay with AWS MediaConvert.
By implementing this workaround, you automate the conversion process for unsupported file types into a format compatible with AWS MediaConvert for overlays.
Relevant content
- asked a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated a year ago