Skip to content

Repository files navigation

Cortex Videogen

Turns the domain knowledge inside a Cortex instance into short marketing videos — 16:9 or 9:16, 15 to 120 seconds — with AI-generated footage (Venice.ai), retention-first storyboarding, burned-in karaoke captions, a color grade, a call-to-action end card, and optional shader transitions on GPU-capable machines. One simple form in, one MP4 out.

Beta — open source and ready to self-host today, but not yet launched on the Cortex cloud offering. The fastest way to run it: tell your coding agent (Claude Code, Codex, opencode, Hermes, …) to spin up Cortex Videogen and point it at cortexskills.org — it finds full setup context there and helps you connect the app to your Cortex instance. The only thing you provide beyond that is a Venice.ai API key, which accesses and pays for the media generation models (MiniMax H3 and others).

The video pipeline is a sibling of cortex-trainings and inherits its hard-won production architecture: every shot is generated from a start frame, every cost is quoted before it is spent, every artefact is cached so a resume never pays twice, and the final assembly is a deterministic offline HyperFrames render.

How it works

  1. Brief — topic, audience, CTA, format (16:9/9:16), length, pacing, goal, video model + resolution (from the live Venice catalog — draft cheap, publish max), optional seed, optional character/product and style reference images (1–3 each, vision-analyzed at upload).
  2. Research — the connected Cortex instance supplies the substance: claims, numbers, differentiators. The storyboard may not invent what the research does not support.
  3. Storyboard(gate) — written against platform retention data (hook ≤3s, pacing envelopes, word budgets, muted-viewer subtitles, safe areas — see docs/marketing-playbook.md). You approve or regenerate with feedback before anything derives from it.
  4. Voiceover — per-sentence TTS with an exact timeline (that's where caption timing comes from — no transcription round-trip).
  5. Films(gate) — start frames via image multi-edit (reference-conditioned), then image-to-video per shot. The full cost is quoted and confirmed before generation; queue tickets survive crashes so nothing is paid twice.
  6. Assembly + QA — deterministic HyperFrames composition: uniform grade, karaoke captions, CTA card, gapless narration + optional music bed (media/music.mp3), and — opt-in via SHADER_TRANSITIONS=on — shader transitions at the storyboard's narrative turns. Master (final.mp4) + social delivery copy, probed before the run is called done.

Running it

npm install # workspaces: apps/web, packages/shared
cp .env.example .env # fill in VENICE_API_KEY, CORTEX_BASE_URL, CORTEX_API_KEY
npm run dev # http://localhost:3000

Runtime needs Node 22+. ffmpeg/ffprobe are picked up from PATH, with the bundled ffmpeg-static/ffprobe-static as automatic fallback. The first HyperFrames render may need its browser: npx hyperframes doctor (run in apps/web).

Verify the assembly stack without spending anything:

node scripts/smoke-render.mjs # 16:9 synthetic render through the real composition
node scripts/smoke-render.mjs 9:16

Costs

Video generation is the budget; everything else is cents. A 30s punchy video is ~8–10 shots ≈ $5–7 of footage on the default MiniMax H3 at 2K (cheaper models are one dropdown away for test runs) plus ~$0.35 per generated start frame. The quote gate shows the real number before anything is spent. The CTA card costs $0 — it is rendered locally, which is also the only way to get legible text.

Seeds and reproducibility

Venice accepts a seed for chat and plain image generation but not for video or multi-edit (verified against the API schema — docs/venice-notes.md). So the seed field makes the storyboard and unreferenced start frames reproducible, while clips get their determinism from disk caching: re-runs regenerate only what you delete.

Docs

Credits

Production architecture derived from the cortex-trainings project. Rendering by HyperFrames (Apache-2.0). AI provider: Venice.ai. Domain knowledge: your Cortex instance.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages