Tutorial Video Studio (CLI, Python, Annolid Bot & Coding Agents)¶
Annolid includes a reusable Tutorial Video Studio that turns declarative JSON/YAML storyboards—or existing Markdown tutorials—into polished 1920×1080 30 FPS narrated walkthrough videos.
Every video produced through the studio automatically bundles:
- Broadcast MP4 (
H.264 yuv420p+AAC stereo 44.1 kHz,+faststart) voiced with your active Voice & Narration Studio settings (Pocket Kyutai custom prompt, Kokoro, Chatterbox, or gTTS). - Thumbnail (
thumbnail.jpg,1280×720) and synchronized SRT captions (captions.srt). - Per-scene Visual QA stills (
qa_stills/qa_01_*.jpg) for rapid layout and spotlight alignment review. - Automated stream & loudness audit (
ffprobe+ffmpeg volumedetect). - Publishing drafts (
youtube_description.txtwith exactMM:SSchapter timestamps,x_post.txt, andREADME.txt).
Quick Start (Headless CLI)¶
- Scaffold a storyboard from an existing Markdown tutorial (or omit
--from-docfor a blank 4-scene starter template):
annolid-run tutorial-video scaffold \
--from-doc docs/tutorials/create_3d_animal_digital_twins.md \
--out output/videos/my_tutorial/storyboard.json
- Validate the storyboard schema, spotlight coordinates, and referenced media files:
annolid-run tutorial-video validate \
--spec output/videos/my_tutorial/storyboard.json
- Render the full narrated tutorial bundle (inherits your active Annolid PDF Speech voice automatically, or pass
--profile,--engine,--voice,--prompt, or--speed):
annolid-run tutorial-video render \
--spec output/videos/my_tutorial/storyboard.json \
--out-dir output/videos/my_tutorial
- Inspect
output/videos/my_tutorial/qa_stills/*.jpg. After adjusting spotlight coordinates, titles, or media instoryboard.json, re-render visuals in seconds without re-synthesizing voiceover:
annolid-run tutorial-video render \
--spec output/videos/my_tutorial/storyboard.json \
--out-dir output/videos/my_tutorial \
--reuse-voiceover
Fast Offline Layout Dry-Runs
Pass --silent (and optional --silent-duration 3) to test layouts, animations, and QA stills quickly before running full neural TTS narration.
Built-In Scene Layouts & Themes¶
Run annolid-run tutorial-video layouts to print every built-in layout and theme.
| Layout | Best For | Media & Components |
|---|---|---|
hero_intro |
Title splash / thumbnail | 1–3 showcase cards (images, frame folders, or clips) + up to 4 KPI tiles |
spotlight_walkthrough |
GUI screens & dialogs | Main media card + timed normalized [0, 1] spotlight callout boxes + right KPI side card |
dual_media_stack |
Before/after or multi-view | 2 stacked media cards (or 2-up top + 1 wide bottom when 3 media items are passed) + auto-sized corner pills + right side card |
triptych_showcase |
Multi-condition comparisons | 3 side-by-side captioned media cards + animated comparison/phase-bar panels (or pipeline strip) below + right side card |
pipeline_with_media |
Workflow + live dialog | Top 3–5 stage arrow pipeline diagram + bottom media/dialog card with optional spotlights + right side card |
code_and_cli_outro |
Python API + CLI capstone | Dark two-column code & terminal cards with verified metrics & documentation footers |
full_media |
Full-frame demo clip | Large centered media card with optional spotlight boxes and bottom takeaway caption bar |
Supported themes: annolid_teal (default), slate_indigo, and dark_studio.
Each media[] item accepts:
- Static images (
.png,.jpg,.jpeg,.webp,.bmp) - Animated frame directories (sorted
.jpg/.pngsequences played atfps) - Video clips (
.mp4,.mov,.mkv,.avi,.webm)
Using With Annolid Bot or Coding Agents¶
Annolid bundles both a sandboxed Bot tool (annolid_tutorial_video) and a built-in skill (annolid/core/agent/skills/tutorial-video/SKILL.md).
Example natural-language prompts in Annolid Bot:
- "Create a step-by-step tutorial video from
docs/tutorials/create_3d_animal_digital_twins.mdusing my Pocket voice and save it underoutput/videos/digital_twins_demo." - "Scaffold a tutorial storyboard for
docs/tutorials/fastpose_studio_tutorial.md, validate it, and render a silent preview so I can inspect the QA stills first." - "Verify
output/videos/my_tutorial/tutorial_video.mp4and regenerate YouTube chapters."
All paths—including every media[].path, voice.prompt_path, and voice.manifest_path inside the storyboard—are strictly validated against the active agent workspace allowed_dir and allowed_read_roots.
Shared Python API & Custom Scene Hooks¶
For bespoke scientific visualizations (such as custom Matplotlib/QPainter plots or live simulation overlays), call the shared service directly and optionally pass a scene_hook callback or capture headless Qt dialogs with capture_qt_widget_png:
from annolid.services.tutorial_video_renderer import (
capture_qt_widget_png,
draw_corner_pill,
)
from annolid.services.tutorial_video_service import render_tutorial_video
def my_overlay_hook(ctx, painter):
# Return False/None to let the built-in layout draw, or True to draw a full custom scene
if ctx.scene.id == "step1_setup":
return False
return False
result = render_tutorial_video(
"output/videos/my_tutorial/storyboard.json",
"output/videos/my_tutorial",
reuse_voiceover=False,
scene_hook=my_overlay_hook,
)
print(result.video_path, result.verification.to_dict())
CLI Subcommand Reference¶
| Subcommand | Description |
|---|---|
annolid-run tutorial-video layouts |
List built-in layouts and studio color themes (--json). |
annolid-run tutorial-video scaffold |
Generate a starter or Markdown-grounded storyboard (--from-doc, --out, --theme). |
annolid-run tutorial-video validate |
Validate storyboard schema, spotlight bounds, and media paths (--spec). |
annolid-run tutorial-video narrate |
Synthesize narration clips, master_audio.wav, and captions.srt only. |
annolid-run tutorial-video render |
Full workflow: voiceover + MP4 + thumbnail + QA stills + verification + YouTube/X drafts. |
annolid-run tutorial-video verify |
Run ffprobe and volumedetect loudness check on any MP4 (--video). |
annolid-run tutorial-video publish |
Regenerate youtube_description.txt, x_post.txt, and README.txt from timings. |