# How to change the aspect ratio of a video?

**URL:** <https://community.imagekit.io/t/how-to-change-the-aspect-ratio-of-a-video/50>\
**Category:** Video API\
**Created:** [February 25, 2025, 8:09am UTC](https://community.imagekit.io/t/how-to-change-the-aspect-ratio-of-a-video/50 "2025-02-25T08:09:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![deepanshu\_rustagi](https://avatars.discourse-cdn.com/v4/letter/d/71c47a/32.png) [@deepanshu\_rustagi](https://community.imagekit.io/u/deepanshu_rustagi)\
**Post date:** [February 25, 2025, 8:09am UTC](https://community.imagekit.io/t/how-to-change-the-aspect-ratio-of-a-video/50/1 "2025-02-25T08:09:01Z")

</div>

I have some videos recorded in 16:9 aspect ratio, but I want to convert them to 1:1 for social media. Is there a way to change the aspect ratio of the video with ImageKit?

---

<div class="post-metadata">

**Author:** ![imagekit\_kashish](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.imagekit.io/imagekit_kashish/32/8_2.png) [@imagekit\_kashish](https://community.imagekit.io/u/imagekit_kashish)\
**Post date:** [April 8, 2025, 11:23am UTC](https://community.imagekit.io/t/how-to-change-the-aspect-ratio-of-a-video/50/2 "2025-04-08T11:23:20Z")

</div>

ImageKit provides [URL-based resizing parameters](https://imagekit.io/docs/video-resize-and-crop) for videos, whether they are uploaded to the [ImageKit Media Library](https://imagekit.io/docs/dam/overview) or stored on an [External Storage](https://imagekit.io/docs/integration/connect-external-storage) connected to ImageKit.

These transformation parameters allow you to easily adjust your videos to any desired aspect ratio, ensuring smooth delivery across various platforms and screen sizes.

### Methods to Change Video Aspect Ratio in ImageKit

ImageKit provides multiple transformation parameters and cropping options to achieve aspect ratio adjustments directly via the video URL:

#### **Using both Width and Height parameter**

You can specify the exact width (`w`) and height (`h`) to resize the video. To convert a 16:9 video to 1:1, simply set equal values for both.

**Example:**

```auto
https://ik.imagekit.io/demo/sample-video.mp4?tr=w-720,h-720

```

Read more on how to use this transformation on your Videos [here](https://imagekit.io/docs/video-resize-and-crop#maintain-ratio-crop-strategy---c-maintain_ratio).

#### Using Aspect Ratio along with either Height or Width parameter

You can explicitly define an aspect ratio (`ar` ) along with either width (`w` ) or height (`h` ) to automatically calculate the other dimension.

**Example:**

```auto
https://ik.imagekit.io/demo/sample-video.mp4?tr=w-720,ar-1-1

```

This URL sets the width to 720px and applies a 1:1 aspect ratio, resulting in a height of 720px automatically.

Read more on how to use this transformation on your Videos [here](https://imagekit.io/docs/video-resize-and-crop#aspect-ratio---ar).

**Note:** If you use either method—setting exact width and height, or combining width or height with aspect ratio—your video might get cropped to fit those new dimensions.

### **Using `crop` Mode to make sure the videos are not cropped while resizing**

#### [Pad resize crop strategy](https://imagekit.io/docs/video-resize-and-crop#pad-resize-crop-strategy---cm-pad_resize)

The `pad_resize` strategy resize your video in the asked aspect ratio without cropping by adding padding to match the requested dimensions if needed.

**Example:**

```auto
https://ik.imagekit.io/demo/sample-video.mp4?tr=w-720,h-720,cm-pad_resize

```

This ensures the output is exactly 720x720, with padding filling any extra space needed to preserve the aspect ratio.

You can control the position of the padding using the [focus](https://imagekit.io/docs/video-resize-and-crop#focus---fo) `fo` parameter. Additionally, you can customize the padding area by applying a background color or using a blurred background effect with the [background](https://imagekit.io/docs/effects-and-enhancements#background---bg) `bg` transformation.

#### [Forced crop strategy](https://imagekit.io/docs/video-resize-and-crop#forced-crop-strategy---c-force)

The `c-force` strategy resizes your video by forcibly stretching or squashing it to fit exactly within the specified output dimensions.

**Example:**

```auto
https://ik.imagekit.io/demo/sample-video.mp4?tr=w-720,h-720,c-force

```
