code-video-explainerDocumentation
SETUP & TROUBLESHOOTING · V4–V9 WORKFLOW

Getting started with code-video-explainer

Install the local runtime and skill packs in minutes, preview frame-accurate animations in your browser, and export 1080p MP4 videos with synchronized SRT subtitles on demand.

Supports: Claude Code · OpenAI Codex · Antigravity · Cursor Need help? support@skillmp4.com

1. Prerequisites

All rendering, voiceover alignment, and MP4 export run locally on your machine (Windows or macOS). Before installing a skill pack, verify these requirements:

  • Python 3.10+ with required packages:
    pip install numpy soundfile librosa playwright pillow playwright install chromium
  • Node.js (18+ recommended) if you use JS linting or agent CLI tooling; the local web player itself runs standard ES modules directly in Chromium.
  • ffmpeg installed and available on your system PATH (used for audio mixing and 1080p MP4 export).
  • Optional dependencies: faster-whisper (or transformers + torch, ideally with GPU) for word-level alignment of real voice recordings; Tesseract OCR for screenshot text-box detection via tools/ocr_cap.py.
  • Supported AI coding agents: Claude Code (CLI / Desktop), OpenAI Codex, Antigravity, Cursor, or any coding agent using the included starter prompt.

Verify your Python environment in one command:

python -c "import numpy, soundfile, librosa, playwright; print('ok')"

2. Three-Step Installation

Step 01

Download & Unzip

Download the free Foundation pack (and any unit packs you own from My library) as zip archives and extract them.

Step 02

Place in Skills Folder

Move the extracted folder into your agent's skills directory (see paths below) so your agent automatically discovers SKILL.md.

Step 03

Scaffold & Prompt

Run new_project.py to verify the 94-second demo in your browser, then prompt your agent with your script or voiceover recording.

Agent skill directory paths

Agent Recommended Skill Folder
Claude Code / Claude Desktop ~/.claude/skills/code-video-explainer-v4/ (or -v5/ .. -v9/)
OpenAI Codex ~/.codex/skills/code-video-explainer-v4/ (or -v5/ .. -v9/)
Antigravity / Cursor / Other agents Place in your workspace or agent skills folder and reference SKILL.md at the start of the session.

Verify with the built-in 94-second demo

python new_project.py ./my-demo --demo cd ./my-demo python serve.py 8765

Open http://127.0.0.1:8765/index.html to play the demo. You can also inspect individual preset sheets via index.html?only=shotsheet, ?only=setsheet, ?only=charsheet, or mascot_sheet.html.

2.5 Series Quick Start (V5–V9)

Each series (V5–V9) is a standalone 1600×900 pure Canvas 2D runtime with its own free foundation pack, four modular unit packs (u01–u04), and full-episode bundle. Unzip the downloaded archives into code-video-explainer-vN/, then scaffold with new_project.py --packs:

V5 · Dark Luminous

Borderless lit Canvas geometry over flowing dark aurora backdrops, frosted glass cards, analytic spring physics, sub-frame motion blur, and six transitions (push, whip, iris, wipe, fade, cut).

python new_project.py ./my-v5 --packs base,u01 # Full series bundle: python new_project.py ./my-v5-all --packs bundle cd ./my-v5 && python serve.py 8765
  • base (v5-base) — Player, review deck, alignment tools, spring/transition runtime (?only=sheet5_trans)
  • u01 (v5-u01) — Data · Dark Luminous Charts: 18 chart primitives + count5 (?only=sheet5_data)
  • u02 (v5-u02) — Evidence & Photos · Dark Floating (?only=sheet5_evidence)
  • u03 (v5-u03) — Explainer · Dark Luminous Props: 30 objects (?only=sheet5_props, ?only=sheet5_props2)
  • u04 (v5-u04) — Hero & Kinetic Typography: Title5, Particles5 (?only=sheet5_typo)
  • bundle (v5-bundle) — All V5 packs concatenated in one workspace

V6 · Die-Cut Sticker Collage

Thick 8–12px white die-cut sticker borders (zero ink outlines) slapped onto colored dot-grid paper with soft drop shadows, glossy highlights, 5fps stop-motion wobble, and sticker transitions (peel, flip, zoom, cut).

python new_project.py ./my-v6 --packs base,u01 # Full series bundle: python new_project.py ./my-v6-all --packs bundle cd ./my-v6 && python serve.py 8765
  • base (v6-base) — Die-cut core primitives, folded-paper curtain, sticker transitions (?only=sheet6_trans)
  • u01 (v6-u01) — Data · Sticker Charts: washi-tape rulers, 10×10 dot boards, 14 charts (?only=sheet6_data, ?only=sheet6_data2)
  • u02 (v6-u02) — Evidence & Photos · Album Collage (?only=sheet6_evidence, ?only=sheet6_evidence2)
  • u03 (v6-u03) — Scenes & Props · Paper Diorama: 31 sticker objects (?only=sheet6_stage, ?only=sheet6_props2)
  • u04 (v6-u04) — Hero & Typography · Sticker Headlines: 6 typography styles (?only=sheet6_typo)
  • bundle (v6-bundle) — All V6 packs + unified lib/sticker6.js entry

V7 · Isometric Miniature World

Fixed 30° 2.5D isometric diorama with flat 3-tone face shading (100% / 86% / 70%), flat 10% ground shadows (zero outlines or blur), and camera transitions (fly, overview, cut).

python new_project.py ./my-v7 --packs base,u01 # Full series bundle: python new_project.py ./my-v7-all --packs bundle cd ./my-v7 && python serve.py 8765
  • base (v7-base) — 30° isometric core projection, three text layers, camera transitions (?only=sheet7_trans)
  • u01 (v7-u01) — Data · Isometric Charts: diagonal columns, candlesticks, 14 charts (?only=sheet7_data, ?only=sheet7_data2)
  • u02 (v7-u02) — Evidence & Photos · Archive Cards (?only=sheet7_evidence, ?only=sheet7_evidence2)
  • u03 (v7-u03) — Scenes & Flow · Miniature Diorama: towns, pipelines, 24 props (?only=sheet7_world, ?only=sheet7_props2)
  • u04 (v7-u04) — Hero & Typography · Isometric Billboards (?only=sheet7_typo)
  • bundle (v7-bundle) — All V7 packs concatenated in one workspace

V8 · Hand-Drawn Marker Sketch

Clean warm cream paper (#FCFAF4) with deep-ink double strokes (#23263A), translucent multiply marker hatching, red-pen callouts (#E5432D), zero gradients/springs, and sketch transitions (retract, rush, sweep, cut).

python new_project.py ./my-v8 --packs base,u01 # Full series bundle: python new_project.py ./my-v8-all --packs bundle cd ./my-v8 && python serve.py 8765
  • base (v8-base) — Sketch stroke & marker-hatch core, sketch transitions (?only=sheet8_trans)
  • u01 (v8-u01) — Data · Marker Sketch Charts: ratio/bars + 13 charts (?only=sheet8_data, ?only=sheet8_data2)
  • u02 (v8-u02) — Evidence & Photos · Taped Paper Cards (?only=sheet8_evidence, ?only=sheet8_evidence2)
  • u03 (v8-u03) — Explainer · Sketch Props & Storyboards: streetscapes, 3-panel skits, 24 props (?only=sheet8_props, ?only=sheet8_props2)
  • u04 (v8-u04) — Hero & Typography · Marker Headlines (?only=sheet8_typo)
  • bundle (v8-bundle) — All V8 packs concatenated in one workspace

V9 · Swiss Editorial Design

Invisible 12-column grid on off-white stock (#F2EFE6) with a five-value two-color print palette (#151515 ink, #EF4423 spot, 15%/30% flat grays), multiply overprints, zero shadows/gradients/bounce, and color-plate transitions (wipeH, wipeV, wipeSkew, chapter, cut).

python new_project.py ./my-v9 --packs base,u01 # Full series bundle: python new_project.py ./my-v9-all --packs bundle cd ./my-v9 && python serve.py 8765
  • base (v9-base) — Swiss grid primitives, hairline rules, spot-color transitions (?only=sheet9_trans)
  • u01 (v9-u01) — Data · Two-Color Print Charts: editorial bars + 13 charts (?only=sheet9_data, ?only=sheet9_data2)
  • u02 (v9-u02) — Evidence & Quotes · Swiss Layout (?only=sheet9_evidence, ?only=sheet9_evidence2)
  • u03 (v9-u03) — Explainer · Geometric & Split-Color Props: portals, diagrams, 26 pictograms (?only=sheet9_props, ?only=sheet9_props2)
  • u04 (v9-u04) — Hero & Typography · Swiss Editorial (?only=sheet9_typo)
  • bundle (v9-bundle) — All V9 packs concatenated in one workspace

Example agent prompt

Use code-video-explainer-v4 to create a video preview for this script. Follow SKILL.md and the step-by-step workflow docs, align the voiceover, run spec_check.py and shoot.py on each module, and deliver the local web preview first.

3. Production Workflow at a Glance

  1. Scaffold project: Run python new_project.py <project-folder> and set your title in config.js.
  2. Audio & word alignment: Run python -X utf8 tools/build_audio.py --tts (offline voice) or --narration recording.mp3 to generate timeline.json, align.json, and background music via tools/make_bgm.py.
  3. Storyboard & scenes: Generate word timestamps with tools/words.py, map each spoken cue to presets (evidenceShot, photoShot, dataShot, stockShot, clipShot, 3D sets, 2D sticker scenes, or character skits), and register modules in config.js.
  4. Automated QA: Run python -X utf8 tools/spec_check.py --only <module>, tools/shoot.py, tools/margin_check.py, and tools/font_check.py to clear layout, clipping, floating, or z-fighting issues.
  5. Review & Export: Review in the browser deck (playback speed, press M for timestamped notes, export review JSON for revisions via tools/read_review.py). When satisfied, click Export MP4 in the player and generate subtitles with tools/make_srt.py.

4. Troubleshooting

Timeline scrubbing does not work or embedded video clips drift out of sync

Always start the preview server with python serve.py 8765. Do not use python -m http.server, which does not support HTTP Range requests required for seeking audio and video clips.

A newly created project stays stuck on "Loading"

An empty scaffolded project has no audio or timeline.json yet. Run python -X utf8 tools/build_audio.py --tts (or pass --narration) to build the timeline, or create a demo project with --demo to preview immediately.

Playwright or Chromium fails when running shoot.py, spec_check.py, or capture.py

Ensure Chromium is installed via playwright install chromium. Also avoid running these scripts with Python's isolated flag (python -I), which can resolve a different environment without Playwright. Use python -X utf8 instead.

ffmpeg is not recognized during audio generation or MP4 export

Install ffmpeg and add its bin directory to your system PATH, then open a new terminal window and verify with ffmpeg -version.

Console shows CUE WARN and animations fire at the wrong timestamp

Every T.at(lineId, 'substring') call must match the aligned transcript verbatim. Check work/words.md or test a specific phrase using python -X utf8 tools/at.py N05 "your phrase". If a word repeats in the same line, append #2 for the second occurrence.

Console reports [R3-13] clipping, [R3-14] floating, or [R3-15] z-fighting flicker

For 3D scenes, place desk props with R.putOn instead of manual Y coordinates so objects rest cleanly on surfaces, leave at least 0.4 units between independent meshes, and offset custom floor planes from the default R.ground (y = 0) by at least 0.01.

3D model load failure (404 on models/*.glb)

Only models explicitly copied into your project's models/ folder are served. Run python -X utf8 tools/get_model.py <model_name> (or --list <keyword> to search) to copy the needed CC0 GLB asset into the project.

Browser preview freezes or misses sound effects when the tab is minimized

Browsers throttle requestAnimationFrame in hidden or background tabs. Keep the preview window visible during interactive playback, or use the headless screenshot tool (tools/shoot.py) for automated frame checks.

Text touches card edges or gets clipped inside panels

Keep text margins at least max(36px, 0.5 * fontSize) inside cards and boards. Run python -X utf8 tools/margin_check.py --only <module> to detect tight edges automatically.

5. Need Support?

Stuck on setup or a pack error? Email support@skillmp4.com with your OS, Python version (python --version), coding agent name, and the full terminal or browser console error. We are happy to help you get running.