Skip to main content
Resize a video to exact dimensions or force a specific aspect ratio by adding w_, h_, and ar_ tokens to the URL. Autorender rounds dimensions to even values for codec compatibility.
These tokens behave the same for images. See the shared resize and aspect ratio page for the image reference.

How do width and height work?

Set the output width to 400 px (w_400) and height with h_. If you provide only one dimension, Autorender calculates the other to preserve the source proportions.

How to force an aspect ratio?

Add ar_ to fix the output proportions regardless of the source ratio. Common ratios: ar_1:1 for social feeds, ar_16:9 for landscape, ar_9:16 for vertical, ar_4:5 for portrait.
We recommend setting ar_ whenever a layout expects a fixed shape (e.g. ar_1:1 for a square card) so the video stays correctly proportioned across devices.

How does the video fill the box?

The fit mode controls what happens when the source ratio does not match the target box:
  • cm_pad_resize resizes the video to fit inside the box and adds padding to fill the empty space.
  • cm_extract crops the video to fill the exact box.
When you use cm_pad_resize, set the padding color with bg_.
Width and height are rounded to even values before encoding, because common video codecs require even dimensions. Smaller dimensions render faster and cost less bandwidth.

Next steps

Pad resize

Fit a video into a fixed box with a padding color.

Rotate

Reorient a video by 90, 180, or 270 degrees.

Image resize

The same resize tokens applied to images.

Video overview

Every video transform token in one reference.