How I Built a Programmatic Video Generator With VideoFlow in Node.js
I kept running into the same problem: once a video lived in a manual timeline, I lost the ability to regenerate it cleanly. One tiny copy change, one updated product frame, or one new render target and the whole thing turned into another editing job.
VideoFlow pushed me toward a better shape: describe the video in TypeScript, compile it into portable VideoJSON, and render the same source in the browser, on a server, or inside a live preview. That makes the pipeline feel like code instead of a one-off creative file.
If you want the short version, here is the workflow I actually care about:
- Start with
@videoflow/coreand model the video in code. - Keep the intermediate format portable so it can be stored, versioned, and reused.
- Pick the renderer based on where export needs to happen.
- Add the React editor only when users need a visual layer on top.
The project is open source under Apache-2.0, and the main entry points are the VideoFlow site, docs, core docs, renderers docs, React video editor, playground, and examples.
The Small Pipeline I Actually Wanted
I did not want a fancy editorial toolchain. I wanted a small, repeatable path from structured input to MP4 output. In practice, that means the video authoring step needs to be code-first, and the rendering step needs to stay flexible.
This is the minimal shape I kept coming back to:
npm install @videoflow/core
import VideoFlow from "@videoflow/core";
const $ = new VideoFlow({
name: "My Video",
width: 1920,
height: 1080,
fps: 30,
});
$.addText(
{ text: "Hello, VideoFlow!", fontSize: 7, fontWeight: 800 },
{ transitionIn: { transition: "overshootPop", duration: "500ms" } }
);
const json = await $.compile();
const blob = await $.renderVideo();
That tiny example is doing the important part: it separates scene authoring from output. compile() gives you a portable representation of the video, and renderVideo() gives you the MP4 when you need it.
I like this setup because it turns video into a thing I can inspect, rebuild, and swap between environments without rewriting the whole project. For product demos, templated social clips, onboarding videos, or generated reports, that matters more than any single animation trick.
Why VideoJSON Changes The Maintenance Story
The big win is not just that the videos are generated. It is that the source of truth becomes portable.
When the intermediate format is JSON, I can:
- Store templates in Git and review changes like code.
- Feed structured data from a CMS, database, or AI agent into the same template.
- Reuse one video design across multiple render targets without rebuilding the scene logic.
- Keep the project easier to diff when a prompt, scene, or CTA changes.
That is also where the comparison to older workflows becomes clearer. Traditional timeline editing is great when the work is mostly manual and creative. But if the goal is repeatability, versioning, or automation, a JSON source of truth is much easier to reason about.
If you want the browser-export angle, I covered that separately in How to Build a Browser-Based MP4 Export Pipeline with VideoFlow. For the portable-data angle, How to Build a Portable JSON-to-Video Workflow with VideoFlow goes deeper on the same idea.
Browser, Server, And Live Preview
VideoFlow is useful to me because the same video description can move through different render paths instead of being trapped in one environment.
-
@videoflow/renderer-browseris the right fit when export should happen in the user's browser. -
@videoflow/renderer-serveris the better fit when I want queue jobs, APIs, CI, or batch rendering. -
@videoflow/renderer-domis what I want when I need a live preview inside an app or editor.
That separation matters because it lets the same scene logic serve multiple product needs. An editor can preview frames live. A backend can render jobs overnight. A browser app can export without shipping the whole project to a rendering service. I wrote about the server/browser split before in How to Build a Video JSON Pipeline That Renders Everywhere With VideoFlow.
Where The React Editor Fits
I do not reach for the React editor first. I reach for it when the product needs non-developers to adjust or inspect the video without touching code.
The React video editor is the layer that makes that practical: multi-track timeline, drag and drop, keyframes, transitions, undo/redo, uploads, theme choices, and MP4 export.
That is the difference between a library and a workflow. The library gives me the rendering primitive. The editor gives me a human interface when the product calls for one.
What I Still Review Manually
Automation is not the same thing as blind publishing. I still review the things that can break trust fast:
- Product names, prices, and claims.
- Copy that is too generic or too promotional.
- Visuals that do not match the intent of the post.
- Templates that should be versioned before they are reused.
For that reason, I like treating VideoFlow as the engine and not the entire editorial process. The engine should be fast, portable, and predictable. The review step should stay human where accuracy matters.
I also keep How I Kept Video Templates Versionable in Git With VideoFlow and How I Built a Programmatic Video Generator in Node.js nearby when I am deciding whether to ship a scene as code or as a visual editor workflow.
Related Reads
- How to Build a Browser-Based MP4 Export Pipeline with VideoFlow
- How to Build a Portable JSON-to-Video Workflow with VideoFlow
- How I Kept Video Templates Versionable in Git With VideoFlow
- How to Build a Video JSON Pipeline That Renders Everywhere With VideoFlow
Next Step
If you are starting from scratch, I would do it in this order: create one template, render it once in Node, then decide whether browser export or a React editor is the next requirement. The fastest way to test that path is the VideoFlow playground plus the docs.
What would you automate first?




Top comments (0)