Skip to main content

Importing OpenTimelineIO

You can import an OpenTimelineIO (.otio) timeline as an editable Remotion composition.

In Remotion Studiov4.0.542​

Open Remotion Studio and choose File → Import OpenTimeline....
Select an .otio file.

The File menu in Remotion Studio with the Import OpenTimeline action.

Choose a composition name, width, height, and composition folder.
Frame rate and duration are automatically detected.

OpenTimeline import settings with a composition ID, dimensions, detected frame rate, and duration.

Click Add to root file.
A new composition will be created and opened for editing.

The imported MyEdit composition in Remotion Studio, with three individually editable clips on the timeline.

Via the CLIv4.0.543​

Use the npx remotion open-timeline import from the Remotion project:

Import a timeline
npx remotion open-timeline import my-edit.otio

Specify the composition ID, and where the media files are located with flags:

Choose the composition settings
npx remotion open-timeline import my-edit.otio \ --composition=MyEdit \ --media-dir=/path/to/media

Programmaticallyv4.0.542​

warning

Experimental: @remotion/codemods is not stable and subject to change.

Install @remotion/codemods at the same version as the other Remotion packages in the project:

npx remotion add @remotion/codemods

Use addOpenTimelineComposition() to create a component and register it in the root file:

import-timeline.ts
import {readFileSync, writeFileSync} from 'node:fs'; import {addOpenTimelineComposition} from '@remotion/codemods'; const result = addOpenTimelineComposition({ project: { rootDir: process.cwd(), files: { 'src/Root.tsx': readFileSync('src/Root.tsx', 'utf8'), }, }, compositionFile: 'src/Root.tsx', compositionId: 'MyEdit', component: { filePath: 'src/MyEdit.tsx', importName: 'MyEdit', importPath: './MyEdit', }, timeline: readFileSync('my-edit.otio', 'utf8'), width: 1920, height: 1080, fps: 30, }); for (const change of result.changes) { if (change.nextContents !== null) { writeFileSync(change.filePath, change.nextContents); } }

The function does not copy media or install dependencies.

Referenced media​

The .otio file does not explicitly specify where the media files live.
You must explicitly say where they are.

By default, Studio looks in the same folder where the .otio file lies.
If media cannot be found, Studio shows a button Locate media... where you can select its folder.

remotion.new only supports URLs and existing public assets.

Referenced local files are copied into the project's public folder.

Limitations​

Not all OpenTimeline effects are supported. Warnings are shown in Studio, CLI and emitted from the programmatic API.

Reverse playback, custom transitions, and unsupported timeline structures may throw an error and prevent importing.

Application-specific crop, scale, and color adjustments are not interpreted.

See supported timelines for the full compatibility details.

See also​