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

# Migrate from Remotion

> Move a Remotion project to Rendermate: media and fonts, compositions as documents, input props, captions, rendering and the Player, step by step.

A Remotion video is React code that you render on your own infrastructure. A Rendermate video is a
[document](https://rendermate.com/docs/documents.md): the whole video as JSX data, versioned like a git repository and rendered
on Rendermate's GPUs. This guide moves a Remotion project over in the order you'd do it: media
first, then each composition, then rendering and delivery.

***

## (1) How do I move my media and fonts to Rendermate?

Upload your `public/` folder to your workspace. The [CLI](https://rendermate.com/docs/cli.md) keeps a folder in step with one in
your workspace, uploading only new and changed files:

```bash theme={null}
rendermate login
rendermate sync ./public
```

Each file is then an asset, such as `public/intro.mp4`. To use a file on the web, import it with
`import_asset` (`POST /v1/imports`) instead.

### How do fonts move over?

A font you loaded with `@remotion/google-fonts` or `loadFont()` becomes a `.ttf` or `.otf` file in
the workspace. Sync it with the rest of `public/`, then declare it in the document's
`assets.fonts`, as the next step shows.

***

## (2) How do I rebuild a composition as a document?

There are two ways to write the documents.

### (A) Let your coding agent migrate it

Connect Claude Code or Cursor to `https://api.rendermate.com/mcp`
([Claude Code](https://rendermate.com/docs/mcp/claude-code.md), [Cursor](https://rendermate.com/docs/mcp/cursor.md)) and ask it to rebuild a composition from
your Remotion project. Every document it reads starts with a comment that explains the notation, so
it can write the document with `create_document` and `edit_document` and check each moment with
`get_frame`. The mapping below is what it follows.

### (B) Write the documents with the API

Create an empty document, read it, then add your nodes in one edit:

```bash theme={null}
curl https://api.rendermate.com/v1/documents \
  -H "Authorization: Bearer $RENDERMATE_API_KEY" \
  --json '{ "name": "Launch video" }'
```

`GET /v1/documents/{id}` returns the document's `jsx` and `version`. Commit your changes with
`POST /v1/documents/{id}/versions`, giving `base_version` and either `edits` (replacements in the
JSX you read) or the whole edited `jsx`.
[How do I edit a document?](https://rendermate.com/docs/documents.md#how-do-i-edit-a-document) shows both. An empty document is
10 seconds of 1920×1080 at 30 fps; change its `canvas` in the same edit to match your composition.

### How does a composition map onto a document?

| Remotion | | Rendermate |
| - | - | - |
| `<Composition>` | → | A document |
| `width`, `height` | → | `canvas.width`, `canvas.height` |
| `fps={30}` | → | `canvas.frameRate`: `{numerator: 30, denominator: 1}` |
| `durationInFrames={300}` at 30 fps | → | `canvas.duration`: `10` (seconds) |
| A component tree | → | The `<timeline>` element's child nodes |
| `staticFile("intro.mp4")` | → | An asset declared as `asset://public/intro.mp4` |

### How do Sequence and Series map?

A node's `common` has `start` and `duration` in seconds. Divide frame numbers by the frame rate:

| Remotion | | Rendermate |
| - | - | - |
| `<Sequence from={30} durationInFrames={90}>` at 30 fps | → | `common={{start: 1, duration: 3, order: "a1"}}` |
| `<Series>` | → | Nodes whose `start` is where the one before ends, or a `sequence` node |
| Later siblings drawn on top | → | `order` keys: `"a0"` paints under `"a1"` |

[How do order keys work?](https://rendermate.com/docs/documents.md#how-do-order-keys-work) explains the keys.

### How do AbsoluteFill, Img, Video, Audio and text map?

| Remotion | | Rendermate node |
| - | - | - |
| `<AbsoluteFill style={{backgroundColor: "#10233f"}}>` | → | `<fill>` with a solid `paint` |
| `<OffthreadVideo src={…} startFrom={30}>` | → | `<media>` with an `assetId` from `assets.media` and `sourceIn={1}` |
| `<Img src={…}>` | → | `<media>` with an `assetId` from `assets.images` |
| `<Audio src={…} volume={0.3}>` | → | `<audio>` with `gain={0.3}` |
| A `<div>` with text and CSS | → | `<text>` with `paragraph` content and a font from `assets.fonts` |
| `objectFit: "cover"` | → | `fit="cover"` and a `destination` rectangle |
| `transform: "scale(1.2) rotate(15deg)"` | → | `common.transform` with `scaleX`, `scaleY` and `rotate` |
| `opacity` | → | `common.opacity` |

Declare every file a node uses before `export default`:

```jsx theme={null}
export const assets = {
  fonts: [{id: "inter", family: "Inter", weight: 700, style: "normal", source: {type: "uri", uri: "asset://public/Inter-Bold.ttf"}}],
  media: [{id: "intro", source: {type: "uri", uri: "asset://public/intro.mp4"}}],
};
```

[The documents page](https://rendermate.com/docs/documents.md#how-do-i-show-a-video-or-an-image) has a complete example of each
node.

### How do interpolate() and spring() map?

`Doc.keys([seconds, value, easing], …)` animates any number, timed from the node's own `start`.
This fade:

```tsx theme={null}
const opacity = interpolate(frame, [0, 15], [0, 1], {extrapolateRight: "clamp"});
```

is, at 30 fps:

```jsx theme={null}
common={{start: 0, duration: 3, order: "a2", opacity: Doc.keys([0, 0], [0.5, 1])}}
```

| Remotion | | Rendermate |
| - | - | - |
| `interpolate()` with an input range of frames | → | `Doc.keys()` with times in seconds |
| `Easing.out(Easing.cubic)` | → | `"easeOutCubic"` |
| `spring()` | → | An `easeOutBack` easing for the overshoot and settle |
| A value several components share | → | A `const` before `export default` |
| Arithmetic in JSX | → | Arithmetic in the document, such as `(1920 - 2 * 80) / 3` |

[How do I animate a value?](https://rendermate.com/docs/documents.md#how-do-i-animate-a-value) lists every easing.

***

## (3) How do I replace input props?

Your code writes them into the document. A document is data, so the logic your component ran on
`inputProps`, such as a title, a list to map over or a brand colour, runs in your code or your
agent, which writes the result as JSX:

* **One video per record:** call `create_document` with the `jsx` built from the record.
* **A change to one video:** commit an `edits` replacement, such as the title's text, on the version
  you read.

Every edit is a new version that stays readable, with its author and message.

***

## (4) How do I move captions?

Transcribe the video's sound with a transcription model, such as `assemblyai/universal-2` or
`elevenlabs/scribe-v2`, through `create_generation` (`POST /v1/generations`). The transcript, saved
as an asset, has every word with its start and end time. Write those as `text` nodes, each starting
at its word's or line's start. [Models](https://rendermate.com/docs/models.md) lists every model and what it takes.

***

## (5) How do I render, preview and share?

| Remotion | | Rendermate |
| - | - | - |
| `npx remotion studio` | → | `create_preview` for a live preview page, `get_frame` for a still of any moment |
| `npx remotion still` | → | `get_frame` (`POST /v1/documents/{id}/frames`) |
| `npx remotion render`, `renderMediaOnLambda()` | → | `create_export` (`POST /v1/exports`), then `get_export` |
| Lambda webhooks | → | [Webhooks](https://rendermate.com/docs/webhooks.md): `export.succeeded` and `export.failed` |
| `<Player>` in your app | → | A link (`create_link`): a page, an embed and HLS playback |

An export renders on Rendermate's GPUs, and exporting a version again reuses what was already
rendered. `export.succeeded`'s `data` has the `download_url`.

A link plays one fixed version, or follows `latest`, so it plays each new version as you commit it.
It can autoplay, show controls, expire and ask for a password, and its pages can be on
[your own domain](https://rendermate.com/docs/custom-domains.md).

***

## (6) How do I switch over?

### (A) All at once

For a project with a few compositions, rebuild them all, check them with `get_frame`, and point your
code at `create_export` and your links in one release.

### (B) One composition at a time

For a larger project, keep rendering with Remotion while you move compositions over one by one:

1. Rebuild one composition as a document.
2. Compare stills: `npx remotion still` and `get_frame` at the same times.
3. Switch the code that renders that composition to `create_export`, or replace its `<Player>` with a
   link's embed.
4. Move on to the next composition.

***

## Next steps

* [Documents](https://rendermate.com/docs/documents.md): every node, keyframes, assets and errors.
* [Webhooks](https://rendermate.com/docs/webhooks.md): verify and handle `export.succeeded`.
* [MCP server](https://rendermate.com/docs/mcp/overview.md): connect an agent that edits and checks videos.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.