Project Info
Watch Demo 1: Kubernetes Explained in 60 Seconds Watch Demo 2: The Ursidae Family Brought to Life
Inspiration
A picture is worth a thousand words, but it doesn't make something click the way a good video does. The problem is that making a good explainer video normally takes hours. The obvious shortcut, "just ask AI to generate the video," has its own problem: anyone who's tried it has seen what it looks like. Characters that shift between shots, objects that flicker or melt, a style that never quite holds together from one second to the next. Anddd it's expensive. We wanted the middle path: structured, illustrated slides that actually stay consistent and readable, brought to life with real, deterministic animation instead of AI-guessed motion. That's Explainer Kit.
What it does
Explainer Kit is a Codex plugin that turns a topic, script, article, or narration audio into a finished explainer video, end to end, inside a Codex workspace. Reads the source and extracts only what matters: a central idea, the essential supporting points, no invented facts. Then it builds a truthful causal story around it (an audience proxy, real stakes, a turning point, a payoff), capped at 3-6 scenes so nothing gets padded out just to hit a duration. Generates the entire storyboard in one single image-generation call, every scene together on one contact sheet, like a page of a comic book, plus (when a character or object recurs) a row of matching cutouts drawn once on a chroma-key background so it's never redrawn from scratch. Hands that sheet to deterministic code, not another AI call, to slice it into pixel-exact scenes. Image models can't reliably count pixels, so a local compositor rebuilds the exact geometry itself. Generates narration per scene, not as one giant voiceover, measuring each clip's real duration so the video's timeline is built from actual audio instead of a guess. Word-aligns the narration to drive karaoke-style captions and reveal timing. An arrow or label appears exactly when the narrator says the word it corresponds to. Renders the deterministic motion layer (arrows, highlights, transitions, reused cutouts) over the illustrated backgrounds with Remotion. Titles and labels are never baked into the AI-generated image, so they stay exact and editable. Runs a validator before it's allowed to call the job done: exact scene geometry, one voice clip per scene, audio and video synced to the millisecond. The result is a handful of animated, narrated scenes and roughly a minute of video explaining something that might otherwise take pages to understand. Watch Demo 1: Kubernetes Explained in 60 Seconds Watch Demo 2: The Ursidae Family Brought to Life
How we built it
We told Codex to build the plugin itself. Codex building a Codex plugin, editing its own future toolset. Sol handled planning: story-engine design, the skill contracts, the overall pipeline architecture. Terra and Luna picked up the smaller implementation tasks underneath that plan, split by difficulty, using the Superpowers plugin with brainstorming, plan and subagent-driven development to break the work into concrete, checkable steps instead of one giant undirected build. Watching Codex extend itself this way and later catch and fix its own bugs in a plugin it wrote was one of the most fun parts of this project! ...However human intervention was definitely needed (see the "
Challenges we ran into
" section). So we would go back and forth from Codex building big chunks to checking and adding fixes along the way after testing the plugin. Under the hood, Explainer Kit is a set of skills (structured markdown instructions Codex reads and follows) plus deterministic local tooling for the parts that shouldn't be left to AI judgment. Three cooperating skills: a storyboard-director skill (planning: essence, story engine, narration, slide plan, image prompt), a render-storyboard-video skill (rendering: split, voice, sync, captions, Remotion, finalize), and a create-explainer-video skill that orchestrates both end to end. Shared rules (visual style, story craft, the master image prompt, the overlay JSON contract) live in reference files the skills point to, instead of being duplicated three times. Deterministic scripts own anything that must be exact: a compositor that rebuilds pixel-perfect 4:3/16:9 geometry after generation, an FFprobe-based audio analyzer, a word-level aligner (faster-whisper) for captions and reveal timing, a chroma-key cutout extractor, and a final validator that hard-gates completion. A bundled Remotion project renders the deterministic overlay layer (shapes, text, animation cues, layered cutouts, camera moves) driven entirely by a JSON project file the skills generate, never by more AI generation. A small Cloudflare Worker (MCP server) wraps OpenAI's TTS and an upscaling model behind two tools (generate_voiceover, upscale_image) the skill calls mid-task, so the plugin needs no local API keys by default. Everything downstream of generation (cropping, mixing, syncing, final encoding) runs locally with FFmpeg and FFprobe. No cloud render farm. Challenges we ran into The gap between "the skill says to" and "Codex actually does." A real end-to-end run skipped the deterministic geometry step, generated one giant voiceover instead of per-scene clips (which broke sync), never consulted the style reference (drifting into an unrequested visual style), and produced twice as many scenes as intended... and still reported success, because nothing was actually checking. We fed that failed run straight back into Codex and had it fix its own plugin: turn every "should" into a script that exits non-zero and blocks completion if it's skipped. Windows on ARM64 broke rendering for two unrelated reasons. Remotion's native compositor has no ARM64 build at all, so the template needs to run under x64 Node. Separately, a native-dependency chain (word-alignment's backend) needed the same x64-vs-arm64 check. Every native binary in the stack had to be verified on the actual target architecture, nothing about it was assumable from the OS alone. Deciding what AI should own vs. what code should own. Image generation is great at "draw a believable scene" and bad at "produce an exact 4:3 canvas." The fix was to never ask the model for precision it can't deliver: let it draw, and let deterministic code measure, crop, and verify. Instruction cost. An earlier version of the skill files repeated the same visual-style and prompt-template rules across three separate files, which was expensive and time consuming on every single run. Splitting shared rules into reference files the skills point to (instead of duplicating them) cut the combined skill instructions from roughly 650 lines to about 135, same behavior, a fraction of the tokens.
Accomplishments we're proud of
The first iteration of the plugin was a complete disaster. The images were blurry, everything was out of sync and, cherry on top, it used a programable voice library which made the whole thing sound very creepy. Seeing it come together neatly with overlays, text and audio synced perfectly was very satisfying!
What we learned
Anything an agent can skip, it eventually will. The reliable fix for that is a script that fails loudly, not a stronger sentence in the instructions. The best output came from constraining the AI less on style guesses and more on geometry and timing. In other words: draw with AI, measure with code. The most confusing failures come from small platform details (native architecture mismatches, a missing optional dependency) that are invisible until the pipeline is actually run end to end on the real target machine, not something you catch by reading the code.
What's next
Self-hosting docs so the media service doesn't depend on a single shared endpoint. Vertical (9:16) and multi-aspect-ratio polish for short-form platforms, more catered to content creators. A wider house visual-style library so users pick a look instead of only getting the default. A fast, cheap smoke-test path that verifies the plugin works without requiring a full multi-minute generation.
Codex Explainer Video Plugin
Turns a topic, script, article, or narration audio into a story-driven explainer video: one pixel-verified storyboard of at most 6 scenes, locked OpenAI voiceover per scene, word-focused karaoke captions, deterministic Remotion overlays, and local FFmpeg delivery.
source → essence/story → storyboard sheet(s) → upscale → canonicalize
→ per-scene voiceover ∥ (parallel with the above)
→ measured timings → word captions → Remotion overlays → FFmpeg finalize
Prerequisites
- Codex installed and available from your terminal.
- FFmpeg installed and available as
ffmpegandffprobe. - Node.js and npm for videos that use animated shapes or essential text overlays.
- Python with
pydubandfaster-whisperfor narration rhythm analysis and word alignment. Python 3.13+ also needsaudioop-lts. - A Codex workspace where generated video files can be saved.
Verify FFmpeg and install Python dependencies (run from the plugin root):
ffmpeg -version
ffprobe -version
python3 -m pip install -r requirements-audio.txt
Install the plugin
Run these commands in order:
codex plugin marketplace remove codex-explainer-video-plugin
codex plugin marketplace add Gyana491/codex-explainer-video-plugin
codex plugin add codex-explainer-video-plugin@codex-explainer-video-plugin
The first command removes an older marketplace registration. If Codex reports that the marketplace is not installed, continue with the next command.
Finish setup
- Close and reopen Codex after the installation completes.
- Start a new Codex task so the plugin's skills and media tools are loaded.
- Open or create a writable workspace for the generated storyboard, audio, and video files.
- Confirm that FFmpeg is available in the same environment where Codex is running.
No local API keys or MCP server configuration are required for the published plugin — see Media service below for the default endpoint and self-hosting.
Quick start
codex plugin list
Confirm codex-explainer-video-plugin appears in the installed plugin list. In a new Codex task, try:
Create an explainer video about how solar panels work. Use the default style and voice. Save it in this workspace.
The skills carry the story, geometry, and production rules — the prompt only needs to state topic, duration, and any style preferences.
Media service
The plugin uses OpenAI voiceover through its bundled media service; it does not use ElevenLabs. By default .mcp.json points at the author's Cloudflare Worker (explainer-video-media-mcp.gyan491.workers.dev). This is third-party infrastructure — availability and quotas are not guaranteed. For production use, self-host:
cd mcp-server
cp .dev.vars.example .dev.vars # set OPENAI_API_KEY and REPLICATE_API_TOKEN
npm install
npx wrangler deploy
Then point .mcp.json's url at your deployed worker's /mcp endpoint. See mcp-server/README.md for local dev, R2 configuration, and secret management.
Overlays and layout QA
Storyboard panels combine with editable Remotion overlays for diagrams, charts, equations, labels, counters, kinetic text, and transparent foreground cutouts. Overlays support explicit depth, anchored groups, and separate artwork/screen coordinate spaces so annotations follow camera motion while titles stay fixed. The default visual theme is an editorial paper-collage style (cream background, dark ink, warm and cool accents, Inter typography) — see references/house-style.md for the full direction and references/overlay-storyboard.md for the theme block.
Run the layout analyzer before the final Remotion render to catch text or filled shapes that collide with dense illustration detail:
node scripts/analyze-overlay-layout.mjs my-video/src/project.json --json my-video/output/layout-report.json
For smarter placement, add scene objects, anchored overlay groups, and element intent metadata to project.json, then run npm run layout-fix (moves colliding or auto-place text) and npm run layout-stills (renders a contact sheet at output/qa/layout/layout-contact-sheet.png for review before a full render).
A successful render leaves only the finalized output/explainer-video.mp4; the Remotion intermediate is kept only when finalization fails, for diagnosis.
Troubleshooting
- Windows ARM64: run the bundled overlay template with x64 Node.js under Windows emulation — Remotion does not publish a native ARM64 compositor. The template preflight reports this before rendering. Set
REMOTION_BROWSER_EXECUTABLEto override browser discovery for a custom Chrome or Edge path. - Word alignment unavailable: if
faster-whisperis not installed,scripts/align_words.pyfalls back to proportional phrase-level timing and reports it intiming_source— captions stay phrase-accurate but are not word-verified.
Reinstall or update
codex plugin marketplace remove codex-explainer-video-plugin
codex plugin marketplace add Gyana491/codex-explainer-video-plugin
codex plugin add codex-explainer-video-plugin@codex-explainer-video-plugin
Then restart Codex and use a new task.
Built with Codex
We told Codex to build the plugin itself — Codex building a Codex plugin, editing its own future toolset. Sol handled planning: story-engine design, the skill contracts, the overall pipeline architecture. Terra and Luna picked up the smaller implementation tasks underneath that plan, split by difficulty, using the Superpowers plugin to break the work into concrete, checkable steps instead of one giant undirected build.
At runtime the plugin keeps using Codex and GPT-5.6: Codex's built-in image generation draws every storyboard scene in a single call, and GPT-5.6 drives the planning, narration, and validation judgment calls the skills describe. A real end-to-end run once caught Codex skipping its own pipeline steps — one giant voiceover instead of per-scene clips, an unrequested visual style, twice the intended scene count — and reporting success anyway. We fed that failed run back into Codex and had it fix its own plugin: turn every "should" into a script that exits non-zero and blocks completion if it's skipped. Watching Codex extend, then debug, a plugin it wrote for itself was one of the most fun parts of building this.
Analysis
View
Metric
- 31
- 10
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- OpenAIIn code
- PythonIn code
- ReactIn code
- TypeScriptIn code
4 of 4 appear in the indexed code.
AI coding agents
- CodexConfig
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
652 KB
Source files
26
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
Gyana491/codex-explainer-video-plugin
59 files · 985 KB · @ 4a1e78a
Structure
Application logic
7 files · 12%Domain rules, services and shared utilities.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- TypeScript88%
- Markdown9%
- Python4%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
mcp-server/package.json
npm · 10- @modelcontextprotocol/sdk
- agents
- openai
- replicate
- zod
- +5 more
assets/remotion-overlay-template/package.json
npm · 6- @remotion/cli
- react
- react-dom
- remotion
- +2 more
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.