CommunityCoding & Developmentgithub.com

Book/Knowledge Video 1:1 Replication Pipeline

A pipeline that reverse-engineers a benchmark book/knowledge video's format, then produces an original video in the same format—covering script writing, storyboard generation, TTS, and headless frame-by-frame rendering.

What is Knowledge Video 1:1 Replication Pipeline?

This AI agent skill, `book-video-clone`, implements a full 1:1 replication pipeline for book-summary or knowledge-based landscape videos. It takes a reference video (e.g., from Douyin/Bilibili) and a book title, then produces a finished video that matches the reference in structure, pacing, visual style, and overall format—while generating entirely original script, visuals, and voiceover. The pipeline is divided into eight stages: project initialization, benchmark analysis to extract a visual recipe, script writing using a six-part structure, storyboard creation that maps each sentence to a shot (coverage gate), batch image generation (external tool), TTS audio generation with frame-level timeline, HTML-based hyperframe rendering with a headless browser (using Playwright), and final verification. It enforces strict quality gates: if coverage (sentence-to-shot mapping) is below 100%, the pipeline halts; all assets must be present before rendering; and three smoke tests are required before full render. Performance benchmarks: 3600-character script → 109 shots → 654.9s final video, ~7 min TTS, ~14 min rendering at 24fps. Total manual effort ≈ 1 workday (script writing takes >50%). It is designed for developers/content teams using command-line tools (Python, FFmpeg, Playwright) and requires a `MINIMAX_API_KEY` in `.env`.

Works with~Claude Code~Codex CLI~Cursor✓Antigravity✓Gemini CLI
npx skills add https://github.com/hrj-11055/book-video-clone/tree/main

Installed? Explore more Coding & Development skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

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

  1. 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.
  2. Book title for this session: Which book to cover (best for business, cognitive science, psychology, business, or self-improvement).
  3. 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 ItemInjection Location
Body image style keywordsSTYLE_SUFFIX in create_storyboard.py
Chapter card / outro card background descriptionCARD_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)

  1. Gates prevent advancement: coverage gate (script = narration), completeness check (all images present before rendering)
  2. API keys only go into .env: never hardcode in any script, document, or conversation output
  3. No text in images, all text via rendering layer—chapter cards/data cards/subtitles/branding are all HTML overlays; zero redraw when changing books
  4. Must pass three smoke tests (hook/chapter card/outro) before full render
  5. 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%).

Related Skills