Video SDK

Videos from code. Rendered at scale.

A programmatic video SDK with a TypeScript API, declarative `.cuitty` video blocks, and a Playwright + FFmpeg rendering pipeline. Compose layered timelines, render pixel-perfect output, and serve from CLI, server, or browser.

Interactive timeline

Live preview
Welcome to Cuitty
00:00:00 · f0
0.0s / 10s
background
Gradient BG
title
Welcome Text
code
SDK Sample
browser
Browser Frame
0s1s2s3s4s5s6s7s8s9s10s
Welcome Texttext
start 0f
end 150f
dur 5.0s
opacity 0.00
y 40.0px

4 layers. 300 frames at 30 fps. Click clips to inspect, press play to animate.

Define your composition

import { composition, tween, spring, Easing } from '@cuitty/video';
import { render } from '@cuitty/video-render';

const video = composition({
  id: 'product-demo',
  width: 1920, height: 1080,
  fps: 30, durationInFrames: 300,
});

video.layer('background', (ctx) => `
  <div style="width:${ctx.width}px;height:${ctx.height}px;
    background:linear-gradient(135deg,#667eea,#764ba2);">
  </div>
`);

video.layer('title').clip({
  startFrame: 0,
  endFrame: 150,
  render: (ctx) => {
    const opacity = tween(ctx.frame, [0, 30], [0, 1], { clamp: true });
    const y = tween(ctx.frame, [0, 30], [40, 0], {
      clamp: true,
      easing: Easing.out(Easing.cubic),
    });
    return `<h1 style="opacity:${opacity};
      transform:translateY(${y}px);">
      Welcome to Cuitty
    </h1>`;
  },
});

await render({
  composition: video,
  outputPath: './output/demo.mp4',
  codec: 'h264',
  crf: 18,
});

TypeScript SDK for full control. `.cuitty` video blocks for config-driven workflows. CLI for automation.

Six surfaces. One pipeline.

SDK

Programmatic composition API.

Build videos in TypeScript with tween(), spring(), and data-driven renders. Full type safety, IDE autocomplete, and composable layer abstractions.

DSL

Declarative `.cuitty` video blocks.

Define videos as data. Layers, clips, animations, and output settings live beside product metadata and export to Video YAML or renderer IR.

Renderer

Playwright + FFmpeg pipeline.

Each frame renders as HTML in a headless browser, then FFmpeg encodes to MP4, WebM, or GIF. Pixel-perfect output with full CSS/SVG support.

Player

In-browser preview component.

Web Component with scrubbing, seeking, and layer inspection. Hot-reload during development. Embed previews anywhere.

CLI

Terminal-first workflow.

Render from the command line with progress bars, batch mode, and a hot-reload preview server. Pipe compositions through CI/CD.

Server

HTTP render endpoint.

POST a composition JSON, receive the encoded video. Queue-backed with progress callbacks. Deploy as a microservice or sidecar.

Architecture

InputIREngineOutputYAML / JSON DSLTypeScript SDKComposition IRRendererPlaywright + FFmpegPlayerCLIHTTP API

Works with the rest of Cuitty.

Auth

Signed render requests. API keys and HMAC verification for server-side rendering. Same auth primitives as the rest of Cuitty.

See the SDK →
Persist

Store rendered videos in Persist's blob storage. Local-first with sync. Automatic backup, versioning, and signed URLs.

See Persist →
Portal Module

Manage compositions, monitor render queues, and preview videos from the Cuitty admin portal. Full CRUD with real-time status.

See Observe →
Observe integration

Every render job, frame progress event, and encoding result emits to your Observe modules. Track render performance in traces, failures in errors, and queue depth in performance.

Start creating videos.

Programmatic video from TypeScript or YAML. Pixel-perfect rendering with Playwright and FFmpeg. Preview in the browser, render from the CLI, or serve over HTTP. Install the SDK and ship your first video in five minutes.