story-generator
Skill1.2k starsChanged 9 days agoApache-2.0View on GitHub
Expert in generating full multi-scene multimedia storybooks (image, video, voice, and music) with dynamic duration probing, conversational tempo guardrails, a dedicated self-correcting Editor's QC Room, and pipeline flowcharts embedded in interactive reports.
4 other projects use a version of this.
Adopted by
Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data
Most recently taken up by
- dmccreary/ibook-skillstheir own version, first seen Nov 3, 2026
- GoogleCloudPlatform/genmedia-creative-studioword for word, first seen Oct 13, 2026
- dmccreary/claude-skillstheir own version, first seen Oct 9, 2026
- gihwan-dev/claude-code-guitheir own version, first seen Feb 8, 2026
Who's talking about GoogleCloudPlatform/vertex-ai-creative-studio
- palladius/media-arneis“Agentic CLI Dseign Best Practices”GitHub · Apr 20, 2026 · 1 reactions
- @github-trending.bsky.social“📦 GoogleCloudPlatform / vertex-ai-creative-studio ⭐ 520 (+7) 🗒 Jupyter Notebook GenMedia Creative Studio …”Bluesky · Nov 5, 2025 · 1 likes
- ghchinoy/genmedia-creative-studio“chore(main): release mcp 3.25.0”GitHub · Nov 6, 2026
- GoogleCloudPlatform/genmedia-creative-studio“fix(deps): update …”GitHub · Sep 20, 2026
- GoogleCloudPlatform/genmedia-creative-studio“fix(deps): update …”GitHub · Sep 19, 2026
The biggest 5 of 51 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 51
Talked about on GitHub and Bluesky (51 times).
On GitHub · 50
- Apr 20, 2026Agentic CLI Dseign Best Practices — palladius/media-arneis1 reaction
- Nov 6, 2026chore(main): release mcp 3.25.0 — ghchinoy/genmedia-creative-studio0 reactions
- Sep 20, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to 5b45f52 — GoogleCloudPlatform/genmedia-creative-studio0 reactions
- Sep 19, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to 3087a62 — GoogleCloudPlatform/genmedia-creative-studio0 reactions
- Sep 18, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to 88c354f — GoogleCloudPlatform/genmedia-creative-studio0 reactions
45 more on GitHub
- Sep 17, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to b0287be — GoogleCloudPlatform/genmedia-creative-studio0 reactions
- Sep 16, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to 40e142b — GoogleCloudPlatform/genmedia-creative-studio0 reactions
- Sep 15, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to 8e0620e — GoogleCloudPlatform/genmedia-creative-studio0 reactions
- Sep 14, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to ae4be8c — GoogleCloudPlatform/genmedia-creative-studio0 reactions · 1 comment
- Sep 14, 2026Upstream v3.20.0 conflicts with our changes — GoogleCloudPlatform/genmedia-creative-studio0 reactions · 2 comments
- Sep 13, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to 763e337 — GoogleCloudPlatform/genmedia-creative-studio0 reactions
- Sep 12, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to 4fdae31 — GoogleCloudPlatform/genmedia-creative-studio0 reactions
- Sep 12, 2026chore(main): release mcp 3.20.1 — GoogleCloudPlatform/genmedia-creative-studio0 reactions · 2 comments
- Sep 11, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to 7589d38 — GoogleCloudPlatform/genmedia-creative-studio0 reactions
- Sep 11, 2026chore(main): release mcp 3.20.0 — GoogleCloudPlatform/genmedia-creative-studio0 reactions · 2 comments
- Sep 10, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to d5cee2d — GoogleCloudPlatform/genmedia-creative-studio0 reactions
- Sep 10, 2026chore(main): release mcp 3.19.0 — GoogleCloudPlatform/genmedia-creative-studio0 reactions · 2 comments
- Sep 10, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to 39d70e0 — GoogleCloudPlatform/genmedia-creative-studio0 reactions
- Sep 8, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to ccc0fab — GoogleCloudPlatform/genmedia-creative-studio0 reactions
- Sep 7, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to 4e71935 — GoogleCloudPlatform/genmedia-creative-studio0 reactions
- Sep 6, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to 31f00b0 — GoogleCloudPlatform/genmedia-creative-studio0 reactions · 1 comment
- Sep 5, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to 05a061f — GoogleCloudPlatform/genmedia-creative-studio0 reactions
- Sep 4, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to 8eb22ce — GoogleCloudPlatform/genmedia-creative-studio0 reactions
- Sep 3, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to eb4acba — GoogleCloudPlatform/genmedia-creative-studio0 reactions · 1 comment
- Sep 2, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to 4cf3347 — GoogleCloudPlatform/genmedia-creative-studio0 reactions
- Sep 1, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to b0791b1 — GoogleCloudPlatform/genmedia-creative-studio0 reactions
- Aug 31, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to bee1309 — GoogleCloudPlatform/genmedia-creative-studio0 reactions
- Aug 30, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to 13e7157 — GoogleCloudPlatform/genmedia-creative-studio0 reactions
- Aug 30, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to 13e7157 - autoclosed — GoogleCloudPlatform/genmedia-creative-studio0 reactions
- Aug 30, 2026chore(main): release mcp 3.18.2 — GoogleCloudPlatform/genmedia-creative-studio0 reactions · 3 comments
- Aug 29, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to 2d2693a — GoogleCloudPlatform/genmedia-creative-studio0 reactions
- Aug 29, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to 1546cf6 - autoclosed — GoogleCloudPlatform/genmedia-creative-studio0 reactions
- Aug 28, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to 9b1fb75 — GoogleCloudPlatform/genmedia-creative-studio0 reactions · 1 comment
- Aug 28, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to df1a7c7 - autoclosed — GoogleCloudPlatform/genmedia-creative-studio0 reactions
- Aug 28, 2026chore(main): release mcp 3.18.0 — GoogleCloudPlatform/genmedia-creative-studio0 reactions · 2 comments
- Aug 27, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to eaa1e8c — GoogleCloudPlatform/genmedia-creative-studio0 reactions
- Aug 27, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to 6f809bc - autoclosed — GoogleCloudPlatform/genmedia-creative-studio0 reactions
- Aug 27, 2026chore(main): release mcp 3.17.0 — GoogleCloudPlatform/genmedia-creative-studio0 reactions · 2 comments
- Aug 26, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to 93a5e6e — GoogleCloudPlatform/genmedia-creative-studio0 reactions · 1 comment
- Aug 25, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to d95296d — GoogleCloudPlatform/genmedia-creative-studio0 reactions
- Aug 24, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to 69e1a53 — GoogleCloudPlatform/genmedia-creative-studio0 reactions · 1 comment
- Aug 17, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to 667d963 — GoogleCloudPlatform/genmedia-creative-studio0 reactions
- Aug 17, 2026chore(main): release mcp 3.16.0 — GoogleCloudPlatform/genmedia-creative-studio0 reactions · 2 comments
- Aug 12, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to c579b71 — GoogleCloudPlatform/genmedia-creative-studio0 reactions · 1 comment
- Aug 10, 2026fix(deps): update github.com/googlecloudplatform/vertex-ai-creative-studio/experiments/mcp-genmedia/mcp-genmedia-go/mcp-common digest to 9f5c076 - autoclosed — GoogleCloudPlatform/genmedia-creative-studio0 reactions · 1 comment
- Aug 10, 2026chore(main): release mcp 3.13.0 — GoogleCloudPlatform/genmedia-creative-studio0 reactions · 2 comments
- Aug 10, 2026chore(main): release mcp 3.12.1 — GoogleCloudPlatform/genmedia-creative-studio0 reactions · 2 comments
- Aug 10, 2026chore(main): release mcp 3.24.0 — ghchinoy/genmedia-creative-studio0 reactions · 1 comment
- Aug 10, 2026chore(main): release mcp 3.25.0 — renovate-bot/GoogleCloudPlatform-_-vertex-ai-creative-studio0 reactions
- Aug 10, 2026chore(main): release mcp 3.11.1 — GoogleCloudPlatform/genmedia-creative-studio0 reactions · 2 comments
On Bluesky · 1
- Nov 5, 2025📦 GoogleCloudPlatform / vertex-ai-creative-studio ⭐ 520 (+7) 🗒 Jupyter Notebook GenMedia Creative Studio is a Vertex AI generative media… — @github-trending.bsky.social1 likes and repost
Other versions4 projects use a version of this.
Word for word · 1
- GoogleCloudPlatform/genmedia-creative-studio★ 1.2k100% same
Edited · 0
None found.
Wrote their own version · 3
- dmccreary/claude-skills★ 110same name
- dmccreary/ibook-skills★ 110same name
- gihwan-dev/claude-code-gui★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- genmedia-imageSkill
- genmedia-producerSkill
- producerSkill
- agent-aware-cliSkill
- build-mcp-genmediaSkill
- genmedia-audio-engineerSkill
- genmedia-image-artistSkill
- genmedia-producerSkill
- genmedia-video-editorSkill
- genmedia-voice-directorSkill
- install-mcp-genmediaSkill
- mesop-to-litSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. 0 are common, 6 are distinctive, and 9 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 34
Before generating any media, the agent must assume the persona of an expert showrunner and creative co-director and host an interactive …
- Distinctive: line 40
Narrative Scene Count: Ask the user exactly how many scenes they want in their narrative (e.g., a short 3-scene story, a standard 5-scene …
- Distinctive: line 88
If you are an agent executing these steps manually in the command line, use this step-by-step FFmpeg blueprint to compile individual scenes …
- Distinctive: line 91
Always run TTS generation first and retrieve the exact duration of the voice file:
- Very specific: line 99
Use a 720p, 16:9 clip (set resolution and aspect_ratio) and keep the clip's own audio to ambient sound: add "ambient sound effects only, no …
- Very specific: line 101
If you use Veo instead (fallback, veo_i2v), only 4, 6 or 8 seconds are available:
- Very specific: line 112
If voice_duration ($D_{voice}$) is longer than video_duration ($D_{vid}$), calculate the required tempo ratio: $$\text{tempo} = …
- Very specific: line 114
Tempo Guardrail: If $\text{tempo} \le 1.25$, apply the atempo filter.
- Very specific: line 115
Tempo Clamp: If $\text{tempo} > 1.25$, drop the tempo back to 1.0 (natural speaking speed) and loop the background video clip indefinitely …
- Very specific: line 127
Run the appropriate mixing command.
- Distinctive: line 143
Before concatenating multiple video files, you MUST normalize their audio parameters to prevent audio drift, blank screens, or …
- Very specific: line 169
Run generate_scene.py for each scene (this can be executed concurrently in parallel subagents to maximize throughput):
- Very specific: line 185
Run assemble_story.py to normalize the generated clips and stitch them into the final storybook:
- Very specific: line 209
If the QC Room outputs TEMPO warnings, the agent should intercept this, present the actionable editorial notes to the user, and offer to …
- Distinctive: line 215
Every compiled project report includes a high-fidelity rendering of the Double-Engine media pipeline, visualized via Graphviz DOT.
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Story Generator Skill (v1.3.0)
This skill allows an agent to design, generate, and composite a multi-scene storybook video using direct, native MCP tool calls. It implements a feedback-driven cognitive media engine. By combining upfront voiceover duration probing with dynamic video length selection, tempo clamping, and a dedicated quality-assurance audit ("The Editor's QC Room"), it guarantees studio-grade pacing and prevents typical AI audio-video desyncs.
Directory Structure
Conforming to the Agent Skills Specification:
story-generator/
├── SKILL.md # Main metadata, co-creation instructions & FFmpeg blueprints
├── scripts/ # Executable orchestration & compilation utilities
│ ├── generate_scene.py # Generates individual scenes with speed-fit and mixing
│ ├── assemble_story.py # Normalizes codecs and concatenates scenes without desync
│ ├── editors_quality_room.py # Evaluates and audits scene/master quality and speech rates
│ ├── generate_pipeline_diagram.py # Compiles custom Graphviz DOT pipeline flowcharts
│ ├── generate_report.py # Compiles interactive HTML report
│ └── package_report.py # Packages report into a standalone zip file
└── assets/ # Reusable design tokens & static assets
├── index.css # Premium Material 3 stylesheet (Emerald/Cosmic)
└── fonts/ # Font files (GoogleSansFlex.ttf)1. The Writers Room Interrogation (Co-Creation Phase)
Before generating any media, the agent must assume the persona of an expert showrunner and creative co-director and host an interactive co-creation session with the user. The goal is to draft a comprehensive Story Bible before generating any files.
1.1 The Interrogation Process
The agent must present a structured inquiry covering The Four Pillars of Media Interrogation. Instead of just asking dry questions, the agent should propose imaginative style elements, plot quirks, or color schemes to inspire the user.
Pillar 1: Narrative Scope & Custom Length
- Narrative Scene Count: Ask the user exactly how many scenes they want in their narrative (e.g., a short 3-scene story, a standard 5-scene story, or an epic 10+ scene odyssey). Do NOT constrain the length.
- Arc Structure: Let the user select the dramatic format:
- Classic Hero's Journey: Hook, call to adventure, trials, climax, and resolution.
- Short-Form Arc: Focused problem, quick struggle, and fast solution.
- Tragic Fall: Rise to prominence, pride/error, rapid failure, and moral warning.
- Rags to Riches: Struggle against adversity, discovery, triumph, and giving back.
- Custom / Freestyle: User-provided structural sequence.
Pillar 2: Character Consistency Framework
- Primary Character Portrait Prompt: Co-create a detailed description of the protagonist to maintain visual consistency.
- Formula:
[Species/Role] + [Age/Mood] + [Distinct Costume] + [Defining Physical Features]. - Example: "A fluffy white Angora bunny wearing miniature round science safety goggles, a tiny leather tool belt, and an emerald-green vest. Extremely curious, bright pink twitching nose."
- Formula:
- Supporting Cast: Describe secondary characters and their visual relationship to the protagonist.
Pillar 3: Multimedia & Production Aesthetics
- Visual Art Medium: (e.g., 3D Claymation / Stop-Motion [recommended for charming consistency], Realistic Sci-Fi Cinematic, or Watercolor Sketch).
- Color Palette & Mood: (e.g., "Vibrant pasture greens and soft gold sunlight" or "Desaturated charcoal and glowing bioluminescent cyan").
- Soundtrack Genre & Tone: (e.g., "Whimsical acoustic guitar and playful tuba" or "Ethereal synth pads and slow, soft chimes").
- Voice Actor Cast: (Prefer Callirrhoe for warm/soothing female narration, Fenrir for resonant/deep sci-fi narration, or Kore for playful/bright stories. With the default Gemini 3.8 TTS you can also cast an Extended Voice Library narrator, e.g.
list_gemini_voiceswithsearch: "storyteller". Keep the voice prompt to a short delivery style such as "soothing, gentle"; the voice itself carries gender and accent).
Pillar 4: Audio Speed-Fitting Preference
- Confirm if the user wants the system to automatically speed-fit the narrator voice-over using the FFmpeg
atempofilter if it runs longer than the video scene (recommended to avoid video stalling/looping). - Warning: Inform the user that the showrunner will strictly clamp voiceover speedups at $1.25\times$ to preserve natural speaker cadence. If a script is too wordy, the pipeline will instead loop the video or recommend text cuts in the Editor's QC Room.
1.2 Interactive Loop
- Draft Proposed Story Bible: Synthesize the user's answers and your creative suggestions into a formal Story Bible block.
- Await Explicit User Approval: Present the story bible and scene-by-scene script. Do NOT proceed to media generation until the user has explicitly approved the story bible.
2. Scripting & Story Bible Schema
Once the user approves the story bible, format the scene-by-scene scripts in a structured scenes.json file. For each scene (1 to N), specify:
- id: Sequential scene index (1-indexed).
- title: Concise scene name.
- narrator: Text for the voice-over: only the words to be spoken, with no stage directions (Gemini 3.8 TTS reads it verbatim). Keep it under 800 characters, both to fit the scene and so it works on every Gemini TTS model; 3.8 itself accepts up to 4,000. Vocal events may use
<sigh>,<laugh>,<short pause>. - music_prompt: Specific background music prompt for Lyria.
- Rule: Music prompts must automatically append the strict instrumental negative filter:
, strictly instrumental, no vocals, no voice, no singing, ambient background scoreto avoid synthetic vocal artifacts.
- Rule: Music prompts must automatically append the strict instrumental negative filter:
- image_prompt: Nano Banana visual prompt incorporating the character descriptions and visual medium.
- motion_prompt: Motion prompt for the video model (Gemini Omni 1.2 by default, Veo 3.1 Lite as a fallback) describing camera movement and subject action. The scripts append "ambient sound effects only, no speech, no dialogue, no narration, no music" for Omni, since it generates audio with the video and narration and music are mixed in separately.
3. Double-Engine Media Assembly Pipeline
This skill provides a Double-Engine media assembly pipeline. Any coding agent can either run the automated Python scripts or perform the exact manual FFmpeg commands directly in the shell if they want to override the pipeline.
Engine A: Manual Agent Command Blueprint (Raw FFmpeg)
If you are an agent executing these steps manually in the command line, use this step-by-step FFmpeg blueprint to compile individual scenes and concatenate them robustly:
1. Generate Voiceover & Probe Duration
Always run TTS generation first and retrieve the exact duration of the voice file:
ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 voice.wav2. Query Video with Optimal Sizing
Compare the voice duration ($D_{voice}$) and request a matching video length. Gemini Omni 1.2 (omni_video_generation, default) takes any whole number of seconds from 3 to 15, so request the voiceover plus a small tail, with the scene image as the first frame (images with one entry and no task):
$$\text{clip} = \min(15, \max(3, \lceil D_{voice} + 0.25 \rceil))$$
Use a 720p, 16:9 clip (set resolution and aspect_ratio) and keep the clip's own audio to ambient sound: add "ambient sound effects only, no speech, no dialogue, no narration, no music" to the prompt.
If you use Veo instead (fallback, veo_i2v), only 4, 6 or 8 seconds are available:
- $D_{voice} \le 4.2\text{s} \rightarrow$ Generate a 4-second video clip.
- $D_{voice} \le 6.2\text{s} \rightarrow$ Generate a 6-second video clip.
- $D_{voice} > 6.2\text{s} \rightarrow$ Generate an 8-second video clip.
Retrieve the resulting video clip's exact duration:
ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 video.mp43. Calculate Speed-Fit Tempo and Determine Looping
If voice_duration ($D_{voice}$) is longer than video_duration ($D_{vid}$), calculate the required tempo ratio:
$$\text{tempo} = \frac{D_{voice}}{D_{vid} - 0.5}$$
- Tempo Guardrail: If $\text{tempo} \le 1.25$, apply the
atempofilter. - Tempo Clamp: If $\text{tempo} > 1.25$, drop the tempo back to
1.0(natural speaking speed) and loop the background video clip indefinitely to fit.
4. Determine if Video has a Native Audio Track
To prevent FFmpeg filter crashes, check if the video has an audio stream:
ffprobe -v error -select_streams a -show_entries stream=codec_type -of csv=p=0 video.mp45. Mix Audio Streams with Volume Ducking & Mathematical Capping
Calculate the exact target output duration: $$\text{out_duration} = \frac{D_{voice}}{\text{tempo}}$$
Run the appropriate mixing command. CRITICAL: We append -stream_loop -1 to loop the video in case tempo clamping is active, and enforce the output duration strictly with -t {out_duration} to prevent blank trailing frames.
- Case A (Video has ambient sound): Duck video audio to 25%, apply speed-fit and boost to narration, duck music to 15%, and mix them:
ffmpeg -y -stream_loop -1 -i video.mp4 -i voice.wav -i music.wav \ -filter_complex "[0:a]volume=0.25[bgv]; [1:a]atempo=1.20,volume=1.5[vo]; [2:a]volume=0.15[bgm]; [vo][bgv][bgm]amix=inputs=3:duration=first:dropout_transition=0[aout]" \ -map 0:v -map "[aout]" -t 7.345 -c:v libx264 -preset fast -pix_fmt yuv420p -c:a aac -ar 44100 scene_mixed.mp4 - Case B (Video is silent): Mix only the speed-fitted narration and the ducked background music:
ffmpeg -y -stream_loop -1 -i video.mp4 -i voice.wav -i music.wav \ -filter_complex "[1:a]atempo=1.20,volume=1.5[vo]; [2:a]volume=0.15[bgm]; [vo][bgm]amix=inputs=2:duration=first:dropout_transition=0[aout]" \ -map 0:v -map "[aout]" -t 7.345 -c:v libx264 -preset fast -pix_fmt yuv420p -c:a aac -ar 44100 scene_mixed.mp4
6. Pre-flight Normalization for Concat Desync Prevention
Before concatenating multiple video files, you MUST normalize their audio parameters to prevent audio drift, blank screens, or concatenation failures.
- Normalize Segment WITH Native Audio: Re-encode to standard
libx264andaacat44100Hz:ffmpeg -i scene_mixed.mp4 -c:v libx264 -preset fast -c:a aac -ar 44100 -y norm_scene.mp4 - Normalize Segment WITHOUT Audio (Silent clips): Force-inject a silent mono track and re-encode:
ffmpeg -i scene_mixed.mp4 -f lavfi -i anullsrc=cl=mono:r=44100 \ -map 0:v -map 1:a -c:v libx264 -preset fast -c:a aac -shortest -y norm_scene.mp4
7. Concatenate Normalized Segments Instantly
Since all segments are perfectly normalized to the same video/audio codec configurations, stitch them instantly without re-encoding:
# Create concat_list.txt containing file paths:
# file 'norm_scene_1.mp4'
# file 'norm_scene_2.mp4'
ffmpeg -y -f concat -safe 0 -i concat_list.txt -c copy final_story.mp4Engine B: Automated Scripting Blueprint
For fully automated and robust end-to-end execution, use the provided Python scripts in the scripts/ directory:
1. Generate Individual Scene Assets
Run generate_scene.py for each scene (this can be executed concurrently in parallel subagents to maximize throughput):
python3 story-generator/scripts/generate_scene.py \
--scene_id 1 \
--narrator "Barnaby the bunny woke up in his cozy earthy burrow..." \
--voice "Callirrhoe" \
--music "Gentle acoustic guitar theme" \
--image "3D claymation, cartoon bunny with safety goggles..." \
--video "The bunny stretches lazily, ears twitching" \
--out_dir /path/to/project_dir(This script automatically handles the voiceover-first ffprobe checks, dynamic video duration mapping, speed-clamping at 1.25x with auto-looping, vocal negative filtering, and explicit mathematical duration capping).
Video is generated with Gemini Omni 1.2 by default, using mcp-omni-go (or mcp-gemini-go, which exposes the same tool, when mcp-omni-go is not on PATH). Pass --video_engine veo to use Veo 3.1 Lite instead, and --resolution (default 720p) to change the Omni output resolution. The raw clip is saved as videos/scene<N>_video.mp4 for either engine, which the Editor's QC Room reads to size its tempo estimate.
2. Assemble and Stitch the Final Storybook
Run assemble_story.py to normalize the generated clips and stitch them into the final storybook:
python3 story-generator/scripts/assemble_story.py \
--project_dir /path/to/project_dir \
--output_name final_story.mp44. The Editor's Quality Control Room Stage
To ensure broadcast-quality narrative pacing and format adherence, the agent must run the QC stage immediately after stitching the master video.
python3 story-generator/scripts/editors_quality_room.py --project_dir /path/to/project_dir4.1 Audits Conducted
- Format Verification: Confirms that all scene files and the final master video are standard H.264 video with AAC, 44100Hz stereo audio.
- Narrator Speech Density Audit: Computes the estimated speech-tempo ratio. If a scene requires a compression factor $> 1.50\times$, it flags a
TEMPOwarning. - A/V Drift Detection: Audits the compiled master video duration against the mathematical sum of the individual scene files. If the drift exceeds 0.5 seconds, it flags a
DRIFTwarning. - Actionable Quality Report: Outputs
quality_report.jsonand a human-readablequality_report.mdspecifying actionable editorial feedback.
4.2 Self-Correcting Feedback Loop
If the QC Room outputs TEMPO warnings, the agent should intercept this, present the actionable editorial notes to the user, and offer to automatically shorten the narration script for those specific scenes (aiming for under 12–14 words per 6-second segment) to maintain a natural, calm cadence.
5. Visual Pipeline Flowcharts
Every compiled project report includes a high-fidelity rendering of the Double-Engine media pipeline, visualized via Graphviz DOT.
python3 story-generator/scripts/generate_pipeline_diagram.py --project_dir /path/to/project_dirThis command parses the workflow blocks and compiles /path/to/project_dir/report/pipeline_diagram.dot to an optimized /path/to/project_dir/report/pipeline_diagram.webp file, which is then embedded directly as a premium architecture dashboard card inside the compiled Material 3 HTML reports.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

