---
title: "Client-Side Video Rendering | Rendley SDK Docs"
description: "Render video in the browser using the device GPU and CPU. WebCodecs for hardware-accelerated encoding with a WASM fallback. Zero server cost."
url: https://docs.rendley.com/sdk/rendering/render-on-device/
---

# Render in the browser

The advantage of this approach is that you can use the device’s CPU and GPU for rendering, significantly reducing costs by avoiding the need to send all the assets of the composition. This rendering method works on both web browsers and mobile devices.

We use the [WebCodecs API](https://developer.mozilla.org/en-US/docs/Web/API/WebCodecs_API) for hardware-accelerated encoding and decoding. If your browser does not support the WebCodecs API, we fall back to a WASM-based approach, which is widely supported but slightly slower.

### Export video

To export the final video, simply call the [`export()`](https://docs.rendley.com/sdk/api-reference/classes/Engine.html#export) function, which will return a blob URL for the completed video.

```
const result = await Engine.getInstance().export();
```

If the rendering is successful, the [`result`](https://docs.rendley.com/sdk/api-reference/interfaces/ExportResult.html) variable will contain the final blob of the video, along with the file extension.

## Export options

Pass an options object to control output format, resolution and quality:

```
const result = await Engine.getInstance().export({
  format: "mp4",          // "mp4" | "webm"
  resolution: 1080,       // vertical pixels: width scales to match the aspect ratio
  videoBitrate: 8_000_000 // bits per second
});
```

| Option | Type | Default | Description |
| --- | --- | --- | --- |
| `format` | `string` | `"mp4"` | Container format. `"webm"` is faster but less compatible. |
| `resolution` | `number` | composition height | Target height in pixels. |
| `videoBitrate` | `number` | auto | Video bitrate in bps. Higher = larger file, better quality. |
| `audioBitrate` | `number` | `128000` | Audio bitrate in bps. |

## Track export progress

Listen to the `export:progress` event to display a progress bar or percentage:

```
Engine.getInstance().on("export:progress", (progress: number) => {
  console.log(`Rendering: ${Math.round(progress * 100)}%`);
});
```

## Browser compatibility

| Browser | Encoding | Notes |
| --- | --- | --- |
| Chrome / Edge 94+ | WebCodecs (hardware) | Fastest path. Uses the device GPU. |
| Safari 16.4+ | WebCodecs (hardware) | Supported since Safari 16.4. |
| Firefox | WASM fallback | WebCodecs not yet shipped; the SDK falls back automatically. |
| Mobile Chrome / Safari | WebCodecs | Works on modern Android and iOS devices. |

The SDK detects capabilities at runtime. You never need to branch on the browser yourself: just call `export()` and the fastest available path is chosen.

## Large files and chunked output

For projects larger than a few minutes, consider enabling [chunked output](https://docs.rendley.com/sdk/getting-started/export/#large-files-and-chunked-output) to avoid hitting the browser’s single-blob allocation limit. Chunks can be streamed straight to your server or saved via the File System Access API.

## What to read next

- **[Render on a server](https://docs.rendley.com/sdk/rendering/render-on-server/)** runs the same pipeline headlessly for production volume.
- **[Export to MP4](https://docs.rendley.com/sdk/getting-started/export/)** encodes the composition and tracks progress.
- **[Best practices](https://docs.rendley.com/sdk/best-practices/)** covers memory, preloading and keeping playback smooth.

[Previous pageExport](https://docs.rendley.com/sdk/getting-started/export/) [Next pageRender on a server](https://docs.rendley.com/sdk/rendering/render-on-server/)
