Yuuhann Video Studio · Content-Driven Dual-Track AI Video Director Engine
Combine the xilo (@xilo2991) A/B-roll directing methodology for knowledge videos, Microsoft Edge-TTS one-stop free voiceovers, on-demand AI image generation character system, and Remotion animation engineering best practices, enabling the Agent to independently produce high-quality audiovisual videos from a topic idea or a long raw recording.
Core Principle: Content First, Define Aesthetics, Not Templates
First Rule: All layouts, animations, camera language, sound effects, and rhythm must serve the specific content of this video, not the other way around by forcing content into fixed templates.
- Style anchors that can be established across videos (to give a channel/series high recognizability):
- Color and lighting tone (e.g., light studio warm paper
#F6F4F0+ obsidian glass#090C14, or custom brand colors as requested by the user); - Character style consistency and fine-drawn stroke texture;
- High readability typography, real-device full-frame recording, precise audio-visual synchronization, and pre-broadcast QA standards.
- Color and lighting tone (e.g., light studio warm paper
- Parts that must be redesigned for each video, never repeated exactly:
- Visual structure and layout: use split screen for comparisons, draw dynamic SVG connections for architecture explanations, and use full-screen close-ups for immersive hands-on demonstrations. Never copy the same card/title placement.
- Animation language and transitions: customize animation metaphors (e.g., data streams, progress evolution, spring transitions, code highlights, lens flares/hard cuts) based on emotion and information type. Avoid mechanical carousels of fixed effects.
- B-roll to character appearance ratio: give the stage to A-roll when real-person/character emotional transitions or storytelling is needed, and yield full screen to B-roll for hardcore hands-on demonstrations or dense arguments.
- Voiceover tone, speed, and background music density: choose voice speed and BGM/sound effects based on the topic's atmosphere, not randomly inserting sound effects just for the sake of it.
Step 1 · Determine the Production Lane
Upon receiving a creation request, directly enter the corresponding workflow based on the input material type (for non-critical preferences, follow best practices automatically to reduce unnecessary questioning):
| Lane | Input Type | Core Output Pipeline |
|---|---|---|
| Lane A · Create from Scratch | Topic / One-sentence idea / Draft / Script | Colloquialize script → Use built-in scripts/generate-tts.py (or custom TTS) to synthesize voiceover + millisecond-level timeline → Create content-driven A/B-roll director's table → Record real web/software B-roll + on-demand use of image generation tools for new characters/illustrations → Freely write Remotion composition and render for QA |
| Lane B · Re-edit Long Material | Raw long recording / Real-person talking-head video (e.g., .mp4) | faster-whisper word-level ASR → Extract opening hook (Cold Open) based on content → Edit by semantic rhythm (e.g., 1.2x–1.25x preserving pitch) with seamless acoustic stitching → Replace original obstructed demo footage + stabilize-pip.py to stable-crop and scale PiP → Customized Remotion packaging and QA |
| Lane C · Local Upgrade / Extension | Existing video project needing new shots or visual changes | Preserve the main timeline, supplement with new recordings, use image generation to create character actions matching the new plot, or customize new Remotion animation sections and check for frame drops |
Six-Stage End-to-End Director Execution Workflow
Refer to the corresponding chapters in references/ as needed (progressive reading, you do not need to memorize all details at once):
Stage 1 · Content Deconstruction and Opening Strategy
- First, clarify the video's core argument, audience pain points, and chain of evidence.
- Decide on the most engaging opening: For testing/review videos, front-load the most impactful comparative conclusion or phenomenon as a 0-12 second Cold Open; for tutorials or narrative videos, start with a real problem scenario to quickly engage the audience. Avoid several minutes of aimless buildup or small talk.
- Determine the aspect ratio based on the publishing platform (default
1920×1080 @ 30fps, also supports1080×1920for vertical/square) and whether a safety zone is needed for mobile interaction buttons.
Stage 2 · Finalize Voiceover and Audio Ground Truth
- See audio-qa-checklist.md and voiceover-edge-tts.md for details.
- Lane A (no existing recording):
- Polish the script into natural, short spoken sentences. End flexibly according to the topic and creator's style (no fixed slogan required).
- Directly run the built-in
scripts/generate-tts.py(based on free Microsoft Edge-TTS, supporting 300+ voices globally includingzh-CN-YunxiNeural, no API key needed) to output a normalized voiceovernarration.mp3+ line-level alignedtiming.json+.srtin one go. You can also replace it with any real-person dry vocal or external voiceover.
- Lane B (long material voiceover/recording):
- Use
faster-whisperto generate word-level timestamps JSON. Use edl-cutter-template.py to remove redundancy based on semantics and breath points, apply pitch-preserving speed changes, and stitch with10ms/12msanti-pop micro-crossfades. - When cross-sentence stitching, trimming, or re-speaking is involved, you must personally check the corresponding audio output (e.g., listen to the MP3 with
read_file) before editing assembly to ensure the tone sounds smooth and natural.
- Use
Stage 3 · Content-Driven Storyboard and Shot Planning
- See the full method in xilo-ab-roll-director.md.
- Before writing any visual code, plan the coordination of A-roll (emotion/opinion/character and persona expression) and B-roll (hands-on operations/data comparisons/custom dynamic diagrams) based on complete semantic segments:
- Be wary of consecutive purely static shot or text-heavy slide-pages.
- For each shot, first think: When the audience hears this line, what real image or dynamic structural evolution can instantly communicate the core idea without explanation?
- Let the visual rhythm (shot duration, cut frequency, animation intensity) follow the speech's emphasis and logical transitions.
Stage 4 · On-Demand Character Visuals and Real-Device B-Roll Recording
- Original Character IP and On-Demand Image Generation (see ip-character-guide.md):
- This Skill includes a set of 16 demo character assets (
resources/ip/: 2 three-view/final look masters, 6 transparent reaction stickers, 8 horizontal scenes) that can be used out of the box for testing or as reference. - Core principle – Don't be limited by existing assets: When the script includes a new action, specific prop interaction, emotional reversal, or unique metaphorical scene, proactively use
delegate_taskto callcodex(built-in Image Generation) or other image generation tools to generate new scenes or action stickers on the spot! - When generating new images, use the "three views + original final look + closest scene reference" triple anchor point to lock character consistency, and require zero text/zero watermark in the image; for newly generated white-background stickers, use cutout-stickers.py to precisely cut out while preserving white fur and white highlights.
- This Skill includes a set of 16 demo character assets (
- Real-Device B-Roll Recording and Image Preprocessing:
- For web or front-end effect demos, use Playwright / Puppeteer to record real interactions and state changes at the shot's actual frame rate
1.0x 30fps, never faking screenshots. - If the original recording contains a real-person PiP that changes size (like Screen Studio), run stabilize-pip.py first to automatically detect, stabilize, and crop frame-by-frame, removing white borders/black corners.
- For web or front-end effect demos, use Playwright / Puppeteer to record real interactions and state changes at the shot's actual frame rate
Stage 5 · Free Remotion Composition and Still Frame Gate
- See details in remotion-design-system.md.
resources/remotion-kit/provides 10 bug-tested reference components (Canvas, IP Stage, Desktop Viewport, PiP, Score Banner, Selection Track, Chapter Card, Transition, Subtitle) andresources/sfx/with 11 starter sound effects.- How to use: Treat them as rewritable, splittable, discardable, and rebuildable engineering building blocks. Encourage writing custom animation diagrams, custom SVG motion, and layout combinations that fit the specific content of each episode. If you need to connect a fixed outro, follow resources/outro/README.md.
- Mandatory gate before rendering: Run
npx tsc --noEmit→ Extract static keyframes covering all unique layouts and close-up states (npx remotion still) → Useread_fileto visually inspect each frame for layout breathing, clarity, and zero accidental occlusion before starting the full video render.
Stage 6 · Final Video Rendering and Objective QA Delivery
- After rendering the clean final video (e.g.,
--codec=h264 --crf=17 --pixel-format=yuv420p), run verify-render.sh:bash scripts/verify-render.sh "<rendered.mp4>" [MAIN_END_SEC] - Confirm the output shows
ZERO_BLACK_GAPS, correct stream specifications, andebur128loudness (-21to-14 LUFS, true peak< -1.0 dBFS). Also check the auto-generatedverify-contact-sheet.jpg16-frame overview usingread_filebefore delivering the final video.
Engineering Guardrails (Protect Stability, Not Creativity)
The following rules only safeguard the underlying stability of browser rendering, Remotion compilation, and audio-visual synchronization:
- Do not use
<OffthreadVideo>with< 1.0xslow motion: Always record at the target duration for full frames or pre-smooth resample. KeepplaybackRate={1}in the component to prevent pointer and animation frame drops. - When cutting a single video window into multiple time segments, each must be independently wrapped in a
<Sequence>: Do not directly changestartFromon an unmounted video when switching segment time points to prevent cumulative time drift. - Use
transform: scale(...) translate3d(...)for local close-up zoom: Avoid CSSzoomin Chromium headless rendering, which can cause displacement calculation errors and title cropping. - Accurately deduct frame offset when there is a preceding interlude/chapter card: The
startFromfor the corresponding chapter's voiceover and mid-cut PiP must subtract the frame count of the preceding chapter card to ensure perfect lip-sync. - Use
containfor embedded16:9footage in narrow multi-column layouts: When comparing multiple landscape pages or slides, prioritize maintainingaspectRatio: "16 / 9"withcontain; do not hard-crop critical content on the left or right. - Do not use
flipXon asymmetrical character assets: Assets like demo characters with a single earring or fixed one-sided features must keepflipX={false}in all shots. If there is a coexistence solution with characters and real-person PiP, ensure they do not overlap in the same corner.
Included Files and Tools Index
- Methodologies and Guides (
references/):- xilo-ab-roll-director.md — Content-driven A/B-roll director's orchestration method
- voiceover-edge-tts.md — Microsoft Edge-TTS free neural voiceover parameters and voice lookup
- ip-character-guide.md — Original character consistency, Codex triple-anchor on-demand image generation, and demo asset inventory
- remotion-design-system.md — Aesthetic anchors, anti-template orchestration guide, and Remotion bottom-layer pitfalls
- audio-qa-checklist.md — Dual-channel audio processing, music ducking principle, and two-stage QA standards
- Executable Scripts (
scripts/):- generate-tts.py — Free voiceover, SRT, and line-level
timing.jsongenerator based on Edge-TTS + FFmpeg - edl-cutter-template.py — Word-level timestamp-driven long audio precision editing + acoustic compression template
- stabilize-pip.py — Automatic frame-by-frame detection and stable cropping tool for PiP that changes size during recording
- cutout-stickers.py — Precise cutout script for white-background stickers using outer edge flood fill (preserves white highlights and hair)
- verify-render.sh — One-click QA script for final video specifications, black frames, LUFS loudness, and a 16-frame overview contact sheet
- generate-tts.py — Free voiceover, SRT, and line-level
- Common Expansion Integrations:
google-flow-music(custom royalty-free background music) /ego-browser(real web recording and research) /dbs-title-cover-intro(video publishing cover layout)