Book Video 1:1 Replication Pipeline
Break down a benchmark account's video format into a reusable recipe, then use an industrial-grade pipeline (storyboard gate → per-shot TTS timeline → overlay text rendering → headless frame-by-frame rendering) to produce original content in the same format. What is replicated is the format (structure/packaging/ pacing/visual style), not the content—script, visuals, and voiceover are all original.
This skill has been fully validated with Thinking, Fast and Slow (benchmark "向不惑", 109 shots, 654.9s final video).
Confirm Three Things with the User Before Starting
- Benchmark video: Local file path or link (Douyin/Bilibili, etc.). If the video file cannot be obtained, ask the user to screen-record or download it into the project.
- Book title for this session: Which book to cover (best for business, cognitive science, psychology, business, or self-improvement).
- Brand name + Persona name: e.g., "Knowledge Lab / Mark".
Stage A · Project Initialization
PROJ=<project directory specified by user or new>
mkdir -p $PROJ/{00_benchmark,01_script,02_storyboard,03_audio,04_subtitles,05_assets/images,07_hyperframes_production,08_publish,scripts}
cp <skill directory>/templates/{pipeline.py,create_storyboard.py,gen_audio_minimax.py,build_hyperframes_html.py,render_html_video.py} $PROJ/scripts/
cp <skill directory>/templates/.env.example $PROJ/.env # User fills in MINIMAX_API_KEY
Dependencies: python3 + playwright (with chromium) + ffmpeg. If missing, install: pip install playwright && playwright install chromium.
Stage B · Benchmark Analysis → Recipe Output
Analyze the benchmark video following references/benchmark-analysis.md and produce 00_benchmark/recipe.md (five-layer recipe: specs/pacing/structure/visuals/audio). Then inject the recipe into templates:
| Recipe Item | Injection Location |
|---|---|
| Body image style keywords | STYLE_SUFFIX in create_storyboard.py |
| Chapter card / outro card background description | CARD_BG_PROMPT / OUTRO_CARD_PROMPT in same file |
| Accent color / title color CSS | #ffde59 (accent yellow) / #e8c66a (title gold) etc. in build_hyperframes_html.py |
The default template includes an "American retro comic + black-gold card" recipe (matching the "向不惑" benchmark). If the benchmark follows the same style, injection can be skipped.
Stage C · Script Writing (Six-Part Structure)
Write 01_script/final.md following references/copywriting-template.md.
Hard rule: Every sentence must be paint-able as a concrete visual—the next stage's coverage gate depends on the script word-for-word. Simultaneously update the 【Per-episode Configuration】 at the top of create_storyboard.py (by default, SCRIPT_MD points to final.md, BOOK_TITLE).
Stage D · Storyboard (Gate ①)
Fill each sentence of the script into the SHOTS quadruple in scripts/create_storyboard.py (narration = exact slice of original text, visual = literal translation, card_id, overlay_text), then:
python3 scripts/create_storyboard.py
Do not proceed if the coverage gate is not met; stop and fix. Never move downstream with defects. Output: 02_storyboard/prompts.tsv + nano_banana_prompts.md.
Stage E · Batch Image Generation (Manual Step)
Give the entire nano_banana_prompts.md to the user's image generation tool (Gemini Antigravity / Nano Banana or any tool). Instructions: 16:9, file names must exactly match the list, put them in 05_assets/images/, skip existing files. Should produce N body images + chapter_card_bg.png + outro_card.png. This stage can run in parallel with Stage F.
Stage F · Voiceover + Frame-level Timeline
python3 scripts/gen_audio_minimax.py --limit 3 # Synthesize first 3 shots for user to preview voice
python3 scripts/gen_audio_minimax.py # Full batch (18RPM rate limit, ~110 shots ≈ 7 minutes)
Timeline = calculated from PCM byte count, per-shot precision, no Whisper. Modified words only re-synthesize that shot (cache hash).
Stage G · Render Final Video (Gate ② + Engine)
python3 scripts/build_hyperframes_html.py # Completeness check: must "all assets present" before rendering
python3 scripts/render_html_video.py --start 0 --duration 6 --out /tmp/smoke_hook.mp4
python3 scripts/render_html_video.py --start <chapter card timestamp> --duration 6 --out /tmp/smoke_card.mp4
python3 scripts/render_html_video.py --start <5 seconds before outro> --duration 6 --out /tmp/smoke_outro.mp4
# After visual inspection of all three smoke tests passes, render the full video (~110 shots ≈ 11 min video, rendering ≈ 14 min)
python3 scripts/render_html_video.py
If rendering is interrupted, just rerun it (resume from breakpoint). The rendering layer can be previewed in browser first: open 07_hyperframes_production/index.html (spacebar to play, ←→ for 5-second jumps).
Stage H · Verification + Publishing
Verification checklist, spot-check points, publishing material templates (title formula/tags/thumbnail/pinned comment) are in references/pipeline-guide.md. Write materials into 08_publish/.
Hard Rules (Never Violate)
- Gates prevent advancement: coverage gate (script = narration), completeness check (all images present before rendering)
- API keys only go into
.env: never hardcode in any script, document, or conversation output - No text in images, all text via rendering layer—chapter cards/data cards/subtitles/branding are all HTML overlays; zero redraw when changing books
- Must pass three smoke tests (hook/chapter card/outro) before full render
- All image prompts must append: fixed style suffix + 16:9 aspect + no text/sign in background
Verified Performance Benchmarks (Set User Expectations)
Script 3600 characters → 109 shots → 654.9s final video; TTS 7 minutes; rendering at 24fps (full video ≈ 14 minutes); total manual effort ≈ 1 workday (script writing >50%).