Local-first · Reproducible · Reviewable

TextVideoGen

An OpenCode-driven local video production workspace. You supply only the script, the communicative goal and the business constraints; agents take on creative proposals, direction, storyboards, assets, production, checks and revision so the audience understands the content on first viewing — with code, video projects and the runtime kept apart.

A vertical video frame generated by TextVideoGen

At a glance

TextVideoGen splits local video production into 13 reviewable stages: script, voice, alignment, creative treatment, direction, storyboard, assets, per-scene rendering, composition, QA, final review, revision and delivery. Structured contracts record the inputs and outputs of each stage, so a change only reruns the scenes it affects; every scene can be produced as HTML/SVG motion, an image, a hybrid or B-roll.

About this project

What it addresses

Generated video commonly suffers from processes that cannot be reviewed and from whole-run reruns after a local change. TextVideoGen leaves you responsible only for the script, the goal and the constraints; agents handle the rest, and production is split into stages governed by contracts, so the inputs, outputs, versions and review decisions of every step remain traceable.

How the pipeline is organised

A project contract comes first, then agents propose two or three producible creative treatments and recommend one. Narration, timing alignment, direction, storyboard and scene assets follow in order; after per-scene rendering, technical QA runs and a delivered version is produced only once human review passes. When something changes, impact analysis comes first.

What it uses

OpenCode schedules the multi-stage tasks; Voicebox handles narration, WhisperX handles timing alignment, rendering runs on HTML / SVG Motion with Playwright, and composition uses FFmpeg. JSON Schema and hashes record the input-output relationships.

Current status

The v0.1.0 source release is published and the workspace currently supports macOS Apple Silicon. Historical generation artefacts were cleared during the packaging pass; old projects keep only their source scripts and cleanup logs, and production restarts from the script stage.

13 StagesFrom script to delivery
4 Scene FormatsHTML · image · hybrid · B-roll
v0.1.0First source release
macOS arm64Currently supported platform

Video generation as engineering

Each stage has explicit inputs, structured outputs, versions and review gates.

Isolated Runtime

Node, pnpm, Python, uv, WhisperX, Chromium, FFmpeg and models stay inside .videoenv.

Structured Contracts

Projects, storyboards, motion checks, revisions and prompts are constrained by the JSON Schemas in schemas/ and the prompts in prompts/.

Full Provenance

Provider calls, stage results, review decisions and deliveries remain traceable.

Minimal Recompute

Impact analysis rerenders only affected scenes; unchanged output is hash-verified.

Production pipeline

GPT handles creative work, direction, revision scope and the final gate; DeepSeek handles collation, metadata and preliminary checks, whose results must be reviewed.

01—02Script + Voice

Structured script and local Voicebox narration.

03—04Align + Creative

WhisperX alignment, then agent creative treatments.

05—06Director + Storyboard

Direction and storyboards bound to text and assets.

07—08Assets + Render

Registered scene assets and per-scene frame rendering.

09—10Compose + QA

Single filter-graph assembly and technical QA.

11—13Review + Revise + Deliver

Human review, targeted revision and atomic delivery.

From HTML Motion to video

Browser rendering and an FFmpeg media pipeline combine expressive motion with precise timing; the shared renderer defaults to 30 fps and can switch to 60 fps for fast movement.

01 · Scene

Scene Contract

Captions, assets and visual signatures.

02 · Browser

Playwright

HTML / SVG scenes become JPEG streams.

03 · Encode

FFmpeg

image2pipe avoids thousands of frame files.

04 · Compose

Exact Assembly

One filter graph retimes, joins and mixes audio.

05 · Verify

Automated QA

Decode, black, freeze, silence and A/V checks.

Archived sample output

An earlier sample, “Four Gates of English Learning”: 1080 × 1920, 30 fps, 18 scenes. Its generated artefacts were cleared during the packaging pass and the project returned to the script stage, so the frames and verification data below are an archived record.

QA evidence (archived): all 18 scenes are present in order; video/audio duration differs by 0.011667 s; no decode errors, black frames or silence over 0.8 s; nine affected scenes were rerendered and nine unchanged scenes were hash-verified.

Getting started and everyday commands

Every entry point lives in bin/, with separate commands for setup, projects, logging, delivery and packaging.

Prepare the environment

./bin/setup installs the runtime, dependencies, browser and models into .videoenv; ./bin/check-environment only inspects, running no model inference.

Create and produce

./bin/new-project my-video "Title" scaffolds a project, then ./bin/opencode-video hands production to the agents.

Log and check

./bin/video-log records stage events, and ./bin/pnpm-video check combines type, isolated-environment and Voicebox checks.

Safe delivery and recoverability

The workspace concentrates on production; the finished film only moves into the macOS Movies folder once it has been approved.

No overwrite

./bin/deliver-video never overwrites an existing version and records the destination path, file size and SHA-256.

Code and film kept apart

The final video leaves the repository, leaving only a committable delivery record and full production provenance.

Rebuildable environment

Deleting .videoenv leaves source and projects untouched; rerunning ./bin/setup restores the pinned environment.

Source release packages

./bin/package-workspace builds a source package without private projects or the runtime; the v0.1.0 package is about 22 MB.

Publishable content only

Code, configuration, lockfiles, shared assets and the Skills / plugin sources travel; Git metadata, dependencies, models, caches, logs, credentials and old projects do not.

Separate output folder

Each run writes to .videoenv/tmp/packages/release-<time>-<random>/, so earlier archives and checksums are never overwritten.

Verify, then install

A SHA-256 checksum ships alongside the archive; unpack it into a new directory and run ./bin/setup to rebuild the pinned environment.

Technology

Local models, browser rendering and media processing in one workspace.

OpenCodeTypeScriptNode.jsPythonpnpmuvVoiceboxWhisperXPlaywrightHTML / SVG MotionFFmpegJSON SchemaH.264 + AACmacOS arm64
Back to projects