user3670605
user3670605

Reputation: 57

AWS MediaConvert - Position Overlay Image Relatively to Video Dimensions

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:

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:

Questions:

  1. Is there any way to dynamically position the overlay image relative to the video's resolution, without knowing the resolution beforehand?
  2. Are there any hidden options or workarounds in AWS MediaConvert that allow for relative positioning?
  3. 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. 🚀

Upvotes: 1

Views: 39

Answers (0)

Related Questions