

# Video scaling behavior and aspect ratios
<a name="video-scaling"></a>

You can choose how AWS Elemental MediaConvert scales your input video image to the output resolution that you specify by using **Scaling behavior**.

The following tables show how **Scaling behavior**, **Scaling padding**, **Height**, and **Width** interact to change the output image.

**Topics**
+ [Configuring default scaling (Fit with padding)](video-scaling-default.md)
+ [Configuring stretch to output scaling](video-scaling-stretch-ratio.md)
+ [Configuring fit scaling](video-scaling-fit-ratio.md)
+ [Configuring fit without upscaling scaling](video-scaling-fit-without-upscaling.md)
+ [Configuring fill scaling](video-scaling-fill-ratio.md)

# Configuring default scaling (Fit with padding)
<a name="video-scaling-default"></a>

If you choose **Default (Fit with padding)** for your **Scaling behavior**, MediaConvert scales your video image to your output resolution. Then, if your input resolution has a different aspect ratio than your output resolution, MediaConvert pads your video image until it matches the dimensions of your output resolution.

For example, if your input file is `1280` pixels by `720` pixels and you specify an output resolution that is `640` pixels by `480` pixels, MediaConvert reduces the image size to `640x360` and then pads the top and bottom of the image so that the final video resolution is `640x480`. MediaConvert does not use cropping for the **Default** scaling behavior.

**Key**

The following key graphic shows input and output image width, height, cropping, and padding. In this key graphic, input dimensions (on the top and left) are in blue and output dimensions (on the right and bottom) are in red. 

![\[Aspect Ratio Key\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/key.png)


The following table shows example image scaling behavior when your input and output resolutions differ. For details about to read the images, reference the previous key graphic.


|  Condition  |  Input  |  Output  | 
| --- | --- | --- | 
|  Input width less than output width Input height less than output height  |  ![\[Blue user icon with dimensions labeled: 200x200 inner square, 300x400 outer rectangle.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/input1-thumb.png)  |  ![\[Diagram showing a blue figure icon centered within a frame with dimensions labeled.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/fit1-padded-thumb.png)  | 
|  Input width less than output width Input height greater than output height  |  ![\[Blue pawn-shaped figure on a checkered background with red measurement lines.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/input2-thumb.png)  |  ![\[Diagram showing a blue figure centered within a white rectangle surrounded by black bars.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/fit2-padded-thumb.png)  | 
|  Input width greater than output width Input height less than output height  |  ![\[Blue user icon centered within a rectangular frame with dimensions labeled.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/input3-thumb.png)  |  ![\[Diagram showing dimensions of a rectangle: 500 width, 400 height, with inner area of 300x200.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/fit3-padded-thumb.png)  | 
|  Input width greater than output width Input height greater than output height  |  ![\[Blue silhouette icon of a person within a red square frame on a grid background.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/input4-thumb.png)  |  ![\[Blue 3D snowman-like figure centered within nested squares on a checkered background.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/fit4-padded-thumb.png)  | 

# Configuring stretch to output scaling
<a name="video-scaling-stretch-ratio"></a>

If you choose **Stretch to output** for your **Scaling behavior**, MediaConvert stretches or shrinks your video image to your output resolution.

For example, if your input image is `200` pixels by `200` pixels and you want an output resolution that is `300` pixels by `400` pixels, MediaConvert increases the size of your input image to `300` pixels by `400` pixels, distorting the proportions of your output image. MediaConvert does not use padding or cropping for the **Stretch to output** scaling behavior.

**Important**  
If your input resolution has a different aspect ratio than your output resolution, your output image will be distorted when compared to your input image.

**Key**

The following key graphic shows input and output image width, height, cropping, and padding. In this key graphic, input dimensions (on the top and left) are in blue and output dimensions (on the right and bottom) are in red. 

![\[Aspect Ratio Key\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/key.png)


The following table shows example image scaling behavior when your input and output resolutions differ. For details about to read the images, reference the previous key graphic.


|  Condition  |  Input  |  Output  | 
| --- | --- | --- | 
|  Input width less than output width Input height less than output height  |  ![\[Blue user icon with dimensions labeled: 200x200 inner square, 300x400 outer rectangle.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/input1-thumb.png)  |  ![\[Blue 3D object resembling a chess pawn piece with dimensions labeled around it.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/stretch1-thumb.png)  | 
|  Input width less than output width Input height greater than output height  |  ![\[Blue pawn-shaped figure on a checkered background with red measurement lines.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/input2-thumb.png)  |  ![\[Diagram showing dimensions of a blue cylindrical object on a checkered background.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/stretch2-thumb.png)  | 
|  Input width greater than output width Input height less than output height  |  ![\[Blue user icon centered within a rectangular frame with dimensions labeled.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/input3-thumb.png)  |  ![\[Diagram showing a blue bowling pin shape centered within nested rectangles and numerical labels.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/stretch3-thumb.png)  | 
|  Input width greater than output width Input height greater than output height  |  ![\[Blue silhouette icon of a person within a red square frame on a grid background.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/input4-thumb.png)  |  ![\[Blue 3D figure resembling a snowman or stacked spheres centered in a square frame.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/stretch4-thumb.png)  | 

# Configuring fit scaling
<a name="video-scaling-fit-ratio"></a>

If you choose **Fit** for your **Scaling behavior**, MediaConvert scales your input image until it fits inside the dimensions of your output resolution, without exceeding the dimensions of your output resolution. 

For example, if your input file is `200` pixels by `200` pixels and you want an output resolution that is `300` pixels by `400` pixels, MediaConvert increases the image to `300` pixels by `300` pixels. MediaConvert does not add padding to your output when you choose **Fit**.

**Key**

The following key graphic shows input and output image width, height, cropping, and padding. In this key graphic, input dimensions (on the top and left) are in blue and output dimensions (on the right and bottom) are in red. 

![\[Aspect Ratio Key\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/key.png)


The following table shows example image scaling behavior when your input and output resolutions differ. For details about to read the images, reference the previous key graphic.


|  Condition  |  Input  |  Output  | 
| --- | --- | --- | 
|  Input width less than output width Input height less than output height  |  ![\[Blue user icon with dimensions labeled: 200x200 inner square, 300x400 outer rectangle.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/input1-thumb.png)  |  ![\[Blue figure icon with size dimensions labeled around it: 400 width, 300 height, 200 top and left.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/fit1-unpadded-thumb.png)  | 
|  Input width less than output width Input height greater than output height  |  ![\[Blue pawn-shaped figure on a checkered background with red measurement lines.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/input2-thumb.png)  |  ![\[Diagram showing a blue figure centered in a 400x200 pixel area with surrounding measurements.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/fit2-unpadded-thumb.png)  | 
|  Input width greater than output width Input height less than output height  |  ![\[Blue user icon centered within a rectangular frame with dimensions labeled.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/input3-thumb.png)  |  ![\[Diagram showing a rectangle with dimensions 400x300 inside a larger 500x200 area.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/fit3-unpadded-thumb.png)  | 
|  Input width greater than output width Input height greater than output height  |  ![\[Blue silhouette icon of a person within a red square frame on a grid background.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/input4-thumb.png)  |  ![\[Blue 3D figure resembling a snowman or stacked spheres centered in a square frame.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/fit4-unpadded-thumb.png)  | 

# Configuring fit without upscaling scaling
<a name="video-scaling-fit-without-upscaling"></a>

If you choose **Fit without upscaling** for your **Scaling behavior**, MediaConvert decreases the size of your input image until it fits inside the dimensions of your output resolution, without going over any of the dimensions of your output resolution. If your input image is smaller than your output image, MediaConvert does not increase the size of your image.

For example, if your input image is `400` pixels by `400` pixels and you want an output resolution that is `200` pixels by `300` pixels, MediaConvert shrinks your input image to `200` pixels by `200` pixels. MediaConvert does not add padding when you choose **Fit without upscaling**.

**Note**  
You cannot choose **Fit without upscaling** when you enable **Automated ABR** in **Apple HLS**, **DASH**, or **CMAF** output groups.

**Key**

The following key graphic shows input and output image width, height, cropping, and padding. In this key graphic, input dimensions (on the top and left) are in blue and output dimensions (on the right and bottom) are in red. 

![\[Aspect Ratio Key\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/key.png)


The following table shows example image scaling behavior when your input and output resolutions differ. For details about to read the images, reference the previous key graphic.


|  Condition  |  Input  |  Output  | 
| --- | --- | --- | 
|  Input width less than output width Input height less than output height  |  ![\[Blue user icon with dimensions labeled: 200x200 inner square, 300x400 outer rectangle.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/input1-thumb.png)  |  ![\[Diagram showing a blue user icon surrounded by numbered dimensions: 200, 300, and 400.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/keep1-unpadded-thumb.png)  | 
|  Input width less than output width Input height greater than output height  |  ![\[Blue pawn-shaped figure on a checkered background with red measurement lines.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/input2-thumb.png)  |  ![\[Diagram showing a blue figure centered in a 400x200 pixel area with surrounding measurements.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/fit2-unpadded-thumb.png)  | 
|  Input width greater than output width Input height less than output height  |  ![\[Blue user icon centered within a rectangular frame with dimensions labeled.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/input3-thumb.png)  |  ![\[Diagram showing a rectangle with dimensions 400x300 inside a larger 500x200 area.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/fit3-unpadded-thumb.png)  | 
|  Input width greater than output width Input height greater than output height  |  ![\[Blue silhouette icon of a person within a red square frame on a grid background.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/input4-thumb.png)  |  ![\[Blue 3D figure resembling a snowman or stacked spheres centered in a square frame.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/fit4-unpadded-thumb.png)  | 

# Configuring fill scaling
<a name="video-scaling-fill-ratio"></a>

If you choose **Fill** for your **Scaling behavior**, MediaConvert scales your input image until it fills the dimensions of your output resolution, and crops anything that exceeds the dimensions of your output resolution.

For example, if your input file is `200` pixels by `200` pixels and you want an output resolution that is `300` pixels by `400` pixels, MediaConvert increases the size of your input image to `400` pixels by `400` pixels, crops off the top and bottom `50` pixels, and returns a `300` pixel by `400` pixel file. MediaConvert does not add padding to your output when you choose **Fill**.

**Key**

The following key graphic shows input and output image width, height, cropping, and padding. In this key graphic, input dimensions (on the top and left) are in blue and output dimensions (on the right and bottom) are in red. 

![\[Aspect Ratio Key\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/key.png)


The following table shows example image scaling behavior when your input and output resolutions differ. For details about to read the images, reference the previous key graphic.


|  Condition  |  Input  |  Output  | 
| --- | --- | --- | 
|  Input width less than output width Input height less than output height  |  ![\[Blue user icon with dimensions labeled: 200x200 inner square, 300x400 outer rectangle.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/input1-thumb.png)  |  ![\[Blue figure icon with dimensions and sizing information overlaid on a checkered background.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/fill1-thumb.png)  | 
|  Input width less than output width Input height greater than output height  |  ![\[Blue pawn-shaped figure on a checkered background with red measurement lines.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/input2-thumb.png)  |  ![\[Diagram showing a blue figure with dimensions: 200 height, 300 width, 400 total height.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/fill2-thumb.png)  | 
|  Input width greater than output width Input height less than output height  |  ![\[Blue user icon centered within a rectangular frame with dimensions labeled.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/input3-thumb.png)  |  ![\[Blue hourglass-shaped icon with numerical values indicating dimensions around it.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/fill3-thumb.png)  | 
|  Input width greater than output width Input height greater than output height  |  ![\[Blue silhouette icon of a person within a red square frame on a grid background.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/input4-thumb.png)  |  ![\[Blue 3D figure centered in a square frame with measurement indicators on the sides.\]](http://docs.aws.amazon.com/mediaconvert/latest/ug/images/fill4-thumb.png)  | 