admin管理员组文章数量:1418084
I am using AWS MediaConvert to transcode user-uploaded videos and overlay a logo in the bottom-right corner. However, I am struggling to position the image dynamically relative to the video's resolution.
What I Want to Achieve:
- The logo should always be positioned in the bottom-right corner, regardless of the video's resolution or aspect ratio.
- The logo should scale proportionally based on the video dimensions.
- The solution must work for both horizontal (landscape) and vertical (portrait) videos.
- I cannot pre-calculate the video resolution before sending the job.
What I Have Tried:
AWS MediaConvert does not allow percentage-based positioning (e.g., sourceWidth - overlayWidth - 10
). It only accepts absolute pixel values for ImageX
and ImageY
.
Currently, my configuration works fine for standard 1280x720 videos:
"VideoPreprocessors": {
"ImageInserter": {
"InsertableImages": [
{
"ImageInserterInput": "s3://my-bucket/logo.png",
"Width": 200,
"Height": 100,
"ImageX": 1080,
"ImageY": 580,
"Layer": 1,
"Opacity": 50,
"StartTime": 0
}
]
}
}
However, this approach fails when processing videos of different resolutions:
- If the video is 1920x1080, the logo is too small and appears in the wrong place.
- If the video is vertical (e.g., 720x1280), the logo gets cut off or misplaced.
- AWS MediaConvert does not seem to provide any built-in way to dynamically position the overlay.
Questions:
- Is there any way to dynamically position the overlay image relative to the video's resolution, without knowing the resolution beforehand?
- Are there any hidden options or workarounds in AWS MediaConvert that allow for relative positioning?
- If not, how can I achieve this without having to download the video to check its resolution before processing?
Any guidance would be much appreciated! Thanks.
版权声明:本文标题:amazon web services - AWS MediaConvert - Position Overlay Image Relatively to Video Dimensions - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745282302a2651492.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论