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

@creately/rdm-video

v0.2.0

Published

Turn RDM diagrams into beat-synced, audio-reactive explainer videos — pixel-perfect browser capture with ffmpeg encoding

Readme

@creately/rdm-video

Turn RDM diagrams into beat-synced, audio-reactive explainer videos. Pixel-perfect browser capture — the video pipeline is a camera operator, not a renderer. Whatever the real canvas draws is what ends up in your MP4.

MIT License

Install

bun add @creately/rdm-video
bunx playwright install chromium

You also need ffmpeg on your PATH (or ffmpeg-static, which is an optional dep), and a compiled rdm-editor.iife.js bundle.

Quick start (library)

import { renderVideo, RenderVideoEmitter } from '@creately/rdm-video';

const events = new RenderVideoEmitter();
events.on('progress', ({ aspect, frame, totalFrames }) => {
  process.stderr.write(`\r${aspect}: ${frame}/${totalFrames}`);
});

const result = await renderVideo({
  rdmText: `---
type: orgchart
title: "My Team"
---
org T {
  position ceo "Alice" { title: "CEO" }
  position eng "Bob"   { title: "Eng Lead" }
  ceo -> eng
}`,
  editorBundle: '/abs/path/to/rdm-editor.iife.js',
  aspects: ['16x9', '9x16'],
  preset: 'explainer',
  outputDir: '/tmp/out',
  events,
});

console.log(result.outputs['16x9']?.mp4Path);
// → /tmp/out/rdm-video-16x9.mp4

Quick start (CLI)

# The editor bundle can be passed explicitly, via RDM_VIDEO_EDITOR_BUNDLE,
# or auto-discovered from cwd/sibling repos.
export RDM_VIDEO_EDITOR_BUNDLE=/abs/path/to/rdm-editor.iife.js

rdm-video my-diagram.rdm --preset explainer --aspect 16x9,9x16

API

renderVideo(options)

interface RenderVideoOptions {
  rdmText?: string;       // RDM source (one of rdmText/rdmPath required)
  rdmPath?: string;       // File path sugar
  editorBundle: string;   // Absolute path to rdm-editor.iife.js (required)
  preset?: string;        // banger | explainer | doc | keynote | editorial | cinematic
  template?: string;
  aspects?: Aspect[];     // ['16x9'] | ['9x16'] | ['16x9','9x16','1x1']
  fps?: number;
  outputDir?: string;
  outputName?: string;
  config?: Partial<RenderConfig>;  // music, bpm, splash, outro, brand, …
  preview?: boolean;      // Render 1-second preview instead of full video
  dryRun?: boolean;       // Compute timeline, skip render
  events?: RenderVideoEmitter;
}

Returns:

interface RenderVideoResult {
  jobId: string;
  outputs: Partial<Record<Aspect, {
    mp4Path: string;
    durationMs: number;
    sizeBytes: number;
    framesWritten: number;
  }>>;
  metadata: {
    preset?: string;
    template: string;
    stepCount: number;
    totalDurationMs: number;
    renderedAt: string;
    renderMs: number;
    hasAudio: boolean;
  };
  warnings: string[];
}

Events

Subscribe via a RenderVideoEmitter:

| Event | Payload | |---|---| | log | { level, prefix, message } | | aspect-start | { aspect, width, height, totalFrames } | | progress | { aspect, frame, totalFrames, phase } | | aspect-complete | { aspect, outputPath, durationMs, sizeBytes } |

Errors

All API failures throw RdmVideoError with a structured code:

try {
  await renderVideo({ ... });
} catch (err) {
  if (err instanceof RdmVideoError) {
    console.error(err.code, err.message, err.hint);
    if (err.retryable) { /* retry */ }
  }
}

Error codes: INVALID_INPUT, RDM_PARSE_ERROR, PRESET_UNKNOWN, PRESET_VALIDATION_FAILED, EDITOR_BUNDLE_MISSING, BROWSER_LAUNCH_FAILED, ENCODER_FAILED, MUSIC_NOT_FOUND, TIMELINE_EMPTY.

Multi-aspect rendering

Passing aspects: ['16x9', '9x16', '1x1'] renders all three from a single renderVideo() call. The browser launches once and each aspect is captured in a fresh Playwright context. Wall time is dominated by the first launch (~3s) plus per-aspect context mount (~1s), not full browser restarts.

Presets

import { listPresets, loadPreset } from '@creately/rdm-video';

console.log(listPresets());
// [{ name: 'banger', description: '...', ... }, ...]

Merge order (lower overrides higher):

  1. Library defaults (DEFAULT_CONFIG)
  2. Preset config (--preset)
  3. Sidecar file (<name>.video.json next to <name>.rdm)
  4. Explicit config in options / CLI flags

Editor bundle

The pipeline runs the real Creately canvas inside headless Chromium. To do that it needs the compiled rdm-editor.iife.js. Build it from creately-ai (bun run build:rdm-editor) and pass its path via editorBundle (or RDM_VIDEO_EDITOR_BUNDLE env var for the CLI).

License

MIT