MediaConvert Image Inserter

0

When creating a MediaConvert job, using the AWS PHP SDK, i am adding an image to the input video, like this:

"InsertableImages" => [ [ "Opacity" => 50, "ImageInserterInput" => 's3-image.jpg', "ImageX" => 0, "ImageY" => 0, "Layer" => 1, ] ]

As i understood, ImageX and ImageY are offsets to the image, from the top-left corner.

My questions are:

  1. Is there an easy way to choose another corner with the same offsets (top-right for example.)?
  2. How would i center an image?

Thank you very much in advance.

Djole91
질문됨 2년 전249회 조회
1개 답변
0

Hi :)

In image and video, the x,y coordinates are relative to (0,0) from the bottom left of the content.

  • (0,0): Bottom Left
  • (Pixel of image's horizontal, 0): Bottom Right
  • (0, Pixel of image's vertical): Top Left
  • (Pixel of image's horizontal, Pixel of image's vertical): Top Right
  • (Pixel of image's horizontal / 2, Pixel of image's vertical / 2): Center

The same applies to video. If you want the image to be centered in the video, you can specify the center position for the video in the ImageX and ImageY parameters.

Example) Video Resolution: 1500 x 500

  • (0,0): Bottom Left
  • (1500, 0): Bottom Right
  • (0, 500): Top Left
  • (1500, 500): Top Right
  • (1500 / 2, 500 / 2) = (750, 250): Center

"ImageX" => 750, "ImageY" => 250

(+ ImageX and ImageY indicate where to put the image in the video.)

AWS
답변함 일 년 전

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

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

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

관련 콘텐츠