Editorial AI Video Studio Workflow (Short Digest + Launch + Long-Form Explainer)
Overview
This workflow enforces Anthropic warm editorial aesthetics (Zero-Blue Rule) across three rendering tracks:
- Engine 1 — Talking-Head + Editorial Compositing (
scripts/fable_studio.py):- Live-action Presenter Clips (Google Flow / Veo): Generate
2..Nrealistic talking-head clips (warm tungsten studio light — zero neon blue/purple — plus solid#97A396sage-green studio wall) with strictNO ON-SCREEN TEXTand policy-safe phonetic/descriptive spoken Chinese. - Programmatic Motion Graphics: Composite kinetic typography, behind-head GrabCut layering, Terracotta (
#D97757) flash cards, sage-green LAB matte separation, live RMS voice waveforms, Warm Parchment (#FAF9F5) sticker cutouts + tilted polaroids, warm-carbon aperture iris -> Architectural 3-Track NLE Timeline + Double-Bezel Studio Viewport, Warm Carbon (#1C1B19) Double-Bezel typing cards, damped spring physics (spring_ease), and 118 BPM sidechain-ducked audio mix.
- Live-action Presenter Clips (Google Flow / Veo): Generate
- Engine 2 — Pure Vector Product/Editorial Launch (
scripts/render_web_stage.py+scripts/stage_template.html, mirrored atweb_stage/):- Deterministic Headless Chrome + Playwright frame capture rendering HTML5/CSS3/SVG UI cards (
0.0%cold blue, Double-Bezel containers, native<kbd>keycaps, CSSletter-spacing, smooth auto-follow zooms, damped springs).
- Deterministic Headless Chrome + Playwright frame capture rendering HTML5/CSS3/SVG UI cards (
- Engine 3 — Long-Form Article Explainer (
scripts/explainer_studio.py+scripts/explainer_stage.html):- Unlimited-chapter (1–20+ min) Markdown/article explainer video with audio-driven chapter frame locking (
edge-ttsneural Chinese voice + offline macOSsayfallback), synchronized live RMS waveform + clause subtitles, and 6 editorial layouts (title_hook,quote_highlight,architecture_flow,code_walkthrough,comparison_bento,summary_takeaway).
- Unlimited-chapter (1–20+ min) Markdown/article explainer video with audio-driven chapter frame locking (
Four Anti-AI-Slop Rules (Enforced by Default)
- Zero-Blue Rule: Default canvas & card tokens are Warm Parchment (
#FAF9F5/#F3F1EA), Warm Carbon (#141413/#1C1B19), Terracotta (#D97757), Botanical Sage (#788C5D), and1pxrules (#DFDCD2). Google Flow studio lighting uses warm tungsten key + soft amber rim light (zero neon blue or purple lighting). - Architectural NLE Timeline B-Roll: Beat transitions use a ruled
#FAF9F5drafting grid, Double-Bezel live viewport, and 3-track timeline (01 / VIDEO TRIM,02 / ZOOM · ZBezier curve,03 / VOICE 48K), banning dark-blue fake skylines and neon grids. - Dual Rendering Engines: Use
fable_studio.pyfor Veo presenter stories, or adaptweb_stage/render_web_stage.py+web_stage/stage_template.htmlwhen pure UI/browser-grade vector motion graphics are needed. - Damped Spring Physics & Quantitative Verification: UI transitions use harmonic
spring_ease(t, stiffness, damping)easing, andfable_studio.py verifyreportsui_beat_cold_blue_pctacross synthetic graphical beats (#3,#6,#7) alongsideffprobestreams andverify_grid.jpg.
Default standalone user workspace: /Users/wangxinglin/Downloads/AI视频工作流/.
Dependencies
- Browser automation: Refer to the existing
ego-browserskill before controlling Google Flow in the browser. Never duplicate browser automation setup outsideego-browser. - Python runtime:
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3(hasplaywright,cv2,numpy, andPILpreinstalled;/usr/bin/python3lacks them). - Web-Stage Browser:
/Applications/Google Chrome.app/Contents/MacOS/Google Chrome(used headless byrender_web_stage.py). - Media binaries:
/opt/homebrew/bin/ffmpeg,/opt/homebrew/bin/ffprobe.
Quick Start
PY=/Library/Frameworks/Python.framework/Versions/3.10/bin/python3
STUDIO="/Users/wangxinglin/Downloads/AI视频工作流"
# 1. Create or reset project.json (supports --aspect 16:9|9:16 and --segments 3|4|5)
$PY "$STUDIO/fable_studio.py" init --output "$STUDIO/project.json" --aspect 16:9 --segments 3
# 2. Export safety-derisked Google Flow prompts + ingredient anchor instructions
$PY "$STUDIO/fable_studio.py" flow-plan --project "$STUDIO/project.json" --output "$STUDIO/output/flow_tasks.json"
# 3. Render final video once clips/seg_01.mp4..seg_0N.mp4 exist
$PY "$STUDIO/fable_studio.py" render --project "$STUDIO/project.json" --output "$STUDIO/output/《今日AI大事件》成片.mp4"
# 4. Verify A/V streams and produce 9-beat contact sheet
$PY "$STUDIO/fable_studio.py" verify --video "$STUDIO/output/《今日AI大事件》成片.mp4" --output "$STUDIO/output/verify_grid.jpg"
Utility Scripts
-
scripts/fable_studio.py(mirrored at/Users/wangxinglin/Downloads/AI视频工作流/fable_studio.py):init -o <project.json> [--aspect 16:9|9:16] [--segments N] [--hud-prefix "AI DAILY"] [--cta "每天一分钟 · 点个关注"](N >= 2, unlimited segments)flow-plan -p <project.json> [-o <flow_tasks.json>]: Appliessafety.auto_deriskto spoken dialogue while preserving original brand spelling in overlay fields.render -p <project.json> [-o <output.mp4>] [--keep-temp]: Validates all segment clips exist, renders full Fable beats, cleans temporary intermediate files automatically.verify -v <video.mp4> [-o <verify_grid.jpg>]: Runsffprobe, reportsui_beat_cold_blue_pctacross graphical beats (#3,#6,#7), and saves a 3x3 timestamped contact sheet.
-
scripts/explainer_studio.py+scripts/explainer_stage.html(mirrored at/Users/wangxinglin/Downloads/AI视频工作流/explainer_studio.py&web_stage/explainer_stage.html):- Long-form audio-driven article explainer mode supporting unlimited chapters (1–15+ minutes).
init -o <explainer_project.json>: Creates a 6-chapter starter JSON covering all 6 Anthropic editorial layouts (title_hook,quote_highlight,architecture_flow,code_walkthrough,comparison_bento,summary_takeaway).from-markdown -i <article.md> -o <explainer_project.json>: Automatically converts any Markdown article into multi-chapter explainer JSON.render -p <explainer_project.json> -o <output.mp4> [--voice zh-CN-XiaoxiaoNeural] [--tts auto|edge|macos]: Synthesizes chapter narration viaedge-tts(with offline macOSsay -v Tingtingfallback), locks exact frame counts & RMS waveform + clause subtitles to audio duration, renders via Headless Chrome Playwright, and mixes 112 BPM ducked groove.verify -v <output.mp4> [-o <verify_explainer_grid.jpg>]: Runsffprobe, measurescold_blue_pixel_pctacross sampled frames, and builds a 3x3 contact sheet.
Supported Input Modes
- One-Sentence Topic ("一句话出片"):
- Research current factual news/events via
search_webwhen the user asks about today's/recent news. - Draft concise ~9s spoken scripts per segment, map real brand typography into visual overlay fields, and populate
project.json. - Run
flow-plan, generate each segment in Google Flow viaego-browser, download clips toclips/seg_01.mp4 .., then runrenderandverify.
- Research current factual news/events via
- Long-Form Article / Markdown Explainer ("讲解一篇文章 / 长视频模式"):
- Accept any pasted article, Markdown file, or topic; convert/structure into N logical chapters (
explainer_studio.py from-markdownor custom JSON across all 6 layouts:title_hook,quote_highlight,architecture_flow,code_walkthrough,comparison_bento,summary_takeaway). - Run
explainer_studio.py render+verify(audio duration drives video frame count with zero A/V drift).
- Accept any pasted article, Markdown file, or topic; convert/structure into N logical chapters (
- Custom Script / Storyboard ("自带口播/分镜"):
- Preserve the user's exact spoken lines in
segments[*].spoken_textand extract punchy visual callouts into overlay fields (behind_head_left/right,flash_card_title,behind_body_lines,cutout_title/cutout_serif_lines,broll_caption,user_prompt_text). - Run
flow-plan-> Google Flow ->render->verify.
- Preserve the user's exact spoken lines in
- Custom Persona / Photo + Flexible Format ("自带照片 / 自定义形象 / 竖屏 9:16"):
- Copy or reference the user's portrait image in
persona.dark_anchor_path(and/orgreen_anchor_path), setpersona.mode = "custom", or setformat.aspect_ratio = "9:16"(1080x1920). - Optionally customize
brand.hud_prefixandbrand.cta_text.
- Copy or reference the user's portrait image in
Google Flow Browser Playbook (via ego-browser)
- Workspace Check: Call
listTaskSpaces()first; reuse task space"flow-google-duanju"on Chrome"Profile 2"([email protected]). Never leave dangling tabs; finish cleanly viatask.finish({ keep: [...] })after downloads settle. - Model & Ratio Selection: Use
"Veo 3.1 - Lite"(default) and"x1"batch count; match"16:9"or"9:16"toproject.json. - Attaching Consistency Ingredients:
- Upload or select
assets/default_dark_anchor.png/assets/default_green_anchor.png(or the user's portrait photo). - Verify ingredient chip attachment: Confirm the ingredient button (
button "素材") sits strictly between the lastsvg_rootandtextfield "您希望创作什么?"in the DOM/snapshot before submitting.
- Upload or select
- Snackbar Obstacle Handling: Dismiss any
"已将 X 项内容移至回收站"snackbars by clickingtext "关闭"before clicking nearby media cards. - Silent Safety Retry: Always read prompts from
flow_tasks.json(flow_prompt, already de-risked). If Google Flow rejects a prompt for policy/safety despiteauto_derisk, immediately soften remaining proper nouns, financial words, or geopolitical phrasing inspoken_text_safeand retry silently without stopping to bother the user.
Compositing & Typography Guardrails
- No Tofu Glyphs: Never use emojis (
🔥,💳) or unsupported symbols (▸) in Pillow text layers; stick to clean Chinese/ASCII characters and·,—,&,●. - OpenCV Array Contiguity: When converting PIL RGBA/RGB slices to BGR arrays for OpenCV calls (
rectangle,warpAffine,GaussianBlur), always wrap withnp.ascontiguousarray(...)and allocate float buffers explicitly withnp.zeros((H, W, 3), dtype=...). - Clean Cleanup: Temporary normalized WAV/MP4 directories inside
output/must be cleaned up afterrendercompletes (--keep-temponly when debugging).
Common Mistakes
- Running
/usr/bin/python3instead of Python 3.10: Results inModuleNotFoundError: No module named 'cv2'. Always execute with/Library/Frameworks/Python.framework/Versions/3.10/bin/python3. - Passing
"新闻记者"or unmasked"OpenAI / IPO"into Flow dialogue: Triggers safety blocks or sterile news-anchor clichés. Keep"视频创作者"framing and runflow-planfirst. - Letting Flow burn subtitles into raw video: Ruin behind-head typography and sage-green cutout aesthetics. Always keep
STRICT NO ON-SCREEN TEXTin Flow prompts. - Skipping
verify/ visual check: Always inspectverify_grid.jpgviaread_fileafter rendering to confirm typography margins, matte edges, polaroid placement, and audio duration.