> ## Documentation Index
> Fetch the complete documentation index at: https://autorender.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Rotate

> Reorient a video by 90, 180, or 270 degrees to correct or match a playback layout.

`r_` rotates a video clockwise in **90°** steps to correct its orientation or match a player layout. Autorender supports **90°**, **180°**, and **270°**.

<Info>
  These tokens behave the same for images. See the shared [rotate](/docs/transformations/rotate) page for the image reference.
</Info>

## How to use it?

Add `r_` followed by the angle.

| Token   | Angle    | What it does                      |
| ------- | -------- | --------------------------------- |
| `r_90`  | **90°**  | Rotates clockwise by **90°**      |
| `r_180` | **180°** | Rotates by **180°** (upside down) |
| `r_270` | **270°** | Rotates clockwise by **270°**     |

<Tabs>
  <Tab title="Original">
    <div className="flex object-contain justify-center mt-4">
      <video src="https://assets.autorender.io/LOKVTtKVGb/w_400/doc/skateboarding.mp4" controls className="shadow-lg max-w-full" />
    </div>
  </Tab>

  <Tab title="Rotate 90°">
    ```bash theme={null}
    https://assets.autorender.io/LOKVTtKVGb/r_90,w_400/doc/skateboarding.mp4
    ```

    <div className="flex object-contain justify-center mt-4">
      <video src="https://assets.autorender.io/LOKVTtKVGb/r_90,w_400/doc/skateboarding.mp4" controls className="max-w-full" />
    </div>
  </Tab>

  <Tab title="Rotate 180°">
    ```bash theme={null}
    https://assets.autorender.io/LOKVTtKVGb/r_180,w_400/doc/skateboarding.mp4
    ```

    <div className="flex object-contain justify-center mt-4">
      <video src="https://assets.autorender.io/LOKVTtKVGb/r_180,w_400/doc/skateboarding.mp4" controls className="max-w-full" />
    </div>
  </Tab>
</Tabs>

`r_180` produces the same result as `flip_hv`, but rotation reads more clearly for orientation fixes such as a phone video shot vertically that needs a horizontal player.

<Warning>
  Output dimensions are snapped to even values after rotation, because common video codecs require even dimensions.
</Warning>

## Next steps

<CardGroup cols={2}>
  <Card title="Flip" icon="left-right" iconType="solid" href="/docs/video/flip">
    Mirror a video horizontally or vertically instead.
  </Card>

  <Card title="Image rotate" icon="rotate" iconType="solid" href="/docs/transformations/rotate">
    The same rotate token applied to images.
  </Card>
</CardGroup>
