Skip to content

AWS MediaConverter possible big with Video scaling

0

HI

i am using MediaConverter to crop and output videos i would like the output video to have no padding so always stretch to fit , ignoring aspect ratio my input video looks like this (single frame) 1920x1080

input frame

with a crop of setting of

"Crop": {
                "Height": 540,
                "Width": 1920,
                "X": 0,
                "Y": 0
              }

and scaling behavior of

"ScalingBehavior": "STRETCH_TO_OUTPUT",

i would expect the output to be

stretch up output

except it comes out like

stretch up with black bars

does anyone know what the issue could be?

below is the full job json (with account details removed)

{
  "Queue": "arn:aws:mediaconvert:ap-southeast-2:******:queues/Default",
  "UserMetadata": {},
  "Role": "arn:aws:iam::*********:role/service-role/MediaConvert_Default_Role",
  "Settings": {
    "TimecodeConfig": {
      "Source": "ZEROBASED"
    },
    "OutputGroups": [
      {
        "Name": "File Group",
        "Outputs": [
          {
            "ContainerSettings": {
              "Container": "MP4",
              "Mp4Settings": {}
            },
            "VideoDescription": {
              "Width": 1920,
              "ScalingBehavior": "STRETCH_TO_OUTPUT",
              "Crop": {
                "Height": 540,
                "Width": 1920,
                "X": 0,
                "Y": 0
              },
              "Height": 1080,
              "CodecSettings": {
                "Codec": "H_264",
                "H264Settings": {
                  "Bitrate": 15000000,
                  "RateControlMode": "CBR",
                  "QualityTuningLevel": "SINGLE_PASS_HQ"
                }
              }
            },
            "NameModifier": "stretchWidth"
          }
        ],
        "OutputGroupSettings": {
          "Type": "FILE_GROUP_SETTINGS",
          "FileGroupSettings": {
            "Destination": "s3://******/"
          }
        }
      },
      {
        "Name": "File Group",
        "Outputs": [
          {
            "ContainerSettings": {
              "Container": "MP4",
              "Mp4Settings": {}
            },
            "VideoDescription": {
              "Width": 1920,
              "ScalingBehavior": "STRETCH_TO_OUTPUT",
              "Crop": {
                "Height": 1080,
                "Width": 960,
                "X": 0,
                "Y": 0
              },
              "Height": 1080,
              "CodecSettings": {
                "Codec": "H_264",
                "H264Settings": {
                  "Bitrate": 15000000,
                  "RateControlMode": "CBR"
                }
              }
            },
            "NameModifier": "stretchHeight"
          }
        ],
        "OutputGroupSettings": {
          "Type": "FILE_GROUP_SETTINGS",
          "FileGroupSettings": {
            "Destination": "s3://******/"
          }
        }
      }
    ],
    "FollowSource": 1,
    "Inputs": [
      {
        "VideoSelector": {},
        "TimecodeSource": "ZEROBASED",
        "FileInput": "s3://******.mp4"
      }
    ]
  },
  "BillingTagsSource": "JOB",
  "AccelerationSettings": {
    "Mode": "DISABLED"
  },
  "StatusUpdateInterval": "SECONDS_60",
  "Priority": 0
}
asked a year ago272 views
2 Answers
0

Hi,

This page may help you understand how stretching works with MediaConvert: https://docs.aws.amazon.com/mediaconvert/latest/ug/video-scaling.html#stretch-ratio

Enter image description here

Best,

Didier

EXPERT
answered a year ago
  • thanks , i had found that page , that page is saying the same thing i am, stretch to fit should stretch the image to fit (and distort it), however media converter is not stretching, instead it is adding padding (black bars)

0

Try to do cropping on the input level: { "Queue": "arn:aws:mediaconvert:x:queues/Default", "UserMetadata": {}, "Role": "arn:aws:iam:x:role/service-role/MediaConvert_Default_Role", "Settings": { "TimecodeConfig": { "Source": "ZEROBASED" }, "OutputGroups": [ { "Name": "File Group", "Outputs": [ { "ContainerSettings": { "Container": "MP4", "Mp4Settings": {} }, "VideoDescription": { "Width": 1920, "ScalingBehavior": "STRETCH_TO_OUTPUT", "Height": 1080, "CodecSettings": { "Codec": "H_264", "H264Settings": { "Bitrate": 500000, "RateControlMode": "CBR", "QualityTuningLevel": "SINGLE_PASS_HQ" } } }, "NameModifier": "stretchWidth" } ], "OutputGroupSettings": { "Type": "FILE_GROUP_SETTINGS", "FileGroupSettings": { "Destination": "s3://x/testcropping" } } } ], "FollowSource": 1, "Inputs": [ { "VideoSelector": {}, "TimecodeSource": "ZEROBASED", "Crop": { "Height": 1080, "Width": 960, "X": 0, "Y": 0 }, "FileInput": "s3://x/Input/50p.mp4" } ] }, "BillingTagsSource": "JOB", "AccelerationSettings": { "Mode": "DISABLED" }, "StatusUpdateInterval": "SECONDS_60", "Priority": 0 }

AWS
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.