Turn JSON code
into programmatic videos .
import VideoFlow from '@videoflow/core';
const $ = new VideoFlow({
name: 'VideoFlow trailer',
width: 1920, height: 1080, fps: 30,
backgroundColor: '#ffffff',
});
// ── Act 1: brand intro (white bg) ─────────────────────────────────────────────
const intro = $.addText(
{
text: 'Introducing',
fontSize: 5, fontWeight: 500, color: '#52596a',
position: [0.5, 0.5],
letterSpacing: -0.05,
},
{
transitionIn: { transition: 'blurResolve', duration: '300ms' },
transitionOut: { transition: 'fade', duration: '450ms' },
},
);
intro.animate(
{ letterSpacing: -0.05 },
{ letterSpacing: 0.20 },
{ duration: '1.7s', easing: 'easeOut', wait: false },
);
$.wait('1.6s');
intro.remove({ in: '100ms' });
// Logo + wordmark composited in one group so a single 3D tilt animates both.
const brand = $.group(
{ position: [0.5, 0.5] },
{
transitionIn: { transition: 'tilt3d', duration: '700ms' },
transitionOut: { transition: 'blurResolve', duration: '500ms' },
},
() => {
$.addImage(
{ fit: 'contain', scale: 0.22, position: [0.28, 0.5] },
{ source: 'https://videoflow.dev/images/logo.png' },
);
$.addText({
text: 'VideoFlow',
fontSize: 9, fontWeight: 800, color: '#0c1018',
position: [0.57, 0.5],
letterSpacing: -0.04,
});
},
{ waitFor: 0 },
);
$.wait('0.8s');
const sub1 = $.addText(
{
text: 'A library to create and render videos programmatically',
fontSize: 2.5, fontWeight: 500, color: '#3a4257',
position: [0.5, 0.66],
},
{
transitionIn: { transition: 'slideUp', duration: '600ms', params: { distance: 0.04 } },
transitionOut: { transition: 'fade', duration: '400ms' },
},
);
$.wait('1.8s');
sub1.remove({ in: '100ms' });
const tagline = $.addText(
{
text: 'Turn JSON into Video',
fontSize: 3.6, fontWeight: 800, color: '#FF5A1F',
position: [0.5, 0.66],
letterSpacing: -0.02,
},
{
transitionIn: { transition: 'overshootPop', duration: '600ms', params: { from: 0.7 } },
transitionOut: { transition: 'blurResolve', duration: '450ms' },
},
);
// [...]
const blob = await $.renderVideo();1. Install
npm i @videoflow/core2. Build
const $ = new VideoFlow();
$.addText({ text: 'Hi' }, {
transitionIn: { transition: 'overshootPop' },
});3. Render
const blob = await $.renderVideo();4. Video Editor
<VideoEditor video={json} />Cinema-grade primitives, not just keyframes.
27 transition presets, 42 GLSL effect passes, and a layer-group container that composites a sub-tree as a single visual unit. All declarative, all rendered identically across the three backends.
One JSON. Every surface.
VideoFlow ships as three composable pieces — the builder, the renderers, and the React video editor. Use one, two, or all three. They speak the same JSON.
Write videos like code.
@videoflow/core — a fluent TypeScript builder that compiles to portable VideoJSON. Six layer types, layer groups, parallel branches, transitions, effects, keyframes on every property.
Render anywhere.
Browser → MP4 Blob. Server → MP4 file. DOM → live preview at 60 fps. One JSON feeds all three backends with no changes.
Edit videos visually.
@videoflow/react-video-editor — drop <VideoEditor /> into any React app and get a multi-track timeline, keyframes, transitions, effects, four themes, and MP4 export.
Videos as data.
Every VideoFlow video is just JSON. Version it. Diff it. Template it. Generate it from an LLM. Render it later on a server without the editor ever running.
Frame-perfect keyframes
Animate any property with any easing. Nest branches in $.parallel(), composite sub-trees with $.group().
Six layer types
Text, image, video, audio, captions, shape — plus a group container that nests them.
Resolution-agnostic
1em = 1% of the project width. Render 720p and 4K from the same JSON.
Open source where it matters.
The biggest player in this space ships a closed commercial core. We don't. VideoFlow's core and renderers are Apache-2.0 — forever.
Open source, not a teaser tier
The full builder and all three renderers are Apache-2.0. Fork it, embed it, commercialise it.
JSON-first, not React-first
Scenes are plain data. Any stack — Python, Go, Rust, an LLM — can author a video.
No framework lock-in
Pure @videoflow/core runs in Node and browsers with zero framework dependency.
Start composing.
The playground walks you from flow code, to JSON, to a live preview, to the full editor — in four steps.