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

# oanim render

> Export your composition to MP4

```bash theme={null}
oanim render [options]
```

Renders your composition to MP4. Reads configuration from `animate.json` in the current directory.

## Options

| Flag                 | Description                               | Default                    |
| -------------------- | ----------------------------------------- | -------------------------- |
| `--out <path>`       | Output file path                          | `out/{compositionId}.mp4`  |
| `--fps <n>`          | Frames per second                         | from animate.json (30)     |
| `--res <WxH>`        | Resolution (e.g. `1920x1080`)             | from animate.json          |
| `--codec <codec>`    | Video codec: `h264`, `h265`, `vp8`, `vp9` | from animate.json (`h264`) |
| `--props <json>`     | Input props as JSON string                | from animate.json          |
| `--composition <id>` | Composition ID override                   | from animate.json          |
| `--cloud`            | Render in the cloud (requires auth)       | `false`                    |

## animate.json reference

Every Open Animate project has an `animate.json` at the root:

```json theme={null}
{
  "name": "My Video",
  "compositionId": "MyComp",
  "render": {
    "fps": 30,
    "width": 1920,
    "height": 1080,
    "codec": "h264",
    "crf": 18
  },
  "props": {}
}
```

| Field           | Type   | Default  | Description                                     |
| --------------- | ------ | -------- | ----------------------------------------------- |
| `name`          | string | required | Human-readable name                             |
| `compositionId` | string | required | Must match `<Composition id="...">` in Root.tsx |
| `render.fps`    | number | `30`     | Frames per second                               |
| `render.width`  | number | `1920`   | Video width in px                               |
| `render.height` | number | `1080`   | Video height in px                              |
| `render.codec`  | string | `"h264"` | `h264`, `h265`, `vp8`, `vp9`                    |
| `render.crf`    | number | `18`     | Constant Rate Factor (quality)                  |
| `props`         | object | `{}`     | inputProps passed to the composition            |

<Note>
  **CRF (Constant Rate Factor)** controls video quality vs file size. Lower values = higher quality but larger files. `18` is visually lossless for most content. Use `23` for smaller files, or `12-15` for maximum quality.
</Note>

## Common resolution presets

```json theme={null}
// 1080p (default)
{ "width": 1920, "height": 1080, "fps": 30 }

// 4K
{ "width": 3840, "height": 2160, "fps": 30 }

// Vertical (Reels/TikTok)
{ "width": 1080, "height": 1920, "fps": 30 }

// Square (Instagram)
{ "width": 1080, "height": 1080, "fps": 30 }
```

## Examples

### Basic render

```bash theme={null}
oanim render
# → reads animate.json, outputs to out/MyComp.mp4
```

### Override resolution and codec

```bash theme={null}
oanim render --fps 60 --res 3840x2160 --codec h265 --out out/4k.mp4
```

### Pass input props

```bash theme={null}
oanim render --props '{"title": "My Product", "color": "#ff0000"}'
```

### Cloud render

```bash theme={null}
# Requires authentication
oanim login

# Render in the cloud
oanim render --cloud
```

Cloud rendering bundles your project locally with `remotion bundle`, uploads it, and streams progress. The rendered video is downloaded to your output path when complete. See [Cloud Rendering](/platform/cloud-rendering) for details.
