npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

retime-nle

v0.1.2

Published

NLE timeline exporter for Remotion: FCPXML, Premiere Pro XML, OpenTimelineIO

Readme

retime-nle — Remotion Timeline Exporter for Final Cut Pro, Premiere Pro & OpenTimelineIO

npm version license: MIT node >= 18

Export a Remotion video timeline to a professional NLE in one step: Final Cut Pro (FCPXML .fcpxml), Adobe Premiere Pro (XML .xml), or OpenTimelineIO (OTIO .otio, DaVinci Resolve compatible).

Declare your timeline once as a Clip[] array, render it with Remotion, and export the same data everywhere. No fork of Remotion Studio. No background server. No AST parsing.

Contents

Features

  • Three NLE formats from one timeline: FCPXML 1.10, Premiere xmeml v4, OTIO Timeline.1 JSON.
  • Single source of truth: the same Clip[] drives the Remotion render and every export, so edits and XML can never drift apart.
  • Zero-dependency core: the retime-nle entry and CLI run on plain Node 18+ — no React needed.
  • Remotion-ready React entry (retime-nle/react): ReTimeTrack wraps clips in Remotion Sequences; ReTimeExportButtons drops into @remotion/player custom controls for in-browser downloads.
  • Validated input: frame-accurate integer checks with clear errors before anything is written.

Install

npm install retime-nle

Requirements: Node.js 18+. React 18+, remotion 4+, and @remotion/player 4+ are peer dependencies only for the retime-nle/react entry (see installation).

Quickstart

CLI — export the bundled sample manifest to all three formats:

npx -p retime-nle retime-nle --manifest ./example/timeline.json --format fcpxml --out ./example/out.fcpxml
npx -p retime-nle retime-nle --manifest ./example/timeline.json --format premiere --out ./example/out.xml
npx -p retime-nle retime-nle --manifest ./example/timeline.json --format otio --out ./example/out.otio

Code — export from any Node script:

import { exportTimeline } from "retime-nle";
import type { Clip } from "retime-nle";

const clips: Clip[] = [
  { src: "static/intro.mp4", from: 0, durationInFrames: 90, name: "Intro" },
  { src: "static/main.mp4", from: 90, durationInFrames: 150, name: "Main", startFrom: 12 },
];

const xml = exportTimeline(clips, 30, "fcpxml", "demo-timeline");

Export formats

| Format | Flag | Extension | Opens in | | --- | --- | --- | --- | | Final Cut Pro XML | fcpxml | .fcpxml | Final Cut Pro | | Premiere Pro XML | premiere | .xml | Premiere Pro | | OpenTimelineIO | otio | .otio | DaVinci Resolve, OTIO tools |

Times are serialized as frame-exact frames/fps rationals (FCPXML), frame counts (Premiere), and RationalTime values (OTIO). Clips are sorted by from before serializing. Details: api-reference.

Core idea

Clip[]  --->  ReTimeTrack (Remotion render)
        --->  exportTimeline() (FCPXML / Premiere / OTIO)
        --->  CLI manifest JSON (same shape)

If render and export disagree, two different arrays were passed. Keep one clips.ts module (see example/clips.ts) and import it everywhere.

Usage

New here? Start with Using retime-nle in your Remotion project — install, clips.ts, composition wiring, export, NLE handoff.

CLI

retime-nle --manifest ./timeline.json --format fcpxml|premiere|otio [--fps 30] [--out ./out.timeline] [--id my-comp]
retime-nle --help

The retime command is shipped as a convenience alias. Full flag reference: cli-reference. Manifest schema: manifest-format.

Programmatic export

import { exportTimeline, extensionFor, mimeFor, validateTimeline } from "retime-nle";

Signatures and error cases: api-reference.

Remotion render component

import { ReTimeTrack } from "retime-nle/react";
import { clips } from "./clips";

export const MyComp: React.FC = () => <ReTimeTrack clips={clips} />;

Each clip becomes a Remotion Sequence with matching from/durationInFrames. Pass renderClip to customize per-clip rendering.

Player export buttons

import { ReTimeExportButtons } from "retime-nle/react";

<Player
  controls
  renderCustomControls={() => (
    <ReTimeExportButtons clips={clips} fps={30} compositionId="demo" />
  )}
  {...playerProps}
/>

Pure client-side Blob download — no server round-trip. Full example: example/player-usage.tsx. Setup guide: player-integration, tutorial.

Repository layout

retime-nle/
  README.md
  LICENSE
  package.json
  tsconfig.json
  src/
    types.ts       # Clip, TimelineManifest, ExportFormat
    codecs.ts      # toFcpxml, toPremiereXml, toOtio
    export.ts      # exportTimeline, validateTimeline, extensionFor, mimeFor
    cli.ts         # bin: retime-nle (alias: retime)
    index.ts       # public core entry (retime-nle)
    react.ts       # public React entry (retime-nle/react)
    Timeline.tsx   # ReTimeTrack (Remotion Sequence wrapper)
    controls.tsx   # ReTimeExportButtons (Player custom controls)
  example/
    timeline.json      # sample manifest
    clips.ts           # shared Clip[] source of truth
    player-usage.tsx   # Player + renderCustomControls example
  docs/
    installation.md
    remotion-project-guide.md
    quickstart.md
    manifest-format.md
    cli-reference.md
    player-integration.md
    api-reference.md
    troubleshooting.md
    publishing.md
    publishing.md
    tutorials/
      01-first-export.md
      02-player-buttons.md
      03-premiere-workflow.md

Documentation

Credits

  • Sunyin Elisbrown — author and maintainer (@Elisbrown).
  • Remotion — the React video framework this package integrates with (Sequence, Player, renderCustomControls).
  • OpenTimelineIO — the open interchange format behind the .otio export.

Author

Sunyin Elisbrown — [email protected] — github.com/Elisbrown. Issues: github.com/Elisbrown/retime-nle/issues.

License

MIT — see LICENSE.