A Claude Code plugin that turns a story into a finished anime
Ruby
Add the shonen-battle example, its specs and the README
Francesco 'makevoid' Canessaf63f740a0ccc
diff --git a/README.md b/README.mdnew file mode 100644index 0000000..bc64567--- /dev/null+++ b/README.md@@ -0,0 +1,237 @@+# Make an Anime++A Claude Code plugin that turns a story into a finished anime: character sheets, camera-directed shots, voices, a score, titles, subtitles, sound effects and finishing VFX. It works at any length, from a 12-second battle scene to a full episode.++<img src="https://github.com/user-attachments/assets/58d0fe9c-118d-4f17-8228-798e29b48e56" alt="Three frames from the sample: the EMBER × TEMPEST title card, the layered green-screen composite, and the full MiniMax H3 shot" width="100%">++This 12-second sample was generated with the plugin, using the example bundled in this repo. Sound on:++https://github.com/user-attachments/assets/50875ac6-d6f9-4b5f-b2b3-9f8f576d04fd++| Time | Section | How it is made |+| --- | --- | --- |+| 0–2 s | Title | Drawn in p5 over a colour plate |+| 2–7 s | Layered composite | Two green-screen fighters, moved in p5 over an animated background, with subtitles and a rolling camera |+| 7–12 s | Full H3 | One continuous MiniMax H3 take with no layers, the camera orbiting 180° around both fighters |++It also works at full length: the toolkit was first used for a narrated anime documentary of over 12 minutes, in about 40 scenes. See [Full episodes](#full-episodes).++## Installation++In Claude Code:++```text+/plugin marketplace add makevoid/claude-make-an-anime+/plugin install make-an-anime@make-an-anime+```++The plugin asks for your [Fal](https://fal.ai) API key and stores it as a sensitive option. All paid generation goes through Fal, so you need an account with credit.++You also need these on your machine:++| Tool | Used for |+| --- | --- |+| Ruby 3.2+ and Bundler | The toolkit itself |+| FFmpeg, ImageMagick | Video, audio and image work |+| Python 3 | Green-screen keying, score editing, analysis |+| Node.js 22+ and Chrome | Rendering p5 titles, subtitles and composites |+| macOS 14+ and Swift 5.9+ | Optional: the Core Image VFX pass |++Each project installs its own Ruby, Node and Python packages when the skill runs `setup`, and `doctor` reports anything missing.++## Usage++Ask Claude for what you want:++```text+/make-an-anime Make a 2-minute pilot from story.md, with characters based on the photos in ./refs+```++Claude reads the story, writes a production plan (cast, voices, shot list, every prompt, the number of paid calls) and asks you to approve it. No paid call runs before that approval. It then produces and reviews each step, and retakes shots that fail review.++Reference photos are optional: original characters are designed from text. Use photos of real people only with their consent.++### Generate the sample yourself++```sh+git clone https://github.com/makevoid/claude-make-an-anime+ruby claude-make-an-anime/skills/make-an-anime/scripts/mv.rb init --project ~/anime/shonen --example shonen-battle+cd ~/anime/shonen+ruby mv.rb setup+ruby mv.rb 'fonts:copy[config/fonts.json]'+```++`config/fonts.json` points to macOS system fonts, so change those paths on other systems. Read `docs/PLAN.md`, then record your approval. The commands below are paid, and need your key in `FAL_AI_API_KEY`:++```sh+NOTE='I approve this plan' ruby mv.rb plan:approve++for run in char-kaen-v1 char-arashi-v1 loc-sky-arena-v1; do RUN=$run ruby mv.rb gen:ref_base; done++export RUN=shonen-s01+ruby mv.rb gen:dialogue+ruby mv.rb gen:music+ruby mv.rb gen:mix+ruby mv.rb gen:keyframes+ruby mv.rb gen:clips+ruby mv.rb gen:shots+ruby mv.rb gen:overlay+SFX=shonen-s01-sfx ruby mv.rb sfx:gen+SFX=shonen-s01-sfx ruby mv.rb sfx:mix+ruby mv.rb vfx:build+VFX=shonen-s01-vfx ruby mv.rb vfx:render # -> output/shonen-s01/final_vfx.mp4+```++The sample used 7 images, 5 H3 clips of 5 s (one was a retake), 4 voice lines with 4 Whisper checks, 1 score and 6 sound effects. It took about 20 minutes. Check current prices on Fal before you run it.++## How a scene is made++Each stage reads prompts from `prompts/<run>/` and writes to `output/<run>/`, so everything can be inspected and redone on its own. Here is what each stage produced for the sample.++### 1. Character and location sheets++The style bible (`config/style.md`) goes into every prompt through `{{STYLE}}`, so the whole cast shares one look. GPT Image 2.5 draws a turnaround and expressions for each character, and those sheets become the references for everything after. The colours and costumes avoid green on purpose, because these characters will be keyed.++**Kaen**, the flame fighter:++<img src="https://github.com/user-attachments/assets/6a59307a-22b5-49c3-9743-4630c2d8edc9" alt="Character sheet of Kaen: turnaround and expressions" width="100%">++**Arashi**, the storm fighter:++<img src="https://github.com/user-attachments/assets/ead8d6f4-bc20-48e8-8160-5f37a35c4adb" alt="Character sheet of Arashi: turnaround and expressions" width="100%">++**The sky arena**, a recurring location:++<img src="https://github.com/user-attachments/assets/a09e4508-786b-401b-96f7-ef2cd3dd4848" alt="Location sheet of a broken arena floating at sunset" width="100%">++### 2. Voices and score, before any animation++Each character gets one ElevenLabs Eleven v4 voice in `config/cast.yml`. Lines carry their start time, and audio tags like `[cold, cutting]` are performed rather than spoken. Line lengths decide the shot lengths, so voices come first:++- `review:dialogue` checks every take with Whisper.+- `dialogue:timeline` catches lines that cross a cut.++ElevenLabs Music v2.5 then composes one score from a plan that follows the scene's beats, and `gen:mix` ducks it under the voices.++### 3. Keyframes++GPT Image 2.5 composes one first frame per shot from the sheets: an empty arena for the background, each fighter alone on flat `#00B140`, and the mid-air clash for the full-H3 shot.++<img src="https://github.com/user-attachments/assets/f25487dd-200e-4adb-81ba-451c24593ab0" alt="The four keyframes: empty arena, Kaen on green, Arashi on green, and the clash" width="100%">++### 4. Background plate++MiniMax H3 animates the empty arena with an orbit around its centre. `roll: [-9, 9]` in `04_shots.yml` adds a virtual camera roll, applied locally in FFmpeg and scaled just enough to hide the corners.++<img src="https://github.com/user-attachments/assets/2d2eebfd-a654-4b90-882f-c9520447ed38" alt="Four frames of the animated arena plate, with the camera orbiting and rolling" width="100%">++### 5. Green-screen performances++H3 animates each fighter with a locked camera, and that character's voice track as target audio so the mouth follows the line. `key: green` turns each clip into a transparent PNG sequence.++<img src="https://github.com/user-attachments/assets/7e352b37-b66d-430b-94a4-08516738198b" alt="Each fighter on green beside the same frame keyed to transparency" width="100%">++### 6. Composite in p5++`05_overlay.js` draws the title, moves the two sprites around a shared centre and rushes them together for the hit at 5.6 s. It adds speed lines, a bloom, shock rings, embers and subtitles. Sprites are drawn inside `Anim.withRoll`, so they turn with the plate, while subtitles stay level.++From left to right: the plate, the p5 layer, and the composite after sound and VFX.++<img src="https://github.com/user-attachments/assets/800ee8c7-1427-496a-9945-a72d2f7e12c7" alt="The plate, the transparent p5 layer, and the final composite of the same frame" width="100%">++### 7. The same fight with no layers++For comparison, the last five seconds are a single H3 take from the clash keyframe. It needs one clip and no compositing, and the camera passes behind Kaen and ends on the opposite side of the fight. You get less control over timing, and the mouths are not synced to the finisher lines.++<img src="https://github.com/user-attachments/assets/f92874fe-063e-4b13-abcd-6ed87e7e8bf4" alt="Four frames of the continuous H3 shot, with the fighters swapping sides as the camera orbits" width="100%">++Painted full-frame shots like this are the default. Layers are for moments that need exact placement and timing: [layered-scenes.md](skills/make-an-anime/references/layered-scenes.md) explains when to use them.++### 8. Sound and finish++`sfx:gen` creates sound effects with Stable Audio, and `sfx:mix` places them from a cue list and levels them against the mix. `vfx:render` then adds impact punches, RGB split, glow and grain with Swift Core Image, on frame-accurate cues.++## How a scene is edited++Everything is a file, and every step is cached, so a change only redoes what it affects. Replaced takes are kept in `output/<run>/rejected/`. These are the real edits made to the sample after its first pass:++| What was wrong | The edit | Cost |+| --- | --- | --- |+| Two pairs of voice lines overlapped | Changed `at:` in `03_dialogue.yml`, then `gen:dialogue` and `gen:mix` reused the takes | Free |+| Arashi's hair and coat turned black partway through her clip | Added the colours to the prompt, then `ONLY=arashi FORCE=1 gen:clips` | 1 H3 clip |+| An olive fringe around Kaen's flames, where they lit the green | Added `low: 8` to the clip, then `RECUT=1 ONLY=kaen FORCE=1 gen:clips` re-keyed the downloaded clip | Free |+| Fighters too large, hiding each other | Edited `05_overlay.js` and checked single frames with `'anim:preview[70,100,134]'` | Free |+| The score faded out at 10 s, under the last line | Held the climax chord (below) and set `music_from` | Free |++The score edit, then the rebuild of everything that depends on it:++```sh+.venv/bin/python3 -I tools/python/score_tool.py freeze \+ output/shonen-s01/03_music_12s.wav output/shonen-s01/03_score_end.wav 9.0 8.5 9.0 12 -19 -23+# in config/generations.rb: music_from: "output/shonen-s01/03_score_end.wav"+ruby mv.rb gen:music+ruby mv.rb gen:mix+ruby mv.rb 'scene:reaudio[shonen-s01]' # new mix on the rendered picture, no re-render+SFX=shonen-s01-sfx ruby mv.rb sfx:mix+VFX=shonen-s01-vfx ruby mv.rb vfx:render+```++A retake needs a changed prompt. Fal requests are stored as receipts by their exact input, so `FORCE=1` with an unchanged prompt fetches the same result again, at no charge.++Local review tools help decide what to retake:++| Command | What it shows |+| --- | --- |+| `review:camera` | The camera move each shot made, with frame strips to read by eye |+| `review:clips` | A board of the keyed sprites and their coverage |+| `review:dialogue` | What Whisper heard in each take (paid) |+| `dialogue:timeline` | Lines against shots and cuts |+| `audio:seams` | Abrupt music changes at scene joins and inside a score |++### What is still imperfect in the sample++- The sprites carry the light of their keyframes and have no contact shadow, so they sit less firmly in the scene than the full-H3 shot.+- A faint warm edge remains around Kaen's flames.+- Arashi still darkens a little under the lightning in the last second of her clip.+- The full-H3 mouths are not synced to the finisher lines, which are shouted over the action.++## Full episodes++A longer project uses the same steps, one run per scene, plus:++- `scene:new[ep01-s05,480]` to scaffold a scene, with one config file per scene so several agents can work at once+- `config/episodes/ep01.yml` for the playing order+- `episode:preview` to join scenes, levelling the voices across them (`VOICE_DB`) and fading the seams (`SEAMS=1`)+- production waves with sub-agents (`work:next`, `work:accept`), starting with the opening and the emotional peak++[full-episode.md](skills/make-an-anime/references/full-episode.md) has the complete workflow.++## Repository layout++```text+.claude-plugin/ plugin and marketplace manifests+skills/make-an-anime/+ SKILL.md what Claude follows+ references/ planning, prompts, camera language, audio, episodes+ examples/shonen-battle/ the sample's story, config, prompts and plan+ scripts/+ mv.rb, mcp.rb CLI and MCP entry points+ lib/fal/ Fal queue client with receipts, and model wrappers+ lib/pipeline/steps/ RefBase, Dialogue, Music, Mix, Keyframes, Shots, Clips, Overlay+ lib/media/, lib/toolkit/ FFmpeg, ImageMagick, Python, p5 and Swift wrappers; project tools+ tools/p5/ headless renderer and the Anim library+ tools/python/ keying, tracking, analysis, score editing+ tools/vfx/ Swift Core Image renderer+ spec/ RSpec suite+```++The specs never call Fal. They run from `skills/make-an-anime/scripts` after `npm ci`, with `MV_PYTHON` pointing at a Python that has `requirements.txt` installed:++```sh+bundle exec rspec --tag core+bundle exec rspec --tag media # includes the whole sample scene with synthetic media+```++## License++[MIT](LICENSE)diff --git a/skills/make-an-anime/examples/shonen-battle/config/cast.yml b/skills/make-an-anime/examples/shonen-battle/config/cast.ymlnew file mode 100644index 0000000..809b3ec--- /dev/null+++ b/skills/make-an-anime/examples/shonen-battle/config/cast.yml@@ -0,0 +1,13 @@+# One ElevenLabs voice per character, shared by every scene. Casting reason: two clearly different pitches over loud music.+kaen:+ name: Kaen+ voice: Callum # young, forward, hot-headed+ stability: 0.3+ similarity_boost: 0.8+ ref: char-kaen-v1+arashi:+ name: Arashi+ voice: Charlotte # cool, cutting, controlled+ stability: 0.35+ similarity_boost: 0.8+ ref: char-arashi-v1diff --git a/skills/make-an-anime/examples/shonen-battle/config/episodes/shonen.yml b/skills/make-an-anime/examples/shonen-battle/config/episodes/shonen.ymlnew file mode 100644index 0000000..0f2bc91--- /dev/null+++ b/skills/make-an-anime/examples/shonen-battle/config/episodes/shonen.yml@@ -0,0 +1 @@+- shonen-s01diff --git a/skills/make-an-anime/examples/shonen-battle/config/fonts.json b/skills/make-an-anime/examples/shonen-battle/config/fonts.jsonnew file mode 100644index 0000000..c175dcb--- /dev/null+++ b/skills/make-an-anime/examples/shonen-battle/config/fonts.json@@ -0,0 +1,5 @@+{+ "title.ttf": "/System/Library/Fonts/Supplemental/Impact.ttf",+ "sub.ttf": "/System/Library/Fonts/Supplemental/Arial Bold.ttf",+ "sub-italic.ttf": "/System/Library/Fonts/Supplemental/Arial Bold Italic.ttf"+}diff --git a/skills/make-an-anime/examples/shonen-battle/config/generations.rb b/skills/make-an-anime/examples/shonen-battle/config/generations.rbnew file mode 100644index 0000000..03726aa--- /dev/null+++ b/skills/make-an-anime/examples/shonen-battle/config/generations.rb@@ -0,0 +1,15 @@+# EMBER × TEMPEST. Evaluated inside Pipeline; see the skill's references/tasks.md.+{+ # Character and location sheets: text-to-image, no reference photos.+ "char-kaen-v1" => { steps: [Steps::RefBase] },+ "char-arashi-v1" => { steps: [Steps::RefBase] },+ "loc-sky-arena-v1" => { steps: [Steps::RefBase] },+ # One 12 s scene = 288 frames, so the score runs unbroken across all three sections:+ # title 48 frames, layered composite 120, full H3 120.+ # After gen:music this take faded out at 10 s, so the sample holds its climax chord with tools/python/score_tool.py and+ # adds music_from: "output/shonen-s01/03_score_end.wav" here (see the README's editing section).+ "shonen-s01" => {+ steps: [Steps::Dialogue, Steps::Music, Steps::Mix, Steps::Keyframes, Steps::Shots, Steps::Clips, Steps::Overlay],+ **scene(288), music_fade: 0.4, mix: { voice_lift_db: 6, music_db: -5, dialogue_db: 0, duck: true }+ }+}diff --git a/skills/make-an-anime/examples/shonen-battle/config/style.md b/skills/make-an-anime/examples/shonen-battle/config/style.mdnew file mode 100644index 0000000..7fd2315--- /dev/null+++ b/skills/make-an-anime/examples/shonen-battle/config/style.md@@ -0,0 +1 @@+Contemporary Japanese TV shounen battle anime, cel-shaded 2D look: bold clean black lineart with heavier silhouette lines, hard two-tone cel shading with sharp high-contrast shadows, saturated colour, dynamic adult proportions with sharp angular faces and intense expressive eyes, hair drawn as large spiky shaped clumps with hard specular highlights, hand-painted dramatic backgrounds with atmospheric depth, hot motivated rim light from fire and cold rim light from lightning. Broadcast-quality polish. Not 3D, not photorealistic, no chibi, no painterly smears. Absolutely no text, letters, numbers, logos, symbols, subtitles, signatures or watermarks anywhere in the image.diff --git a/skills/make-an-anime/examples/shonen-battle/docs/PLAN.md b/skills/make-an-anime/examples/shonen-battle/docs/PLAN.mdnew file mode 100644index 0000000..89dc5a4--- /dev/null+++ b/skills/make-an-anime/examples/shonen-battle/docs/PLAN.md@@ -0,0 +1,44 @@+# Plan: EMBER × TEMPEST test scene++## Brief and approval scope++A 12 s, 24 fps, 16:9, 1080p test of the whole pipeline with original characters: 288 frames in one scene run, so the+score is unbroken. Prices are not quoted here: check the fal.ai pages of each model before running.++| Model | First pass | Retake ceiling |+| --- | --- | --- |+| GPT Image 2.5 Sunburst xhigh | 3 sheets + 4 keyframes = 7 images | 4 more |+| MiniMax H3 Max 768P | 4 clips of 5 s = 20 s | 2 clips more |+| ElevenLabs Eleven v4 | 4 lines | 4 more |+| ElevenLabs Music v2.5 | 1 score of 12 s | 1 more |+| Stable Audio SFX | 6 sounds | 3 more |+| Whisper | 4 line checks | 4 more |++## Creative direction++Shounen battle at full volume. Hook: the title slam. Peak: the first clash at 5.6 s, topped by the orbit in the last+shot. Style bible: `config/style.md`. Type: Impact title, Arial Bold subtitles, copied by `fonts:copy`.++## Cast++| Id | Character | Voice | Identity run |+| --- | --- | --- | --- |+| kaen | Adult man, flame fighter: crimson hair, charcoal jacket, white sash | Callum | char-kaen-v1 |+| arashi | Adult woman, storm fighter: silver ponytail, indigo coat | Charlotte | char-arashi-v1 |++Location: `loc-sky-arena-v1`, a broken arena floating at sunset, split sky.++## Scene: shonen-s01++| Frames | Section | Picture | Sound |+| --- | --- | --- | --- |+| [0, 48) | Title | p5 on a colour plate: title slam, split light, embers | Score opens on a hit, slam SFX |+| [48, 168) | Composite | H3 empty arena with orbit + plate roll −9°→9°, two keyed H3 fighters moved by p5 inside the same roll, clash at frame 134, speed lines, bloom, shock rings | Arashi 2.1 s, Kaen 4.75 s, clash SFX |+| [168, 288) | Full H3 | One H3 take, 180° orbit, no layers | Finisher names at 7.2 s and 10.05 s |++Prompts: `prompts/shonen-s01/`. Acceptance: on-model faces, clean key edges, camera does the directed move, no invented+text, frame count 288, every line audible over the score, subtitles readable.++## Delivery++`output/shonen-s01/final_vfx.mp4`, the character sheets and this plan.diff --git a/skills/make-an-anime/examples/shonen-battle/prompts/char-arashi-v1/01_ref_base.txt b/skills/make-an-anime/examples/shonen-battle/prompts/char-arashi-v1/01_ref_base.txtnew file mode 100644index 0000000..f630f1d--- /dev/null+++ b/skills/make-an-anime/examples/shonen-battle/prompts/char-arashi-v1/01_ref_base.txt@@ -0,0 +1,9 @@+Character design sheet for an anime production. This asset belongs to a high-quality anime production with television-broadcast polish: every frame should be worth pausing on.++{{STYLE}}++The character: ARASHI, an adult woman of about 25, tall disciplined martial artist. Long oval face, cool sharp ice-blue eyes, thin straight brows, long straight silver-white hair in a high ponytail with a blue-black streak, resting expression calm and contemptuous. Outfit: fully covering long indigo battle coat (#1c2452) with a high collar and silver trim (#c8d0e0), long sleeves, belted over dark armoured trousers, knee-high steel-grey boots, steel-blue gauntlets. Never any green in her outfit, hair, eyes or effects.++Layout on a plain light-grey background: full-body front turnaround, three-quarter, profile and back in a row on the left two thirds; on the right, a large front-view head close-up and three expressions: cold contempt, fierce battle shout, narrowed focus. Same outfit in every view, neutral standing pose, whole silhouette inside the frame with margins, consistent scale between views.++Exclusions: no text, labels, colour swatches, numbers, logos or watermarks; no extra characters; no photoreal rendering.diff --git a/skills/make-an-anime/examples/shonen-battle/prompts/char-kaen-v1/01_ref_base.txt b/skills/make-an-anime/examples/shonen-battle/prompts/char-kaen-v1/01_ref_base.txtnew file mode 100644index 0000000..9cd2937--- /dev/null+++ b/skills/make-an-anime/examples/shonen-battle/prompts/char-kaen-v1/01_ref_base.txt@@ -0,0 +1,9 @@+Character design sheet for an anime production. This asset belongs to a high-quality anime production with television-broadcast polish: every frame should be worth pausing on.++{{STYLE}}++The character: KAEN, an adult man of about 25, lean athletic martial artist. Sharp angular face, narrow fierce amber eyes, thick angled black brows, small scar across the left eyebrow, wild spiky crimson-red hair swept up and back with orange tips. Outfit: sleeveless charcoal-black fighting jacket (#20222a) with a high collar, open over black bodywrap, long white sash at the waist (#f3efe6), dark baggy trousers, black wrapped boots, crimson fingerless gauntlets (#b3201c) with brass plates. Never any green in his outfit, hair, eyes or effects.++Layout on a plain light-grey background: full-body front turnaround, three-quarter, profile and back in a row on the left two thirds; on the right, a large front-view head close-up and three expressions: furious roar, cocky grin, cold focus. Same outfit in every view, neutral standing pose, whole silhouette inside the frame with margins, consistent scale between views.++Exclusions: no text, labels, colour swatches, numbers, logos or watermarks; no extra characters; no photoreal rendering.diff --git a/skills/make-an-anime/examples/shonen-battle/prompts/loc-sky-arena-v1/01_ref_base.txt b/skills/make-an-anime/examples/shonen-battle/prompts/loc-sky-arena-v1/01_ref_base.txtnew file mode 100644index 0000000..5832fcd--- /dev/null+++ b/skills/make-an-anime/examples/shonen-battle/prompts/loc-sky-arena-v1/01_ref_base.txt@@ -0,0 +1,3 @@+Location painting for an anime production. {{STYLE}}++A broken circular stone arena floating high above a sea of clouds at a burning sunset. Cracked pale flagstones, a ring of snapped pillars, chunks of rock hanging in the air around the rim. Sky split in two: burning orange and magenta sunset on the left, a dark blue-violet thunderstorm with distant lightning on the right. Wide establishing view, no people, no creatures. No text or symbols carved anywhere.diff --git a/skills/make-an-anime/examples/shonen-battle/prompts/shonen-s01-sfx/sfx.yml b/skills/make-an-anime/examples/shonen-battle/prompts/shonen-s01-sfx/sfx.ymlnew file mode 100644index 0000000..9bbdd23--- /dev/null+++ b/skills/make-an-anime/examples/shonen-battle/prompts/shonen-s01-sfx/sfx.yml@@ -0,0 +1,25 @@+# Effects over the finished scene, in scene seconds. Levels are relative to the mix under each cue.+source: output/shonen-s01/final_overlay.mp4+out: output/shonen-s01/final_sfx.mp4+rel_db: -6+peak_db: -3+max_gain_db: 18+voice_dip_db: 5+sounds:+ slam: {prompt: "One enormous deep cinematic impact boom with a metallic ring, isolated, no music, no voices", duration: 3, seed: 11}+ wind: {prompt: "Strong high-altitude wind and distant rolling thunder, steady ambience, no music, no voices", duration: 10, seed: 12}+ whoosh: {prompt: "One very fast sharp anime sword whoosh, isolated, no music, no voices", duration: 1, seed: 13}+ clash: {prompt: "A massive anime punch collision, explosive crack and shockwave with electric sparks, isolated, no music, no voices", duration: 3, seed: 14}+ fire: {prompt: "A huge roaring burst of flame, isolated, no music, no voices", duration: 3, seed: 15}+ bolt: {prompt: "A sharp close lightning strike crack, isolated, no music, no voices", duration: 2, seed: 16}+cues:+ - {at: 0.10, sound: slam, rel_db: 2, len: 1.8, fade: 0.3}+ - {at: 1.80, sound: whoosh, rel_db: -2, len: 0.4, fade: 0.05}+ - {at: 2.00, sound: wind, rel_db: -12, len: 10.0, fade: 0.6}+ - {at: 3.30, sound: bolt, rel_db: -9, len: 1.2, fade: 0.3}+ - {at: 5.05, sound: whoosh, rel_db: -2, len: 0.55, fade: 0.05}+ - {at: 5.60, sound: clash, rel_db: 3, len: 1.3, fade: 0.3}+ - {at: 6.85, sound: whoosh, rel_db: -3, len: 0.4, fade: 0.05}+ - {at: 7.90, sound: fire, rel_db: -3, len: 1.6, fade: 0.4}+ - {at: 9.95, sound: bolt, rel_db: -2, len: 1.3, fade: 0.3}+ - {at: 10.70, sound: clash, rel_db: 1, len: 1.3, fade: 0.35}diff --git a/skills/make-an-anime/examples/shonen-battle/prompts/shonen-s01-vfx/cues.yml b/skills/make-an-anime/examples/shonen-battle/prompts/shonen-s01-vfx/cues.ymlnew file mode 100644index 0000000..2196949--- /dev/null+++ b/skills/make-an-anime/examples/shonen-battle/prompts/shonen-s01-vfx/cues.yml@@ -0,0 +1,11 @@+# Finishing pass on the whole frame, in frames at 24 fps. Hits: title slam (f3), first clash (f134), last crash (f257).+source: output/shonen-s01/final_sfx.mp4+out: output/shonen-s01/final_vfx.mp4+cues:+ - {fx: punch, f: 3, dur: 8, amt: 0.05, radius: 2}+ - {fx: rgb, f: 3, dur: 6, amt: 6}+ - {fx: punch, f: 134, dur: 9, amt: 0.07, radius: 3}+ - {fx: rgb, f: 134, dur: 8, amt: 8}+ - {fx: glow, f: 137, dur: 12, amt: 0.35, radius: 12}+ - {fx: punch, f: 257, dur: 8, amt: 0.05, radius: 2}+ - {fx: grain, f: 0, dur: 288, amt: 0.03}diff --git a/skills/make-an-anime/examples/shonen-battle/prompts/shonen-s01/02_keyframes.yml b/skills/make-an-anime/examples/shonen-battle/prompts/shonen-s01/02_keyframes.ymlnew file mode 100644index 0000000..7411aba--- /dev/null+++ b/skills/make-an-anime/examples/shonen-battle/prompts/shonen-s01/02_keyframes.yml@@ -0,0 +1,21 @@+# First frames. The two green keyframes become sprites; arena-plate is the empty background; clash starts the full-H3 shot.+arena-plate:+ base: false+ refs: [loc-sky-arena-v1]+ prompt: >-+ {{STYLE}} The arena from image 1, seen from low on its stone floor with the floor filling the lower third and a huge sky above: burning sunset on the left, dark thunderstorm on the right, chunks of rock hanging in the air. Dramatic wide 16:9 composition, centre of the frame open and empty. Absolutely no people, no characters, no text.+kaen-green:+ base: false+ refs: [char-kaen-v1]+ prompt: >-+ {{STYLE}} The man from image 1, the same face, hair and outfit: full body in a low forward-leaning fighting stance, seen in three-quarter view facing to the RIGHT of the frame, right fist drawn back, small orange flames licking around his fist, sash and hair blown back, furious expression with his mouth closed. He is alone, centred, whole silhouette inside the frame with a generous margin on every side. Background: one perfectly flat solid chroma green colour #00B140 from edge to edge, no floor, no ground, no shadow, no gradient, no spill on the character. No green on the character. No text.+arashi-green:+ base: false+ refs: [char-arashi-v1]+ prompt: >-+ {{STYLE}} The woman from image 1, the same face, hair and outfit: full body in a tall poised fighting stance, seen in three-quarter view facing to the LEFT of the frame, left arm extended forward with crackling blue-white lightning around her open hand, coat and ponytail blown back, cold contemptuous expression with her mouth closed. She is alone, centred, whole silhouette inside the frame with a generous margin on every side. Background: one perfectly flat solid chroma green colour #00B140 from edge to edge, no floor, no ground, no shadow, no gradient, no spill on the character. No green on the character. No text.+clash:+ base: false+ refs: [char-kaen-v1, char-arashi-v1, loc-sky-arena-v1]+ prompt: >-+ {{STYLE}} Dynamic full-body two-shot, slightly low angle. The man from image 1, on the left of the frame, and the woman from image 2, on the right, the same faces, hair and outfits, both in mid-air over the arena of image 3, colliding at the centre of the frame: his flaming right fist against her lightning-wrapped left hand, a burst of orange fire and blue-white lightning between them, debris flying, hair and clothes whipped outward, both with fierce expressions. Sunset on the left, thunderstorm on the right. No other people. No text.diff --git a/skills/make-an-anime/examples/shonen-battle/prompts/shonen-s01/03_dialogue.yml b/skills/make-an-anime/examples/shonen-battle/prompts/shonen-s01/03_dialogue.ymlnew file mode 100644index 0000000..52a8800--- /dev/null+++ b/skills/make-an-anime/examples/shonen-battle/prompts/shonen-s01/03_dialogue.yml@@ -0,0 +1,17 @@+# Lines in scene seconds. The two composite lines drive each sprite's mouth; the full-H3 lines are shouted over the orbit.+- name: arashi-ends+ character: arashi+ at: 2.1+ text: "[cold, cutting] Your flame ends here, Kaen."+- name: kaen-answers+ character: kaen+ at: 4.75+ text: "[shouting, fierce] Then burn with it!"+- name: kaen-finisher+ character: kaen+ at: 7.2+ text: "[roaring] Crimson Breaker!"+- name: arashi-finisher+ character: arashi+ at: 10.05+ text: "[fierce battle shout] Storm Divide!"diff --git a/skills/make-an-anime/examples/shonen-battle/prompts/shonen-s01/03_score.json b/skills/make-an-anime/examples/shonen-battle/prompts/shonen-s01/03_score.jsonnew file mode 100644index 0000000..64e5e40--- /dev/null+++ b/skills/make-an-anime/examples/shonen-battle/prompts/shonen-s01/03_score.json@@ -0,0 +1,5 @@+{"chunks": [+ {"text": "[Intro]\n[Instrumental]", "duration_ms": 3000, "positive_styles": ["huge orchestral hit", "taiko drums", "shounen anime battle soundtrack", "brass stab"], "negative_styles": ["vocals", "lyrics"]},+ {"text": "[Build]\n[Instrumental]", "duration_ms": 4000, "positive_styles": ["driving rock drums", "distorted electric guitar riff", "rising strings", "taiko", "fast tempo", "tension"], "negative_styles": ["vocals", "lyrics"], "context_adherence": "high"},+ {"text": "[Climax]\n[Instrumental]", "duration_ms": 5000, "positive_styles": ["full orchestra and rock band climax", "soaring brass theme", "crashing cymbals", "continuous full arrangement to the last second", "the final chord rings out"], "negative_styles": ["vocals", "lyrics", "fade out"], "context_adherence": "high"}+]}diff --git a/skills/make-an-anime/examples/shonen-battle/prompts/shonen-s01/04_clips.yml b/skills/make-an-anime/examples/shonen-battle/prompts/shonen-s01/04_clips.ymlnew file mode 100644index 0000000..ae8c699--- /dev/null+++ b/skills/make-an-anime/examples/shonen-battle/prompts/shonen-s01/04_clips.yml@@ -0,0 +1,25 @@+# Green-screen performances: H3 with a locked camera, keyed to transparent PNG sequences. audio: <cast id> pins that+# character's mouth track, audio_at: the scene second the clip starts at, so frame i is scene time audio_at + i/24.+- name: kaen+ image: kaen-green+ seconds: 5+ frames: 120+ audio: kaen+ audio_at: 2.0+ key: green+ low: 8 # the flames light the green, and that glow must key out too+ prompt: >-+ {{STYLE}} The same man as in the image, on-model, alone. 0-2.8 s: he holds his stance with his mouth closed, breathing hard, flames around his fist growing. 2.8-4.4 s: he shouts his line with clear mouth movements while throwing a full-body lunging punch to the right. 4.4-5 s: he holds the punch, straining, hair and sash whipping. His whole body stays inside the frame. The flat green background stays one flat colour, no floor, no shadow, no green on him. No text, no extra people.+ camera:+ move: locked-off, the camera does not move at all+- name: arashi+ image: arashi-green+ seconds: 5+ frames: 120+ audio: arashi+ audio_at: 2.0+ key: green+ prompt: >-+ {{STYLE}} The same woman as in the image, on-model, alone. 0.3-2.7 s: she speaks her line coldly with clear mouth movements, chin raised, lightning crackling around her hand. 2.7-3.3 s: she closes her mouth and narrows her eyes, coiling back. 3.3-5 s: she drives her open hand forward to the left with lightning bursting from it, coat and ponytail whipping. Her hair stays silver-white and her coat stays indigo, with the same flat colours and exposure in every frame; the lightning does not relight or darken her. Her whole body stays inside the frame. The flat green background stays one flat colour, no floor, no shadow, no green on her. No text, no extra people.+ camera:+ move: locked-off, the camera does not move at alldiff --git a/skills/make-an-anime/examples/shonen-battle/prompts/shonen-s01/04_shots.yml b/skills/make-an-anime/examples/shonen-battle/prompts/shonen-s01/04_shots.ymlnew file mode 100644index 0000000..c9d0a8a--- /dev/null+++ b/skills/make-an-anime/examples/shonen-battle/prompts/shonen-s01/04_shots.yml@@ -0,0 +1,30 @@+# 288 frames: title 48, composite 120, full H3 120.+- name: title+ color: "#05060d"+ frames: 48+# The layered section's background: H3 animates the empty arena, and `roll` turns the plate locally. p5 draws the two+# keyed fighters over it inside Anim.withRoll, so they turn with it (05_overlay.js).+- name: composite-plate+ image: arena-plate+ frames: 120+ roll: [-9, 9]+ prompt: >-+ {{STYLE}} The same empty arena as in the image. ONE CONTINUOUS TAKE with no cuts. Clouds race across the sky, chunks of rock drift and slowly tumble, lightning flashes inside the storm on the right, embers and dust blow across the stone floor, the sunset light flickers. No people or characters ever appear. No text, no new objects, no scene change.+ camera:+ move: fast continuous orbit to the right around the centre of the arena+ from: low wide view, floor in the lower third, sunset on the left, storm on the right+ to: the same low wide view rotated about 40 degrees around the arena, pillars passing in the foreground+ timing: moving from the first frame to the last, no hold+ anchors: horizon stays in frame, the arena centre stays near the middle of the frame+# No layers: everything in one H3 take.+- name: full-h3+ image: clash+ frames: 120+ prompt: >-+ {{STYLE}} The same man and woman as in the image, on-model, same faces and outfits. ONE CONTINUOUS TAKE with no cuts and no change of shot. 0-1 s: they break apart from the collision, he roars with his mouth wide open. 1-2.5 s: he drives a huge blast of orange fire forward with his fist. 2.5-3.5 s: she shouts with her mouth open and slashes her hand through the air, a wall of blue-white lightning splitting his fire. 3.5-5 s: fire and lightning crash together in a shockwave, both fighters flying through the sparks. Faces stay on-model, the arena and sky stay the same place. No text, no extra people, no new objects.+ camera:+ move: very fast 180 degree orbit around the two fighters, one unbroken move, the camera circles them+ from: slightly low two-shot, the man on the left and the woman on the right+ to: the opposite side of the two fighters, the woman now on the left and the man on the right, sky rotated behind them+ timing: starts immediately, accelerates through the middle, settles for the last half second+ anchors: both fighters stay in frame the whole time, centred on the point between themdiff --git a/skills/make-an-anime/examples/shonen-battle/prompts/shonen-s01/05_overlay.js b/skills/make-an-anime/examples/shonen-battle/prompts/shonen-s01/05_overlay.jsnew file mode 100644index 0000000..0b6cb3d--- /dev/null+++ b/skills/make-an-anime/examples/shonen-battle/prompts/shonen-s01/05_overlay.js@@ -0,0 +1,74 @@+// EMBER × TEMPEST: the title card, the layered composite and the subtitles. Times are scene seconds.+const HIT = 5.6; // the first clash+const FIRE = [255, 150, 60], STORM = [130, 190, 255];++Anim.sketch({+ async load() {+ this.f = await Anim.fonts({ title: "title.ttf", sub: "sub.ttf", subItalic: "sub-italic.ttf" });+ this.kaen = await Anim.clip("kaen");+ this.arashi = await Anim.clip("arashi");+ this.lines = Anim.data("dialogue");+ this.shots = Anim.data("shots");+ },++ draw(t, frame) {+ const shot = Anim.shotAt(frame, this.shots);+ if (shot.name === "title") this.title(t, frame);+ if (shot.name === "composite-plate") this.composite(t, frame);+ if (shot.name !== "title") Anim.subtitles(t, this.lines, { font: this.f.sub, italic: this.f.subItalic, size: 50 });+ // Smash whites around the cuts.+ Anim.flash(Anim.tween(t, 1.88, 0.12, 0, 1, Anim.ease.inCubic) - Anim.tween(t, 2.0, 0.25, 0, 1));+ Anim.flash(Anim.tween(t, 6.85, 0.15, 0, 1, Anim.ease.inCubic) - Anim.tween(t, 7.0, 0.3, 0, 1));+ },++ title(t, frame) {+ const g = drawingContext;+ // Two lights fight across the card: fire from the left, storm from the right.+ const glow = (x, c, a) => {+ const r = g.createRadialGradient(x, height / 2, 0, x, height / 2, 1000);+ r.addColorStop(0, `rgba(${c},${a})`); r.addColorStop(1, `rgba(${c},0)`);+ g.fillStyle = r; g.fillRect(0, 0, width, height);+ };+ const open = Anim.tween(t, 0.1, 0.3, 0.2, 0.75);+ glow(160, FIRE.join(","), open);+ glow(width - 160, STORM.join(","), open * 0.9);+ Anim.speedLines(frame, width / 2, height * 0.47, { count: 46, inner: 620, alpha: 0.28 * Anim.tween(t, 0.1, 0.2, 0, 1), seed: 5 });+ Anim.embers(t, { count: 50, depth: 1.2, color: FIRE, wind: [120, -160] });+ Anim.embers(t, { count: 30, depth: 0.8, seed: 9, color: STORM, wind: [-120, -80] });+ Anim.titleSlam(t, { title: "EMBER × TEMPEST", tagline: "EPISODE 0 · THE FIRST CLASH", font: this.f.title, tagFont: this.f.sub, size: 190 });+ },++ // Keyed fighters over the animated plate. They circle a shared centre, stay apart, rush in so the fist meets the open+ // hand for the hit and recoil, all inside the same roll as the plate, so sprites and background turn as one camera.+ composite(t, frame) {+ const after = t - HIT;+ const dash = Anim.progress(t, HIT - 0.5, 0.5, Anim.ease.inCubic);+ const reach = t < HIT ? 610 - 40 * Anim.progress(t, 2, HIT - 2.5, Anim.ease.inOutCubic) - 110 * dash+ : 460 + 120 * Anim.ease.outCubic(Anim.clamp01(after / 0.45));+ const angle = Anim.tween(t, 2, 5, -0.22, 0.3, Anim.ease.inOutCubic);+ const cx = width / 2, cy = height * 0.55;+ const shake = t >= HIT ? Anim.shake(t, HIT, { dur: 0.55, amp: 30 }) : { x: 0, y: 0 };+ const depth = Math.sin(angle * 3);+ const place = (who, side) => ({+ who, side, x: cx + side * reach * Math.cos(angle) + shake.x, y: cy + side * reach * Math.sin(angle) * 0.5 + shake.y,+ h: 730 * (1 + side * depth * 0.07),+ });+ const fighters = [place(this.kaen, -1), place(this.arashi, 1)].sort((a, b) => a.h - b.h);++ Anim.withRoll(frame, () => {+ Anim.embers(t, { count: 30, depth: 0.7, seed: 21, color: FIRE, wind: [-200, -60], size: 3 });+ const lines = t < HIT ? dash : 1 - Anim.clamp01(after / 0.9);+ if (lines > 0) Anim.speedLines(frame, cx, cy, { count: 80, inner: 420, alpha: 0.6 * lines });+ for (const f of fighters) {+ const [r, gr, b] = f.side < 0 ? FIRE : STORM;+ Anim.aura(`rgba(${r},${gr},${b},0.8)`, 26, () => f.who.draw(f.who.at(t), f.x, f.y, f.h));+ }+ Anim.impactBloom(cx, cy, after / 0.75, { radius: 900 });+ Anim.shockRing(cx, cy, after / 0.9, { radius: 1250, weight: 30 });+ Anim.shockRing(cx, cy, (after - 0.08) / 1.1, { radius: 1500, color: STORM, weight: 18 });+ Anim.embers(t, { count: 16, depth: 1.8, seed: 33, color: [255, 220, 170], wind: [-260, -100], size: 2.2 });+ }, this.shots);+ if (after >= 0 && after < 0.1) Anim.flash(0.85);+ Anim.vignette(0.45);+ },+});diff --git a/skills/make-an-anime/examples/shonen-battle/story.md b/skills/make-an-anime/examples/shonen-battle/story.mdnew file mode 100644index 0000000..9f41e34--- /dev/null+++ b/skills/make-an-anime/examples/shonen-battle/story.md@@ -0,0 +1,14 @@+# EMBER × TEMPEST — test scene++A 12-second shounen battle, original characters, written to exercise every layer of the make-an-anime pipeline.++Kaen, a flame fighter, and Arashi, a storm fighter, meet on a broken arena floating above a burning sunset. They have+fought before and neither will back down. She tells him it ends here, he answers, they rush each other and the shock+of the first clash splits the sky. In the last five seconds the camera whips around them as they trade finishing moves.++- 0–2 s: title card "EMBER × TEMPEST".+- 2–7 s: LAYERED COMPOSITE. Each fighter is animated alone on green screen with H3, keyed, and moved by p5 over an+ animated H3 background plate. The camera rolls and circles.+- 7–12 s: FULL H3. One continuous MiniMax H3 shot with no layers, both fighters in frame, big orbit.++Subtitles are drawn in p5. Language: English.diff --git a/skills/make-an-anime/scripts/spec/example_spec.rb b/skills/make-an-anime/scripts/spec/example_spec.rbnew file mode 100644index 0000000..b98936f--- /dev/null+++ b/skills/make-an-anime/scripts/spec/example_spec.rb@@ -0,0 +1,83 @@+require_relative "spec_helper"++RSpec.describe "Bundled shonen-battle example" do+ EXAMPLE = File.join(SKILL, "examples", "shonen-battle")+ FONTS = JSON.parse(File.read(File.join(EXAMPLE, "config", "fonts.json")))++ def init_example(dir)+ out, err, status = cli("init", "--project", dir, "--example", "shonen-battle")+ raise "#{out}\n#{err}" unless status.success?+ JSON.parse(out)+ end++ it "is an initialised, valid 12 s project with the three directed sections", :core do+ Dir.mktmpdir do |tmp|+ project = File.join(tmp, "p")+ expect(init_example(project)).to include("example" => "shonen-battle")+ expect(File.file?(File.join(project, "config", "cast.yml"))).to be(true)+ expect(File.read(File.join(project, "docs", "BRIEF.md"))).to include("EMBER")++ shots = YAML.safe_load_file(File.join(project, "prompts", "shonen-s01", "04_shots.yml"))+ expect(shots.map { [_1["name"], _1["frames"]] }).to eq([["title", 48], ["composite-plate", 120], ["full-h3", 120]])+ expect(shots[1]["roll"]).to eq([-9, 9])+ expect(shots[2]).to include("image" => "clash")++ clips = YAML.safe_load_file(File.join(project, "prompts", "shonen-s01", "04_clips.yml"))+ expect(clips.map { _1["key"] }).to all(eq("green"))+ expect(clips.map { _1["audio_at"] }).to all(eq(2.0))+ cast = YAML.safe_load_file(File.join(project, "config", "cast.yml"))+ expect(clips.map { _1["audio"] }).to match_array(cast.keys)+ end+ end++ it "refuses an unknown example and a missing story", :core do+ Dir.mktmpdir do |tmp|+ _, err, status = cli("init", "--project", File.join(tmp, "p"), "--example", "nope")+ expect(status.success?).to be(false)+ expect(err).to include("No example nope")+ _, _, status = cli("init", "--project", File.join(tmp, "q"), "--example", "../secrets")+ expect(status.success?).to be(false)+ end+ end++ it "computes an overscan that hides the corners of a rolled frame", :core do+ expect(Media::FFmpeg.roll_overscan(0, 1920, 1080)).to eq(1.0)+ expect(Media::FFmpeg.roll_overscan(-9, 1920, 1080)).to be_within(0.001).of(Math.cos(9 * Math::PI / 180) + (16.0 / 9) * Math.sin(9 * Math::PI / 180))+ end++ it "rolls a plate at the requested angle, with no black corners", :media do+ src = file("plate.mp4")+ ff.run("ffmpeg", "-y", "-v", "error", "-f", "lavfi", "-i", "color=#c04020:s=640x360:r=24:d=2", "-f", "lavfi", "-i", "anullsrc=r=44100:cl=stereo", "-t", "2", "-c:v", "libx264", "-pix_fmt", "yuv420p", "-c:a", "aac", src)+ out = ff.concat_shots([{ path: src, frames: 48, roll: [-9, 9] }], file("rolled.mp4"), fps: 24, w: 640, h: 360)+ expect(ff.summary(out)[:duration]).to be_within(0.05).of(2.0)+ [0, 24, 47].each do |n|+ frame = ff.frame_index(out, n, file("f#{n}.png"))+ corners = [[0, 0], [639, 0], [0, 359], [639, 359]].map { |x, y| magick.run("magick", frame, "-format", "%[fx:p{#{x},#{y}}.r]", "info:", quiet: true).to_f }+ expect(corners).to all(be > 0.5)+ end+ end++ it "generates the whole scene from its real prompts with synthetic media", :media do+ missing = FONTS.values.reject { File.file?(_1) }+ skip "system fonts missing: #{missing.join(", ")}" if missing.any?+ Dir.mktmpdir do |tmp|+ project = File.join(tmp, "p")+ init_example(project)+ FileUtils.ln_s(File.join(RT, "node_modules"), File.join(project, "node_modules"))+ env = { "MV_PYTHON" => ENV.fetch("MV_PYTHON", File.join(RT, ".venv", "bin", "python3")) }+ _, err, status = Open3.capture3(env, RbConfig.ruby, "mv.rb", "fonts:copy[config/fonts.json]", chdir: project)+ expect(status.success?).to be(true), err+ out, err, status = Open3.capture3(env, RbConfig.ruby, "spec/support/example_driver.rb", chdir: project)+ expect(status.success?).to be(true), "#{out}\n#{err}"+ summary = JSON.parse(out.lines.last)+ expect(summary["calls"].keys.grep(/image-to-video/).sum { summary["calls"][_1] }).to eq(4) # 2 sprites, plate, full H3++ final = File.join(project, "output", "shonen-s01", "final_overlay.mp4")+ info = ff.summary(final)+ expect(info[:duration]).to be_within(0.06).of(12.0)+ expect(Dir[File.join(project, "output", "shonen-s01", "04_clips", "kaen", "*.png")].size).to eq(120)+ shots = JSON.parse(File.read(File.join(project, "output", "shonen-s01", "05_overlay", "shots.json")))+ expect(shots.find { _1["name"] == "composite-plate" }["roll"]).to eq([-9, 9])+ end+ end+enddiff --git a/skills/make-an-anime/scripts/spec/support/example_driver.rb b/skills/make-an-anime/scripts/spec/support/example_driver.rbnew file mode 100644index 0000000..62bf232--- /dev/null+++ b/skills/make-an-anime/scripts/spec/support/example_driver.rb@@ -0,0 +1,27 @@+# Runs a bundled example from inside its initialised project with synthetic Fal media: the real prompts, config, steps and+# sketch, with no network. Usage: ruby spec/support/example_driver.rb (from the project root).+require "json"+require "fileutils"+require File.expand_path("lib/fal_mv_gen", Dir.pwd)+require File.expand_path("lib/toolkit/operations", Dir.pwd)+require_relative "synthetic_anime_fal"++fix = FileUtils.mkdir_p("tmp/fixtures").first+run = ->(*cmd) { system(*cmd, exception: true) }+image = "#{fix}/image.png"+run.("magick", "-size", "1920x1080", "xc:#00B140", "-fill", "#e02040", "-draw", "rectangle 760,200 1160,960", image)+voice = "#{fix}/voice.wav"+run.("ffmpeg", "-y", "-v", "error", "-f", "lavfi", "-i", "sine=frequency=300:duration=1.2", voice)+music = "#{fix}/music.wav"+run.("ffmpeg", "-y", "-v", "error", "-f", "lavfi", "-i", "sine=frequency=90:duration=12", music)+movie = "#{fix}/h3.mp4"+run.("ffmpeg", "-y", "-v", "error", "-f", "lavfi", "-i", "color=#00B140:s=1366x768:r=24:d=5", "-f", "lavfi", "-i", "anullsrc=r=44100:cl=stereo",+ "-vf", "drawbox=x=500+40*t:y=100:w=300:h=560:color=#e02040:t=fill", "-t", "5", "-c:v", "libx264", "-pix_fmt", "yuv420p", "-c:a", "aac", movie)++client = SyntheticAnimeFal.new(image: image, video: movie, voice: voice, music: music)+Workflow::Approval.new.record!("Synthetic example run; mocked network only")+Pipeline::GENERATIONS.each do |name, generation|+ project = Pipeline::Project.new(name)+ generation.fetch(:steps).each { |step| step.new(project: project, client: client).run! }+end+puts JSON.generate(calls: client.calls.map(&:first).tally, uploads: client.uploads.size)