Support for jpg, bmp image files in Mediaconvert overlay

0

Regarding https://docs.aws.amazon.com/mediaconvert/latest/ug/requirements-for-the-overlay-file.html File type: Use .png or .tga.

Please clarify as to the limitation of only supporting these file types. We have internal requests to enable jpg, gif & bmp file types. Or Is there any work around that media convert can be enabled with a pre processing script to generate png out of these images

1개 답변
1
수락된 답변

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:

  1. Image Upload: Whenever an image (JPEG, GIF, BMP) intended for overlaying is uploaded to a designated S3 bucket, it triggers an event.

  2. 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.

  3. 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.

  4. 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.

profile picture
답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠