Skip to content

Turn one topic into a finished Vox-style paper-collage explainer/ad video — automated end to end on Atlas Cloud + ffmpeg. An agent skill.

Initial release: Vox Director — topic-to-Vox-collage-video Claude skill

Alisa080801642cb4066f
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..3cfd56e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,27 @@
+# generated video projects (data output, not source) — can be hundreds of MB
+out/
+
+# python
+__pycache__/
+*.py[cod]
+.venv/
+venv/
+*.egg-info/
+
+# macOS
+.DS_Store
+
+# secrets — never commit
+.env
+credentials.json
+token.json
+*.key
+
+# internal working notes (Chinese-only; kept local, not published)
+PROGRESS.md
+
+# references/: publish only the English .md docs; keep local reference
+# material (videos, images, non-English notes) out of the repo
+references/*
+!references/*.md
+references/PIPELINE_PLAYBOOK.md
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..1ac5028
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2026 Atlas Cloud
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..552eeb7
--- /dev/null
+++ b/README.md
@@ -0,0 +1,125 @@
+# 🎬 Vox Director
+
+**Turn one topic into a finished Vox-style paper-collage explainer / ad video — script, collage keyframes, motion, voice-over, music and captions, all automated.**
+
+A [Claude](https://claude.com/claude-code) skill that runs end to end on the [Atlas Cloud](https://www.atlascloud.ai) API + local `ffmpeg`. You give it a one-line topic; it gives you an `mp4`.
+
+![License: MIT](https://img.shields.io/badge/License-MIT-black.svg) ![Powered by Atlas Cloud](https://img.shields.io/badge/powered%20by-Atlas%20Cloud-ff5a1f.svg) ![Claude Skill](https://img.shields.io/badge/Claude-Skill-d97757.svg)
+
+<p align="center">
+ <a href="https://github.com/Alisa0808/vox-director/blob/main/assets/showcase-tang.mp4">
+ <img src="assets/showcase-tang.gif" width="680" alt="Vox Director showcase — a Vox-style collage film on the evolution of Chinese civilization">
+ </a>
+</p>
+<p align="center">
+ <em>▶ <a href="https://github.com/Alisa0808/vox-director/blob/main/assets/showcase-tang.mp4">Watch the full 30s film (with sound)</a> — "The evolution of Chinese civilization", one topic in, this out.</em>
+</p>
+
+> 🇨🇳 中文说明见 **[README.zh.md](README.zh.md)**.
+
+---
+
+## What it is
+
+The look is the modern editorial **paper-collage** popularized by Vox explainers and creators like Stav Zilber and rom1trs: hand-cut paper cut-outs, torn edges, tape, halftone dots, newspaper clippings, bold flat color per beat, big cut-out headlines — brought to life with motion, a narrator, music and captions.
+
+Vox Director fuses three workflows into one repeatable pipeline:
+
+| Source | Contribution |
+|---|---|
+| **Stav Zilber** (original) | interview-style product ads · Omni Flash paper/collage motion engine · end-frame link · reference-image consistency · narration discipline |
+| **rom1trs / Remotion** | code-rendered Vox visuals (text & data stay razor-sharp) |
+| **Higgsfield Explainer** | auto-research a topic · any-language narration · long-form explainers |
+
+## How it works
+
+One topic flows through one script per stage, all driven by a single `beats.json` per project:
+
+```
+topic
+ │
+ ├─ 1. beat map pick a narrative arc → write beats.json ◀── GATE 1: you approve the beat map
+ ├─ 2. style bake-off render the same beat in 3–4 themes ◀── GATE 2: you pick the look by eye
+ ├─ 3. keyframes one collage poster per beat (nano-banana-2)
+ ├─ 4. motion animate each poster (gemini-omni-flash i2v)
+ ├─ 5. voice + music one narrator (xai/tts) + BGM (minimax/music)
+ ├─ 6. assemble ffmpeg: concat, duck music under VO, burn captions + watermark
+ └─ final.mp4
+```
+
+Two ideas make or break the result, and the skill is built around both:
+
+1. **The look is born in the image step.** Each beat is a finished collage *poster*. All the collage DNA (torn paper, cut-outs, halftone, headline text) lives in that image — if the poster isn't a rich collage, nothing downstream saves it.
+2. **The motion is added after.** By default an AI video model animates the whole poster (the "living poster" path). For dramatic *piece-by-piece* assembly, an optional local keyframe engine cuts the poster into parts and drives them frame-by-frame (no content filters, pixel-exact — great for real people).
+
+Two human decision gates keep you in control (approve the beat map; pick the style); everything else is automated.
+
+## Models (verified on Atlas Cloud)
+
+| Job | Model |
+|---|---|
+| Keyframe / collage poster | `google/nano-banana-2/text-to-image` |
+| Animate (non-real content) | `google/gemini-omni-flash/image-to-video` |
+| Animate (**real people / brands**) | `kwaivgi/kling-video-o3-pro/image-to-video` |
+| Narration | `xai/tts-v1` |
+| Music | `minimax/music-2.6` |
+| Cut out an element (advanced path) | `youchuan/v8.1/remove-background` |
+
+Model IDs drift — the skill fetches the live list from `GET https://api.atlascloud.ai/api/v1/models` before running.
+
+## Install
+
+This is a Claude skill (works in Claude Code and Claude apps that support skills).
+
+**Option A — from this repo:**
+```bash
+git clone https://github.com/Alisa0808/vox-director.git ~/.claude/skills/vox-director
+```
+
+**Option B — from the packaged skill:** download [`vox-director.skill`](vox-director.skill) and install it via your Claude skills UI.
+
+Then set your Atlas Cloud API key (get one at <https://www.atlascloud.ai/console/api-keys>):
+```bash
+export ATLASCLOUD_API_KEY="sk-..."
+```
+
+## Quick start
+
+Just ask Claude, with the skill installed:
+
+> *"Make me a Vox-style collage video about the history of money — English, 9:16, 60 seconds."*
+
+Claude will draft a beat map for your approval, run a style bake-off for you to pick from, then generate keyframes → motion → voice → music and assemble `out/<project>/final.mp4`.
+
+## Requirements
+
+- **Claude** with skills (e.g. Claude Code)
+- **Atlas Cloud** API key
+- **ffmpeg** + **ffprobe** (`brew install ffmpeg`)
+- **Python 3** with **Pillow** (`pip install pillow`) — for caption/watermark overlays
+
+## What's in the box
+
+```
+SKILL.md the skill (English) — the workflow Claude follows
+SKILL.zh.md the same skill in Chinese
+references/ the creative engine
+ prompt-guide.md image + video prompt structures
+ vocab-bank.md 8 image dims + 9 video axes + 8 theme presets
+ beat-layer.md 14 narrative arcs + hook/pacing + shot patterns
+ models-and-gotchas.md every API / ffmpeg gotcha, already solved
+ local-engine.md the advanced element-level motion engine
+scripts/ one script per pipeline stage
+examples/ ready-to-run beats.json examples
+assets/ the showcase film
+```
+
+## Credits
+
+Inspired by the collage-ad workflows of **[Stav Zilber](https://x.com/StavZilber)**, **[rom1trs](https://x.com/rom1trs)** and **[Higgsfield](https://x.com/higgsfield_ai)**, and by **[Vox](https://www.vox.com)**'s explainer visual language.
+
+Built end to end on **[Atlas Cloud](https://www.atlascloud.ai)** — one prompt, one film.
+
+## License
+
+[MIT](LICENSE) © 2026 Atlas Cloud
diff --git a/README.zh.md b/README.zh.md
new file mode 100644
index 0000000..bb466d3
--- /dev/null
+++ b/README.zh.md
@@ -0,0 +1,125 @@
+# 🎬 Vox Director(拼贴动效导演)
+
+**一个选题进,一条成片出——脚本、拼贴关键帧、动效、旁白、配乐、字幕,全流程自动化的 Vox 风格拼贴讲解/广告视频。**
+
+一个 [Claude](https://claude.com/claude-code) 技能(skill),后端全跑 [Atlas Cloud](https://www.atlascloud.ai) API,本地用 `ffmpeg` 合成。你给一句话选题,它给你一个 `mp4`。
+
+![License: MIT](https://img.shields.io/badge/License-MIT-black.svg) ![Powered by Atlas Cloud](https://img.shields.io/badge/powered%20by-Atlas%20Cloud-ff5a1f.svg) ![Claude Skill](https://img.shields.io/badge/Claude-Skill-d97757.svg)
+
+<p align="center">
+ <a href="https://github.com/Alisa0808/vox-director/blob/main/assets/showcase-tang.mp4">
+ <img src="assets/showcase-tang.gif" width="680" alt="Vox Director 样片——中华文明变迁拼贴短片">
+ </a>
+</p>
+<p align="center">
+ <em>▶ <a href="https://github.com/Alisa0808/vox-director/blob/main/assets/showcase-tang.mp4">观看完整 30 秒成片(带声音)</a>——主题《中华文明的变迁》,一句选题进,这条片子出。</em>
+</p>
+
+> 🇬🇧 English docs: **[README.md](README.md)**.
+
+---
+
+## 这是什么
+
+风格是 Vox 讲解片和 Stav Zilber、rom1trs 等创作者带火的现代编辑感**纸质拼贴**:手撕纸片、毛边、胶带、半调网点、报纸剪贴、每一拍一块大胆平涂色、大号剪纸标题——再配上动效、旁白、配乐和字幕,让整张海报活过来。
+
+Vox Director 把三套工作流融进一条可复用的管线:
+
+| 来源 | 贡献 |
+|---|---|
+| **Stav Zilber**(原始) | 访谈式产品广告 · Omni Flash 纸片/拼贴动效引擎 · 尾帧链接 · 参考图一致性 · 旁白纪律 |
+| **rom1trs / Remotion** | 代码渲染 Vox 视效(文字、数据绝对清晰) |
+| **Higgsfield Explainer** | 自动调研选题 · 任意语言旁白 · 长片讲解 |
+
+## 工作原理
+
+一个选题依次流过每个阶段一个脚本,全程由每个项目一份 `beats.json` 驱动:
+
+```
+选题
+ │
+ ├─ 1. 分镜脚本 选叙事弧线 → 写 beats.json ◀── 决策点 1:你确认分镜脚本
+ ├─ 2. 风格试片 同一拍渲成 3–4 种主题 ◀── 决策点 2:你看图挑风格
+ ├─ 3. 关键帧 每拍一张拼贴海报 (nano-banana-2)
+ ├─ 4. 动效 让每张海报动起来 (gemini-omni-flash 图生视频)
+ ├─ 5. 旁白+配乐 统一旁白 (xai/tts) + 背景乐 (minimax/music)
+ ├─ 6. 合成 ffmpeg:拼接、配乐在旁白下自动闪避、烧字幕+水印
+ └─ final.mp4
+```
+
+两个关键理念决定成败,技能就是围绕它们搭的:
+
+1. **风格诞生在生图这一步。** 每一拍是一张成品拼贴*海报*,所有拼贴基因(撕纸、剪纸、网点、标题文字)都长在这张图里——图不够拼贴,后面再怎么救也救不回来。
+2. **动效是后加的。** 默认由 AI 视频模型把整张海报动起来(「活海报」路径);要那种戏剧化的**零件逐个飞入拼合**,可选的本地关键帧引擎会把海报拆成零件逐帧驱动(无内容审核、像素级精确,尤其适合真人)。
+
+两个人工决策点让你始终掌控(确认分镜脚本、挑风格),其余全自动。
+
+## 模型(已在 Atlas Cloud 上验证)
+
+| 用途 | 模型 |
+|---|---|
+| 关键帧 / 拼贴海报 | `google/nano-banana-2/text-to-image` |
+| 动效(非真人内容) | `google/gemini-omni-flash/image-to-video` |
+| 动效(**真人 / 品牌**) | `kwaivgi/kling-video-o3-pro/image-to-video` |
+| 旁白 | `xai/tts-v1` |
+| 配乐 | `minimax/music-2.6` |
+| 抠素材(高级路径) | `youchuan/v8.1/remove-background` |
+
+模型 ID 会变——技能运行前会先从 `GET https://api.atlascloud.ai/api/v1/models` 拉取最新列表。
+
+## 安装
+
+这是一个 Claude 技能(在 Claude Code 及支持 skill 的 Claude 应用里可用)。
+
+**方式 A —— 从本仓库:**
+```bash
+git clone https://github.com/Alisa0808/vox-director.git ~/.claude/skills/vox-director
+```
+
+**方式 B —— 用打包好的技能文件:** 下载 [`vox-director.skill`](vox-director.skill),在你的 Claude 技能界面里安装。
+
+然后设置 Atlas Cloud API key(在 <https://www.atlascloud.ai/console/api-keys> 获取):
+```bash
+export ATLASCLOUD_API_KEY="sk-..."
+```
+
+## 快速开始
+
+装好技能后,直接跟 Claude 说:
+
+> *「做一条 Vox 风格的拼贴视频,讲货币简史——全英文,9:16,60 秒。」*
+
+Claude 会先起草分镜脚本给你确认,再跑一轮风格试片让你挑,然后生成关键帧 → 动效 → 旁白 → 配乐,合成 `out/<项目>/final.mp4`。
+
+## 环境要求
+
+- **Claude** 且支持 skill(如 Claude Code)
+- **Atlas Cloud** API key
+- **ffmpeg** + **ffprobe**(`brew install ffmpeg`)
+- **Python 3** + **Pillow**(`pip install pillow`)——用于字幕/水印叠加
+
+## 目录结构
+
+```
+SKILL.md 技能本体(英文)——Claude 遵循的工作流
+SKILL.zh.md 同一技能的中文版
+references/ 创意引擎
+ prompt-guide.md 生图 + 生视频的提示词结构
+ vocab-bank.md 8 个生图维度 + 9 个生视频轴 + 8 套主题预设
+ beat-layer.md 14 种叙事弧线 + 钩子/节奏 + 镜头模式
+ models-and-gotchas.md 每一个 API / ffmpeg 坑,都已填平
+ local-engine.md 高级的元素级动效引擎
+scripts/ 每个管线阶段一个脚本
+examples/ 可直接跑的 beats.json 示例
+assets/ 样片
+```
+
+## 致谢
+
+灵感来自 **[Stav Zilber](https://x.com/StavZilber)**、**[rom1trs](https://x.com/rom1trs)**、**[Higgsfield](https://x.com/higgsfield_ai)** 的拼贴广告工作流,以及 **[Vox](https://www.vox.com)** 的讲解片视觉语言。
+
+全流程基于 **[Atlas Cloud](https://www.atlascloud.ai)** 构建——一个提示词,一条成片。
+
+## 许可
+
+[MIT](LICENSE) © 2026 Atlas Cloud
diff --git a/SKILL.md b/SKILL.md
new file mode 100644
index 0000000..15af189
--- /dev/null
+++ b/SKILL.md
@@ -0,0 +1,203 @@
+---
+name: vox-director
+description: >
+ Turn ONE topic into a finished Vox-style paper-collage explainer / ad video, end to end
+ on the Atlas Cloud API + local ffmpeg — script, collage keyframes, motion, voice-over,
+ music, captions, all automated. Use this whenever the user wants a "Vox style" video,
+ a paper/torn-paper collage animation, a "motion collage", a narrated explainer or short
+ ad built from AI-generated collage posters, a scrapbook-style tribute, or wants to turn
+ a topic / product / person into a punchy narrated collage video — even if they don't say
+ the word "Vox". Also use when reproducing Stav Zilber / rom1trs / Higgsfield-style collage
+ ad workflows, or when the user asks for a motion collage or a scrapbook-style tribute.
+ Triggers: "vox video", "collage video", "motion collage", "paper collage
+ explainer", "make a collage ad", "turn this topic into a collage video".
+---
+
+# Vox Director
+
+Turn a one-line topic into a finished **Vox-style paper-collage video**: a bold, punchy,
+narrated explainer/ad where each beat is a torn-paper collage poster that comes alive, with
+voice-over, music and captions. Runs on **one Atlas Cloud API key** + local **ffmpeg**.
+
+The look is the modern editorial paper-collage popularized by Vox explainers and creators
+like Stav Zilber / rom1trs: hand-cut paper cut-outs, torn edges, tape, halftone dots,
+newspaper clippings, bold flat color per beat, big cut-out headlines.
+
+## The core idea (read this first)
+
+The Vox collage look and the collage motion are **two different steps**:
+
+1. **The look is born in the IMAGE step.** Each beat is a finished collage *poster* made by a
+ text-to-image model. All the collage DNA (torn paper, cut-outs, halftone, bold color,
+ headline text) lives in that image. If the image isn't a rich collage, nothing downstream
+ will save it.
+2. **The motion is added after.** By default an AI video model animates the whole poster (the
+ "living poster" path — simple, automated). For dramatic *piece-by-piece* assembly you cut
+ the poster into parts and drive them with the local keyframe engine (advanced path).
+
+Everything hinges on the prompts. **Before writing any image or video prompt, read
+`references/prompt-guide.md`** — it has the exact prompt structures that make the difference
+between "a real Vox collage" and "a moving PowerPoint".
+
+## Prerequisites (check, don't skip)
+
+- `echo "${ATLASCLOUD_API_KEY:+set}"` — if empty, tell the user to set it (get one at
+ https://www.atlascloud.ai/console/api-keys) and stop.
+- `command -v ffmpeg ffprobe` — required for assembly (`brew install ffmpeg` on macOS).
+- `python3 -c "import PIL"` — Pillow, for captions/watermark overlays.
+
+## Standard workflow (topic → film)
+
+This is the default, most-automated path. Every stage is one script, all driven by a single
+`beats.json` per project under `out/<project>/`.
+
+1. **Topic → beat map.** First **read `references/beat-layer.md`** (the story layer) and pick a
+ narrative `arc` that fits the topic (`timeline` for history, `pas`/`bab` for ads,
+ `how_it_works` for explainers, `man_in_hole` for transformations, …). Then write
+ `out/<project>/beats.json` following that arc: **beat-1 headline must be a ≤3s hook**; beat
+ count per duration (30s→6–8, 60s→10–12); split each beat into **2 shots** (wide+detail) with
+ **per-shot `camera_move` VARIED across adjacent beats** (never repeat; `static` on the payoff)
+ and **rich `element_motion`** (see step 4). Each beat: `narration`, `title_cn`/`title_en`,
+ `scene`, `bg`, `feel`, `hook`. This draft is the **one mandatory approval gate** — show the
+ user the beat map before generating. Examples in `examples/`.
+
+2. **Pick the visual style (hybrid — do this BEFORE keyframes).** Do not reuse one house style
+ for every topic. Read `references/vocab-bank.md`; pick 3–4 **theme presets**
+ (`styles.THEME_PRESETS`: `american-retro`, `swiss-modern`, `punk-zine`,
+ `soviet-constructivist`, `wpa-propaganda`, `70s-groovy`, `chinese-ink`, `atomic-age`) that fit
+ the topic's era/culture/tone — **or compose a custom theme** by mixing vocab-bank dimensions
+ (medium/era/palette/type/finish) when none fit. Match the topic, **not** the language (an
+ English film on Chinese history should look Chinese). A theme bundles the whole LOOK layer
+ (idiom+palette+type+finish+mood+motion). Run a bake-off and let the user pick by eye — AI
+ proposes, the library is the quality floor, the human decides. Set the pick as `"theme"`:
+ `python3 scripts/style_bakeoff.py out/<project> american-retro,swiss-modern,punk-zine,atomic-age`
+ Set the chosen name as `"collage_style"` in beats.json (keyframes.py reads it).
+
+3. **Keyframes (the collage look).** `python3 scripts/keyframes.py out/<project>`
+ Generates one collage poster per beat/shot with **google/nano-banana-2/text-to-image**,
+ headline text baked in. Compose prompts with the 5-part structure in
+ `references/prompt-guide.md`. Verify each poster looks like a *real layered collage*
+ before animating — re-roll cheap ($0.08) here rather than paying to animate a weak image.
+
+4. **Motion.** `python3 scripts/clips.py out/<project>`
+ Animates each poster with **google/gemini-omni-flash/image-to-video**. Two independent axes
+ (see `references/beat-layer.md` §3, tested on our stack):
+ • **`camera_move`** — ONE move per shot. Safe/default: `{static, push_in, pull_out, pan, tilt,
+ parallax}`. **Bold/experimental** `{orbit, dolly_zoom, roll, whip}` are **available, not
+ banned** — they can warp the flat art, so pair with `constraints: loose` and **re-roll**.
+ Any custom phrase also passes through.
+ • **`element_motion`** — where the energy lives; **AI writes it per beat to fit that scene** (not a
+ template). Make it RICH (several elements moving) — be bold. A **hero element flying across
+ the frame** (paper bird/plane/coins) is a great **occasional** punch on a key beat, **not
+ every shot** (a flyer in every frame reads as a formula).
+ `motion_style` = amplitude `calm | punchy | max` (the theme sets a default). **`constraints`**
+ = `strict` (default: defect guards on — flat-2D, one-way, no-morph; best for clean text-heavy
+ explainers) or `loose` (let the model explore 3D/bold moves; re-roll the misses). **Headline
+ text is hard-protected only on shots that have a title** (detail shots without a headline are
+ free to go wild). For **real people / brand logos**, Omni & Seedance refuse — set
+ `"video_model": "kwaivgi/kling-video-o3-pro/image-to-video"`.
+
+5. **Voice + music.** `python3 scripts/audio.py out/<project>`
+ One consistent narrator via **xai/tts-v1** (multilingual, `voice_id`) + instrumental BGM
+ via **minimax/music-2.6**. (Do NOT use seed-audio for plain narration unless you pin a
+ speaker — see gotchas.)
+
+6. **Assemble.** `python3 scripts/assemble.py out/<project>`
+ ffmpeg: normalize + concat all shots, lay the single narration ducked under the music,
+ burn captions timed per beat, add the watermark. Output `out/<project>/final.mp4`.
+
+7. **Verify.** You can't read an mp4 directly — extract frames to jpg and look:
+ `ffmpeg -ss <t> -i final.mp4 -vf "scale=640:-1,format=yuvj420p" -frames:v 1 f.jpg`
+
+### Cadence — how long shots should be
+
+A common mistake is one long shot per beat. On a 9:16 / social piece especially, a static
+10s shot reads as dead air. Aim for a **cut every ~4–6 seconds**:
+
+- **Shots run 3–6s; never let a single shot exceed ~7s** — beyond that the AI motion has
+ nowhere to go and it feels static.
+- **A beat's narration is ~8–10s, so give each beat 2 shots** (a *wide* establishing shot with
+ the headline + a *detail* cut-in without it). The narration plays continuously across both;
+ the visual cuts mid-sentence. This is the single biggest rhythm win.
+- So a ~60s film is typically **~6 beats × 2 shots × ~5s = 12 shots**, not 6 × 10s.
+- Reuse the wide keyframe as shot `a`; generate a tighter detail scene for shot `b`.
+ `keyframes.py` skips any shot that already has a `keyframe_url`, so adding `b` shots and
+ re-running only generates the new ones.
+
+Add a `shots` array to each beat (see schema). Give each shot its own short `scene` and
+`motion`; set `"title": true` only on the wide shot so the headline shows once per beat.
+
+## beats.json schema
+
+```json
+{
+ "project": "my-film", "topic": "...", "language": "en",
+ "aspect": "9:16", // 16:9 | 9:16 | 1:1 | 3:4
+ "style": "collage",
+ "theme": "american-retro", // THEME_PRESET (styles.THEME_PRESETS) — the LOOK layer
+ "arc": "timeline", // narrative arc (beat-layer.md) — the STORY skeleton
+ "video_model": "google/gemini-omni-flash/image-to-video", // Kling for real people
+ "motion_style": "punchy", // amplitude: calm | punchy | max (theme sets a default)
+ "constraints": "strict", // strict = defect guards on | loose = let AI explore + re-roll
+ "voice": {"voice_id": "leo", "language": "en", "speed": 1.0},
+ "music": "epic cinematic orchestral, instrumental, no vocals",
+ "watermark": "Made with Atlas Cloud",
+ "beats": [
+ {
+ "id": 1, "title_cn": "", "title_en": "BEFORE MONEY",
+ "bg": "earthy clay tan", "feel": "ancient, humble", "hook": "surprising_stat",
+ "narration": "For most of history, there was no money...",
+ "shots": [
+ // shot_size: EST_WIDE|WIDE|MEDIUM|CLOSE|DETAIL ; camera_move: static|push_in|
+ // pull_out|pan|tilt|parallax (flat-safe only) — VARY per adjacent beat, static for payoff
+ {"id": "a", "dur": 5, "title": true, "shot_size": "WIDE", "camera_move": "push_in",
+ "scene": "...wide establishing collage...",
+ "element_motion": "traders gesture, goat bobs, a paper bird flaps across the frame, coins scatter"},
+ {"id": "b", "dur": 5, "title": false, "shot_size": "CLOSE", "camera_move": "parallax",
+ "scene": "...close cut-in detail...",
+ "element_motion": "the exchanged goods slide together, halftone pulses"}
+ ]
+ }
+ ]
+}
+```
+`theme`+`arc` set the two big layers; `element_motion` per shot is the energy (make it rich — see
+below). `motion`/`collage_style`/`era` are still read for back-compat.
+
+## Model selection (always verify IDs live)
+
+Model IDs change — fetch the live list first: `GET https://api.atlascloud.ai/api/v1/models`
+(no auth; keep only `display_console: true`). Defaults that work today:
+
+| Job | Model | Note |
+|---|---|---|
+| Keyframe / collage poster | `google/nano-banana-2/text-to-image` | renders CN+EN text well |
+| Cut out an element | `youchuan/v8.1/remove-background` | advanced path only |
+| Animate (non-real content) | `google/gemini-omni-flash/image-to-video` | keeps text stable, layered motion |
+| Animate (**real people / brands**) | `kwaivgi/kling-video-o3-pro/image-to-video` | Omni & Seedance BLOCK celebrities |
+| Narration | `xai/tts-v1` | clean, multilingual, `voice_id` |
+| Music | `minimax/music-2.6` | `is_instrumental: true` |
+
+See `references/models-and-gotchas.md` for the full model-choice reasoning and every
+API / ffmpeg gotcha (auth header, curl downloads, no-libass captions, content blocks, etc.).
+Read it before debugging any failure — most failures are already documented there.
+
+## Advanced: element-level motion collage
+
+The standard path animates the *whole* poster (great, automated, "living poster"). For the
+dramatic **pieces-fly-in-and-assemble** motion collage (à la cr7v2), or to animate **real
+people with full control and zero content filters**, cut each poster into independent
+elements and drive them with the local keyframe engine (no video model needed).
+
+Read `references/local-engine.md`. In short: `extract_elements.py` (crop + background-removal
++ residue/erase cleanup) → `motion.py` (Layer + keyframes, `fly_in`/`slap`/`drop`/`pop_settle`
+easings, procedural confetti/starburst, camera zoom+shake+whip, frame render). Pieces fly
+back to their **original positions** on a blurred-placeholder backdrop, so the assembled
+frame reconstructs the original poster.
+
+## Editions
+
+- **Auto edition** (this skill): topic in, film out, all on Atlas.
+- **Manual prompt-pack**: if the user isn't on Atlas, just produce the beat map + the per-beat
+ image prompts + the per-clip motion prompts + the narration script for them to paste into
+ any generator. The creative engine (the prompts) is identical.
diff --git a/SKILL.zh.md b/SKILL.zh.md
new file mode 100644
index 0000000..d5eb6b7
--- /dev/null
+++ b/SKILL.zh.md
@@ -0,0 +1,166 @@
+---
+name: vox-director
+description: >
+ 把一个主题一句话变成成品的 Vox 纸片拼贴讲解/广告视频,全程 Atlas Cloud API + 本地 ffmpeg
+ ——脚本、拼贴关键帧、动效、旁白、配乐、字幕全自动。当用户想做「Vox 风格」视频、纸片/撕纸拼贴
+ 动画、「motion collage」、用 AI 生成的拼贴海报做旁白讲解或短广告、剪贴簿式致敬片,或想把一个
+ 主题/产品/人物变成有冲击力的旁白拼贴视频时使用——即使没说「Vox」也用。也用于复刻 Stav Zilber
+ / rom1trs / Higgsfield 式拼贴广告工作流,或用户提到 拼贴动效视频 / 剪贴簿视频 / 拼贴广告 /
+ motion collage。触发词:「vox video」「collage video」「拼贴视频」「拼贴动效」「剪贴簿」
+ 「paper collage explainer」「做个拼贴广告」「把这个主题做成拼贴视频」。
+---
+
+# Vox Director(中文版)
+
+把一句话主题变成一条成品 **Vox 纸片拼贴视频**:大胆、有冲击力、带旁白的讲解/广告片,每一段都是
+一张会动的撕纸拼贴海报,配旁白、配乐、字幕。全程只需**一个 Atlas Cloud API key** + 本地 **ffmpeg**。
+
+风格 = Vox 讲解片和 Stav Zilber / rom1trs 带火的现代编辑感纸片拼贴:手撕纸边、胶带、半调网点、
+报纸剪报、每段一块大胆平涂色底、大号剪贴标题。
+
+## 核心思路(先读这段)
+
+Vox 拼贴的**样子**和**动效**是两件事、两步:
+
+1. **样子诞生在「生图」这一步。** 每段是一张文生图模型做的成品拼贴*海报*,所有拼贴 DNA(撕纸、剪贴、
+ 半调、大胆色、标题字)都在这张图里。图不到位,后面全白搭。
+2. **动效是之后加的。** 默认让 AI 视频模型动整张海报(「会动的海报」,简单自动)。要那种零件逐个飞入
+ 组装的更炸效果,才把海报拆件、用本地关键帧引擎驱动(高阶路线)。
+
+一切成败在提示词。**写任何生图/生视频 prompt 前,先读 `references/prompt-guide.md`**——它有把
+「真·Vox 拼贴」和「会动的 PPT」区分开的精确 prompt 结构。三个"库"文件:`prompt-guide.md`(生图5段+
+生视频轴)、`vocab-bank.md`(主题层维度词库 + 8 个主题预置)、`beat-layer.md`(叙事弧库 + 运镜/素材运动)。
+
+## 前置检查(别跳过)
+
+- `echo "${ATLASCLOUD_API_KEY:+set}"` —— 空的话让用户去 https://www.atlascloud.ai/console/api-keys 拿 key 设上,没设就停。
+- `command -v ffmpeg ffprobe` —— 合成必需(macOS:`brew install ffmpeg`)。
+- `python3 -c "import PIL"` —— Pillow,用来烧字幕/水印。
+
+## 标准流程(主题 → 成片)
+
+默认最自动化路线。每阶段一个脚本,全由每个项目 `out/<project>/` 下的 `beats.json` 驱动。
+
+1. **主题 → 分镜表。** 先**读 `references/beat-layer.md`**(故事层),按主题选一条叙事弧 `arc`
+ (历史→`timeline`,广告→`pas`/`bab`,讲解→`how_it_works`,转变→`man_in_hole`…)。再按这条弧写
+ `out/<project>/beats.json`:**第1段标题必须是 ≤3 秒的钩子**;beat 数量按时长(30s→6–8,60s→10–12);
+ 每段拆 **2 镜**(广角+特写),**每镜 `camera_move` 相邻段要不同**(不重复;`static` 留给点题段),
+ **`element_motion` 写丰富**(见第4步)。每段:`narration`、`title_cn`/`title_en`、`scene`、`bg`、
+ `feel`、`hook`。这份草稿是**唯一强制确认关口**——生成前先给用户过。示例见 `examples/`。
+
+2. **选视觉风格(混合式——在生关键帧前做)。** 别所有主题都用一个风格。读 `references/vocab-bank.md`;
+ 从 **主题预置**(`styles.THEME_PRESETS`:`american-retro`、`swiss-modern`、`punk-zine`、
+ `soviet-constructivist`、`wpa-propaganda`、`70s-groovy`、`chinese-ink`、`atomic-age`)里挑 3–4 个
+ 贴主题(年代/文化/调性)的,**库里没有就现调一个**(混 vocab-bank 的 媒介/年代/配色/字体/质感)。
+ **匹配主题、不匹配语言**(英文讲中国史照样该中式)。一个主题打包整个"看的层"
+ (idiom+配色+字体+质感+情绪+运动)。跑 bake-off 让用户看图 pick——AI 出主意、库保底、人拍板。
+ 把选中的名字写进 `"theme"`:
+ `python3 scripts/style_bakeoff.py out/<project> american-retro,swiss-modern,punk-zine,atomic-age`
+
+3. **关键帧(拼贴的样子)。** `python3 scripts/keyframes.py out/<project>`
+ 用 **google/nano-banana-2/text-to-image** 给每段/每镜出一张拼贴海报,标题字烧进图。按
+ `references/prompt-guide.md` 的 5 段式写 prompt。**动画前先确认每张是真·分层拼贴**——这里重滚便宜
+ ($0.08),别拿弱图去付费动画。
+
+4. **动效。** `python3 scripts/clips.py out/<project>`
+ 用 **google/gemini-omni-flash/image-to-video** 动每张海报。两根独立轴(见 `beat-layer.md` §3,已在
+ 我们自己栈上实测):
+ • **`camera_move`** —— 每镜一个运镜。安全/默认:`{static, push_in, pull_out, pan, tilt, parallax}`。
+ **大胆/实验**:`{orbit, dolly_zoom, roll, whip}` 是**可选、不是禁用**——它们可能掰弯平面,所以配
+ `constraints: loose` 用、并**抽卡**重滚,留给值得的那一拍。自定义短语也能穿透。
+ • **`element_motion`** —— **张力就在这**;**AI 每 beat 按场景自己写**(不是模板)。写**丰富**(多元素同动),
+ 大胆点。**"英雄"飞行元素**(纸鸟/纸飞机/硬币飞过全屏)是**偶尔在关键拍点睛**的好料,**不是每镜必有**
+ (每帧都飞就俗套)。
+ `motion_style` = 幅度 `calm | punchy | max`(主题给默认)。**`constraints`** = `strict`(默认:开防缺陷
+ 护栏——平面2D/单向/不 morph,适合重文字讲解片)或 `loose`(放开让模型探索 3D/大胆运镜,抽卡重滚)。
+ **只有带标题的镜头才硬锁文字**(无标题的特写镜随便浪)。**真人 / 品牌 logo**:Omni 和 Seedance 会拒——设
+ `"video_model": "kwaivgi/kling-video-o3-pro/image-to-video"`。
+
+5. **旁白 + 配乐。** `python3 scripts/audio.py out/<project>`
+ 用 **xai/tts-v1** 出单一音色旁白(多语言,`voice_id`)+ 用 **minimax/music-2.6** 出器乐 BGM。
+ (普通旁白**别用 seed-audio**,除非指定 speaker——见踩坑。)
+
+6. **合成。** `python3 scripts/assemble.py out/<project>`
+ ffmpeg:归一化 + 拼接所有镜头,单一旁白压在配乐下(ducking),按段烧字幕,加水印。
+ 产物 `out/<project>/final.mp4`。
+
+7. **验证。** mp4 内容读不了——抽帧成 jpg 看:
+ `ffmpeg -ss <t> -i final.mp4 -vf "scale=640:-1,format=yuvj420p" -frames:v 1 f.jpg`
+
+### 节奏——一镜多长
+
+常见错误是一段一个长镜头。9:16/社媒尤其:静态 10 秒 = 死画面。目标**每 ~4–6 秒切一刀**:
+- **单镜 3–6 秒;别超 ~7 秒**,再长 AI 运动没处使、发闷。
+- **一段旁白 ~8–10 秒,所以每段给 2 镜**(带标题的广角 + 不带标题的特写切入);旁白连续跨两镜、画面
+ 中途切。这是节奏最大的赢法。
+- 所以 ~60s 通常是 **~6 段 × 2 镜 × ~5s = 12 镜**,不是 6×10s。
+- 广角当 shot `a` 复用;特写 shot `b` 另写更紧的场景。`keyframes.py` 会**跳过已有 `keyframe_url` 的镜**,
+ 所以加 `b` 镜重跑只生成新的。
+
+## beats.json schema
+
+```json
+{
+ "project": "my-film", "topic": "...", "language": "en",
+ "aspect": "9:16", // 16:9 | 9:16 | 1:1 | 3:4
+ "style": "collage",
+ "theme": "american-retro", // 主题预置(styles.THEME_PRESETS)——"看的层"
+ "arc": "timeline", // 叙事弧(beat-layer.md)——"故事骨架"
+ "video_model": "google/gemini-omni-flash/image-to-video", // 真人用 Kling
+ "motion_style": "punchy", // 幅度:calm | punchy | max(主题给默认)
+ "constraints": "strict", // strict = 开防缺陷护栏 | loose = 放开探索 + 抽卡
+ "voice": {"voice_id": "leo", "language": "en", "speed": 1.0},
+ "music": "epic cinematic orchestral, instrumental, no vocals",
+ "watermark": "Made with Atlas Cloud",
+ "beats": [
+ {
+ "id": 1, "title_cn": "", "title_en": "BEFORE MONEY",
+ "bg": "earthy clay tan", "feel": "ancient, humble", "hook": "surprising_stat",
+ "narration": "For most of history, there was no money...",
+ "shots": [
+ // shot_size: EST_WIDE|WIDE|MEDIUM|CLOSE|DETAIL ; camera_move: static|push_in|
+ // pull_out|pan|tilt|parallax(仅平面安全)—— 相邻段要变,点题段用 static
+ {"id": "a", "dur": 5, "title": true, "shot_size": "WIDE", "camera_move": "push_in",
+ "scene": "...广角建立镜拼贴...",
+ "element_motion": "商贩比手势、羊点头、一只纸鸟拍翅飞过画面、硬币散落"},
+ {"id": "b", "dur": 5, "title": false, "shot_size": "CLOSE", "camera_move": "parallax",
+ "scene": "...特写切入...",
+ "element_motion": "交换的货物滑到一起,半调脉动"}
+ ]
+ }
+ ]
+}
+```
+`theme`+`arc` 定两个大层;每镜 `element_motion` 是张力(写丰富,见上)。`motion`/`collage_style`/`era`
+仍读,向后兼容。
+
+## 模型选型(务必先校验 ID)
+
+模型 ID 会变——先拉实时表:`GET https://api.atlascloud.ai/api/v1/models`(无 auth;只留 `display_console:true`)。当前默认:
+
+| 环节 | 模型 | 说明 |
+|---|---|---|
+| 关键帧 / 拼贴海报 | `google/nano-banana-2/text-to-image` | 中英文字都好 |
+| 抠单个零件 | `youchuan/v8.1/remove-background` | 仅高阶路线 |
+| 动效(非真人) | `google/gemini-omni-flash/image-to-video` | 文字稳、分层运动 |
+| 动效(**真人 / 品牌**) | `kwaivgi/kling-video-o3-pro/image-to-video` | Omni 和 Seedance 拦名人 |
+| 旁白 | `xai/tts-v1` | 干净、多语言、`voice_id` |
+| 配乐 | `minimax/music-2.6` | `is_instrumental: true` |
+
+完整选型理由 + 每个 API/ffmpeg 坑(auth 头、curl 下载、无 libass 烧字幕、内容审核等)见
+`references/models-and-gotchas.md`。**排查任何失败前先读它**——大多数坑已记录。
+
+## 高阶:元素级 motion collage
+
+标准路线动的是*整张*海报(好、自动、"会动的海报")。要那种**碎片飞入组装**的 motion collage(cr7v2 那种),
+或要**完全可控、零内容审核地动真人**,就把每张海报拆成独立零件、用本地关键帧引擎驱动(不经视频模型)。
+
+读 `references/local-engine.md`。简述:`extract_elements.py`(裁切 + 抠图 + 残渣/erase 清理)→
+`motion.py`(Layer + 关键帧,`fly_in`/`slap`/`drop`/`pop_settle` 缓动,程序化 confetti/starburst,相机
+zoom+shake+whip,逐帧渲染)。零件飞回它们在海报里的**原位**、落在模糊占位底上,组装完还原原海报。
+
+## 两个版本
+
+- **自动版**(本 skill):主题进,成片出,全程 Atlas。
+- **手动 prompt 包**:用户不在 Atlas 上时,只产出分镜表 + 每段生图 prompt + 每镜运动 prompt + 旁白脚本,
+ 贴到任意生成器。创作引擎(那些 prompt)完全一样。
diff --git a/assets/showcase-poster.jpg b/assets/showcase-poster.jpg
new file mode 100644
index 0000000..e60bca4
Binary files /dev/null and b/assets/showcase-poster.jpg differ
diff --git a/assets/showcase-tang.gif b/assets/showcase-tang.gif
new file mode 100644
index 0000000..dce0de1
Binary files /dev/null and b/assets/showcase-tang.gif differ
diff --git a/assets/showcase-tang.mp4 b/assets/showcase-tang.mp4
new file mode 100644
index 0000000..d644fe8
Binary files /dev/null and b/assets/showcase-tang.mp4 differ
diff --git a/examples/cr7-act.elements_spec.json b/examples/cr7-act.elements_spec.json
new file mode 100644
index 0000000..9b0e5c8
--- /dev/null
+++ b/examples/cr7-act.elements_spec.json
@@ -0,0 +1,96 @@
+{
+ "card": "/Users/qiutian/Projects/skills/vox-director/out/cr7-act/card2.png",
+ "elements": [
+ {
+ "name": "ronaldo",
+ "bbox": [
+ 255,
+ 85,
+ 692,
+ 835
+ ],
+ "mode": "cutout",
+ "erase": [[510, 455, 715, 810]],
+ "file": "/Users/qiutian/Projects/skills/vox-director/out/cr7-act/elements/ronaldo.png",
+ "size": [
+ 437,
+ 750
+ ]
+ },
+ {
+ "name": "trophy",
+ "bbox": [
+ 515,
+ 465,
+ 712,
+ 800
+ ],
+ "mode": "cutout",
+ "file": "/Users/qiutian/Projects/skills/vox-director/out/cr7-act/elements/trophy.png",
+ "size": [
+ 197,
+ 335
+ ]
+ },
+ {
+ "name": "crest",
+ "bbox": [
+ 85,
+ 92,
+ 278,
+ 246
+ ],
+ "mode": "cutout",
+ "file": "/Users/qiutian/Projects/skills/vox-director/out/cr7-act/elements/crest.png",
+ "size": [
+ 193,
+ 154
+ ]
+ },
+ {
+ "name": "seven",
+ "bbox": [
+ 68,
+ 250,
+ 238,
+ 568
+ ],
+ "mode": "crop",
+ "file": "/Users/qiutian/Projects/skills/vox-director/out/cr7-act/elements/seven.png",
+ "size": [
+ 170,
+ 318
+ ]
+ },
+ {
+ "name": "king",
+ "bbox": [
+ 52,
+ 585,
+ 302,
+ 788
+ ],
+ "mode": "crop",
+ "file": "/Users/qiutian/Projects/skills/vox-director/out/cr7-act/elements/king.png",
+ "size": [
+ 250,
+ 203
+ ]
+ },
+ {
+ "name": "y2008",
+ "bbox": [
+ 468,
+ 828,
+ 726,
+ 948
+ ],
+ "mode": "crop",
+ "file": "/Users/qiutian/Projects/skills/vox-director/out/cr7-act/elements/y2008.png",
+ "size": [
+ 258,
+ 120
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/examples/money-15s.beats.json b/examples/money-15s.beats.json
new file mode 100644
index 0000000..a3cc43f
--- /dev/null
+++ b/examples/money-15s.beats.json
@@ -0,0 +1,79 @@
+{
+ "project": "money-15s",
+ "topic": "money is trust (15s teaser)",
+ "language": "en",
+ "aspect": "9:16",
+ "style": "collage",
+ "theme": "american-retro",
+ "arc": "hook_payoff",
+ "video_model": "google/gemini-omni-flash/image-to-video",
+ "voice": {
+ "voice_id": "leo",
+ "language": "en",
+ "speed": 1.0
+ },
+ "music": "short punchy cinematic build, driving percussion, resolves on a warm chord, instrumental",
+ "watermark": "Made with Atlas Cloud",
+ "beats": [
+ {
+ "id": 1,
+ "title_cn": "",
+ "title_en": "MONEY",
+ "bg": "warm gold amber",
+ "feel": "intriguing, grand",
+ "hook": "surprising_stat",
+ "narration": "For five thousand years, money kept changing shape.",
+ "shots": [
+ {
+ "id": "a",
+ "dur": 5,
+ "title": true,
+ "shot_size": "WIDE",
+ "camera_move": "push_in",
+ "scene": "a museum display of the evolution of money in a row: cowrie shells, a gold coin, a paper banknote, a credit card, a glowing bitcoin, labels beneath",
+ "element_motion": "each money object lifts and settles in turn down the row, halftone dots pulse, a couple of coins glint"
+ }
+ ]
+ },
+ {
+ "id": 2,
+ "title_cn": "",
+ "title_en": "SHELLS TO CODE",
+ "bg": "cold teal",
+ "feel": "brisk, building",
+ "narration": "Shells, gold, paper, plastic, then pure code.",
+ "shots": [
+ {
+ "id": "a",
+ "dur": 5,
+ "title": true,
+ "shot_size": "MEDIUM",
+ "camera_move": "pan",
+ "scene": "the five forms of money as bold cut-outs in a left-to-right procession: shell, gold coin, banknote, credit card, glowing bitcoin",
+ "element_motion": "the whole row slides left-to-right, each form swaps into the next, the bitcoin at the end spins and glows"
+ }
+ ]
+ },
+ {
+ "id": 3,
+ "title_cn": "",
+ "title_en": "IT'S TRUST",
+ "bg": "bold red",
+ "feel": "profound, resonant, still",
+ "narration": "But money was never the thing. It is the trust.",
+ "shots": [
+ {
+ "id": "a",
+ "dur": 5,
+ "title": true,
+ "shot_size": "CLOSE",
+ "camera_move": "static",
+ "scene": "a close cut-in of an open cupped hand holding a single coin, warm light, radiating paper rays",
+ "element_motion": "the coin settles, a soft glow pulses once, everything else still — minimal, the point lands"
+ }
+ ]
+ }
+ ],
+ "bgm_path": "/Users/qiutian/Projects/skills/vox-director/out/money-15s/audio/bgm.mp3",
+ "bgm_dur": 15.33
+}
\ No newline at end of file
diff --git a/examples/money-60s-9x16-english.beats.json b/examples/money-60s-9x16-english.beats.json
new file mode 100644
index 0000000..a8032bc
--- /dev/null
+++ b/examples/money-60s-9x16-english.beats.json
@@ -0,0 +1,237 @@
+{
+ "project": "money-60s",
+ "topic": "A Brief History of Money",
+ "language": "en",
+ "aspect": "9:16",
+ "style": "collage",
+ "video_model": "google/gemini-omni-flash/image-to-video",
+ "voice": {
+ "gender": "male",
+ "tone": "warm authoritative documentary narrator",
+ "voice_id": "leo",
+ "language": "en",
+ "speed": 1.0
+ },
+ "music": "cinematic documentary score evolving from ancient organic hand percussion to a modern electronic pulse, driving yet reflective, instrumental, no vocals",
+ "watermark": "Made with Atlas Cloud",
+ "beats": [
+ {
+ "id": 1,
+ "title_cn": "",
+ "title_en": "BEFORE MONEY",
+ "bg": "earthy clay tan",
+ "feel": "ancient, humble, rough",
+ "narration": "For most of history, there was no money. You traded a goat for grain, and hoped the other person actually wanted a goat.",
+ "shots": [
+ {
+ "id": "a",
+ "dur": 5,
+ "title": true,
+ "scene": "two ancient traders facing off in a barter, a cut-out goat, sacks of grain, a scatter of cowrie shells, a scratched clay tablet, a torn arrow scrap between them",
+ "motion": "one slow gentle push-in on the whole collage; layered paper elements drift with parallax; halftone pulses softly",
+ "keyframe_prompt": "Mixed-media hand-cut PAPER COLLAGE, editorial motion-graphic zine style. Clearly layered paper cut-outs with visible torn and scissor-cut edges, tape corners and soft real paper drop shadows, on a bold flat earthy clay tan paper background. Halftone print dots, newspaper-clipping scraps, paper-stencil shapes, aged paper texture, slight print misregistration. Scattered geometric collage accents (a small blue paper triangle, a red circle, a zigzag, halftone strips, bits of washi tape). Figures are PRINTED-texture cut-outs of real imagery (sepia old photographs / Chinese woodblock-print / mural), NOT CGI, NOT a 3D render — keep print grain and paper imperfections. High-contrast, punchy, tactile, hand-assembled. SCENE (as layered paper cut-outs): two ancient traders facing off in a barter, a cut-out goat, sacks of grain, a scatter of cowrie shells, a scratched clay tablet, a torn arrow scrap between them. Include a torn-paper banner with a big bold cut-out English headline 'BEFORE MONEY', plus a single red seal stamp. Keep the headline crisp and legible. Aspect ratio 9:16.",
+ "keyframe_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/images/20260710-24f931dd4d943e0088d44019aebf059a-0.jpg",
+ "keyframe_path": "/Users/qiutian/Projects/skills/vox-director/out/money-60s/keyframes/kf_1.jpg",
+ "clip_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/videos/20260710-b3ecfd2a9e7e94fe8acd5ec3b942fd15-0.mp4",
+ "clip_path": "/Users/qiutian/Projects/skills/vox-director/out/money-60s/clips/clip_1a.mp4"
+ },
+ {
+ "id": "b",
+ "dur": 5,
+ "title": false,
+ "scene": "a close cut-in of two hands exchanging a bundle of grain for a small goat, scattered cowrie shells and a torn arrow scrap",
+ "motion": "one slow push-in on the detail; paper cut-outs drift gently; halftone pulses",
+ "keyframe_prompt": "Mixed-media hand-cut PAPER COLLAGE, editorial motion-graphic zine style. Clearly layered paper cut-outs with visible torn and scissor-cut edges, tape corners and soft real paper drop shadows, on a bold flat earthy clay tan paper background. Halftone print dots, newspaper-clipping scraps, paper-stencil shapes, aged paper texture, slight print misregistration. Scattered geometric collage accents (a small blue paper triangle, a red circle, a zigzag, halftone strips, bits of washi tape). Figures are PRINTED-texture cut-outs of real imagery (sepia old photographs / Chinese woodblock-print / mural), NOT CGI, NOT a 3D render — keep print grain and paper imperfections. High-contrast, punchy, tactile, hand-assembled. SCENE (as layered paper cut-outs): a close cut-in of two hands exchanging a bundle of grain for a small goat, scattered cowrie shells and a torn arrow scrap. No big headline banner in this shot (keep only a small seal); it is a cut-in detail of the same scene. Aspect ratio 9:16.",
+ "keyframe_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/images/05c17813-f6ae-440e-9fd8-698edf3506e3.jpg",
+ "keyframe_path": "/Users/qiutian/Projects/skills/vox-director/out/money-60s/keyframes/kf_1b.jpg",
+ "clip_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/videos/20260710-d2e7619b66306d0cbc75a79692e6b73c-0.mp4",
+ "clip_path": "/Users/qiutian/Projects/skills/vox-director/out/money-60s/clips/clip_1b.mp4"
+ }
+ ],
+ "narration_audio": "/Users/qiutian/Projects/skills/vox-director/out/money-60s/audio/narr_1.mp3",
+ "narration_dur": 7.44
+ },
+ {
+ "id": 2,
+ "title_cn": "",
+ "title_en": "FIRST MONEY",
+ "bg": "warm gold amber",
+ "feel": "dawn of value, gleaming, awe",
+ "narration": "So people found a shortcut. Shells, then metal. Around 600 BC, the kingdom of Lydia struck the very first coins.",
+ "shots": [
+ {
+ "id": "a",
+ "dur": 5,
+ "title": true,
+ "scene": "a string of cowrie shells, a heap of gold, a big stamped ancient Lydian coin as the focal cut-out, an ancient hand reaching in, halftone sunburst rays",
+ "motion": "one slow gentle push-in on the whole collage; layered paper elements drift with parallax; halftone pulses softly",
+ "keyframe_prompt": "Mixed-media hand-cut PAPER COLLAGE, editorial motion-graphic zine style. Clearly layered paper cut-outs with visible torn and scissor-cut edges, tape corners and soft real paper drop shadows, on a bold flat warm gold amber paper background. Halftone print dots, newspaper-clipping scraps, paper-stencil shapes, aged paper texture, slight print misregistration. Scattered geometric collage accents (a small blue paper triangle, a red circle, a zigzag, halftone strips, bits of washi tape). Figures are PRINTED-texture cut-outs of real imagery (sepia old photographs / Chinese woodblock-print / mural), NOT CGI, NOT a 3D render — keep print grain and paper imperfections. High-contrast, punchy, tactile, hand-assembled. SCENE (as layered paper cut-outs): a string of cowrie shells, a heap of gold, a big stamped ancient Lydian coin as the focal cut-out, an ancient hand reaching in, halftone sunburst rays. Include a torn-paper banner with a big bold cut-out English headline 'FIRST MONEY', plus a single red seal stamp. Keep the headline crisp and legible. Aspect ratio 9:16.",
+ "keyframe_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/images/1f88d0ca-cabb-44e4-9255-a8c7fd562603.jpg",
+ "keyframe_path": "/Users/qiutian/Projects/skills/vox-director/out/money-60s/keyframes/kf_2.jpg",
+ "clip_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/videos/20260710-0b11e729562ffe50cb32ef82dd9d0c00-0.mp4",
+ "clip_path": "/Users/qiutian/Projects/skills/vox-director/out/money-60s/clips/clip_2a.mp4"
+ },
+ {
+ "id": "b",
+ "dur": 5,
+ "title": false,
+ "scene": "a close cut-in of a single big stamped ancient Lydian coin held between fingertips, glinting gold nuggets around it",
+ "motion": "one slow push-in on the detail; paper cut-outs drift gently; halftone pulses",
+ "keyframe_prompt": "Mixed-media hand-cut PAPER COLLAGE, editorial motion-graphic zine style. Clearly layered paper cut-outs with visible torn and scissor-cut edges, tape corners and soft real paper drop shadows, on a bold flat warm gold amber paper background. Halftone print dots, newspaper-clipping scraps, paper-stencil shapes, aged paper texture, slight print misregistration. Scattered geometric collage accents (a small blue paper triangle, a red circle, a zigzag, halftone strips, bits of washi tape). Figures are PRINTED-texture cut-outs of real imagery (sepia old photographs / Chinese woodblock-print / mural), NOT CGI, NOT a 3D render — keep print grain and paper imperfections. High-contrast, punchy, tactile, hand-assembled. SCENE (as layered paper cut-outs): a close cut-in of a single big stamped ancient Lydian coin held between fingertips, glinting gold nuggets around it. No big headline banner in this shot (keep only a small seal); it is a cut-in detail of the same scene. Aspect ratio 9:16.",
+ "keyframe_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/images/20260710-1701645bc039673fa82e01c9729c3aa4-0.jpg",
+ "keyframe_path": "/Users/qiutian/Projects/skills/vox-director/out/money-60s/keyframes/kf_2b.jpg",
+ "clip_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/videos/20260710-5a28e25adfb6d90f7bcb81393d865d43-0.mp4",
+ "clip_path": "/Users/qiutian/Projects/skills/vox-director/out/money-60s/clips/clip_2b.mp4"
+ }
+ ],
+ "narration_audio": "/Users/qiutian/Projects/skills/vox-director/out/money-60s/audio/narr_2.mp3",
+ "narration_dur": 8.67
+ },
+ {
+ "id": 3,
+ "title_cn": "",
+ "title_en": "PAPER PROMISES",
+ "bg": "imperial deep-red",
+ "feel": "revolutionary, clever, bold",
+ "narration": "A thousand years ago, Song-dynasty China did something radical: money made of paper. A promise you could fold into your pocket.",
+ "shots": [
+ {
+ "id": "a",
+ "dur": 5,
+ "title": true,
+ "scene": "a Song-dynasty jiaozi paper banknote as the hero cut-out, a Chinese scholar-official, a bright red ink seal stamp, a stack of round coins turning into a folded paper note",
+ "motion": "one slow gentle push-in on the whole collage; layered paper elements drift with parallax; halftone pulses softly",
+ "keyframe_prompt": "Mixed-media hand-cut PAPER COLLAGE, editorial motion-graphic zine style. Clearly layered paper cut-outs with visible torn and scissor-cut edges, tape corners and soft real paper drop shadows, on a bold flat imperial deep-red paper background. Halftone print dots, newspaper-clipping scraps, paper-stencil shapes, aged paper texture, slight print misregistration. Scattered geometric collage accents (a small blue paper triangle, a red circle, a zigzag, halftone strips, bits of washi tape). Figures are PRINTED-texture cut-outs of real imagery (sepia old photographs / Chinese woodblock-print / mural), NOT CGI, NOT a 3D render — keep print grain and paper imperfections. High-contrast, punchy, tactile, hand-assembled. SCENE (as layered paper cut-outs): a Song-dynasty jiaozi paper banknote as the hero cut-out, a Chinese scholar-official, a bright red ink seal stamp, a stack of round coins turning into a folded paper note. Include a torn-paper banner with a big bold cut-out English headline 'PAPER PROMISES', plus a single red seal stamp. Keep the headline crisp and legible. Aspect ratio 9:16.",
+ "keyframe_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/images/e1c5c824-417e-4ab4-a380-4e3a65dbb0c3.png",
+ "keyframe_path": "/Users/qiutian/Projects/skills/vox-director/out/money-60s/keyframes/kf_3.jpg",
+ "clip_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/videos/20260710-c17bf5794286c49216a1b6d42bf4229a-0.mp4",
+ "clip_path": "/Users/qiutian/Projects/skills/vox-director/out/money-60s/clips/clip_3a.mp4"
+ },
+ {
+ "id": "b",
+ "dur": 5,
+ "title": false,
+ "scene": "a close cut-in of the Song jiaozi paper banknote with a bright red ink seal being pressed onto it, a hand folding the note",
+ "motion": "one slow push-in on the detail; paper cut-outs drift gently; halftone pulses",
+ "keyframe_prompt": "Mixed-media hand-cut PAPER COLLAGE, editorial motion-graphic zine style. Clearly layered paper cut-outs with visible torn and scissor-cut edges, tape corners and soft real paper drop shadows, on a bold flat imperial deep-red paper background. Halftone print dots, newspaper-clipping scraps, paper-stencil shapes, aged paper texture, slight print misregistration. Scattered geometric collage accents (a small blue paper triangle, a red circle, a zigzag, halftone strips, bits of washi tape). Figures are PRINTED-texture cut-outs of real imagery (sepia old photographs / Chinese woodblock-print / mural), NOT CGI, NOT a 3D render — keep print grain and paper imperfections. High-contrast, punchy, tactile, hand-assembled. SCENE (as layered paper cut-outs): a close cut-in of the Song jiaozi paper banknote with a bright red ink seal being pressed onto it, a hand folding the note. No big headline banner in this shot (keep only a small seal); it is a cut-in detail of the same scene. Aspect ratio 9:16.",
+ "keyframe_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/images/64ba6ffc-fefb-4bf0-a4cd-3c0bdff3a8f4.png",
+ "keyframe_path": "/Users/qiutian/Projects/skills/vox-director/out/money-60s/keyframes/kf_3b.jpg",
+ "clip_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/videos/20260710-8a34c31bb5490c7a82f3904f858b77df-0.mp4",
+ "clip_path": "/Users/qiutian/Projects/skills/vox-director/out/money-60s/clips/clip_3b.mp4"
+ }
+ ],
+ "narration_audio": "/Users/qiutian/Projects/skills/vox-director/out/money-60s/audio/narr_3.mp3",
+ "narration_dur": 8.75
+ },
+ {
+ "id": 4,
+ "title_cn": "",
+ "title_en": "BANKS & PLASTIC",
+ "bg": "cold steel blue",
+ "feel": "institutional, cold, modern",
+ "narration": "Paper needed guardians. Banks rose. Then plastic, and suddenly your money was just a number inside a machine.",
+ "shots": [
+ {
+ "id": "a",
+ "dur": 5,
+ "title": true,
+ "scene": "a marble bank facade with columns and a heavy vault door, a vintage embossed credit card as a bold cut-out, a ledger book, a 1950s hand holding the card, halftone",
+ "motion": "one slow gentle push-in on the whole collage; layered paper elements drift with parallax; halftone pulses softly",
+ "keyframe_prompt": "Mixed-media hand-cut PAPER COLLAGE, editorial motion-graphic zine style. Clearly layered paper cut-outs with visible torn and scissor-cut edges, tape corners and soft real paper drop shadows, on a bold flat cold steel blue paper background. Halftone print dots, newspaper-clipping scraps, paper-stencil shapes, aged paper texture, slight print misregistration. Scattered geometric collage accents (a small blue paper triangle, a red circle, a zigzag, halftone strips, bits of washi tape). Figures are PRINTED-texture cut-outs of real imagery (sepia old photographs / Chinese woodblock-print / mural), NOT CGI, NOT a 3D render — keep print grain and paper imperfections. High-contrast, punchy, tactile, hand-assembled. SCENE (as layered paper cut-outs): a marble bank facade with columns and a heavy vault door, a vintage embossed credit card as a bold cut-out, a ledger book, a 1950s hand holding the card, halftone. Include a torn-paper banner with a big bold cut-out English headline 'BANKS & PLASTIC', plus a single red seal stamp. Keep the headline crisp and legible. Aspect ratio 9:16.",
+ "keyframe_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/images/a90d43f8-da15-461e-8ff3-2f21909fe1cf.png",
+ "keyframe_path": "/Users/qiutian/Projects/skills/vox-director/out/money-60s/keyframes/kf_4.jpg",
+ "clip_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/videos/20260710-49b94001c71b6acb6cb75cb9b2c2de5d-0.mp4",
+ "clip_path": "/Users/qiutian/Projects/skills/vox-director/out/money-60s/clips/clip_4a.mp4"
+ },
+ {
+ "id": "b",
+ "dur": 5,
+ "title": false,
+ "scene": "a close cut-in of a 1950s hand pulling a vintage embossed credit card from a wallet, a bank ledger line and stacked coins",
+ "motion": "one slow push-in on the detail; paper cut-outs drift gently; halftone pulses",
+ "keyframe_prompt": "Mixed-media hand-cut PAPER COLLAGE, editorial motion-graphic zine style. Clearly layered paper cut-outs with visible torn and scissor-cut edges, tape corners and soft real paper drop shadows, on a bold flat cold steel blue paper background. Halftone print dots, newspaper-clipping scraps, paper-stencil shapes, aged paper texture, slight print misregistration. Scattered geometric collage accents (a small blue paper triangle, a red circle, a zigzag, halftone strips, bits of washi tape). Figures are PRINTED-texture cut-outs of real imagery (sepia old photographs / Chinese woodblock-print / mural), NOT CGI, NOT a 3D render — keep print grain and paper imperfections. High-contrast, punchy, tactile, hand-assembled. SCENE (as layered paper cut-outs): a close cut-in of a 1950s hand pulling a vintage embossed credit card from a wallet, a bank ledger line and stacked coins. No big headline banner in this shot (keep only a small seal); it is a cut-in detail of the same scene. Aspect ratio 9:16.",
+ "keyframe_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/images/9241c76a-41dc-43ea-8863-30037d491368.png",
+ "keyframe_path": "/Users/qiutian/Projects/skills/vox-director/out/money-60s/keyframes/kf_4b.jpg",
+ "clip_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/videos/20260710-c79a304694a297c632a37a866e1a68eb-0.mp4",
+ "clip_path": "/Users/qiutian/Projects/skills/vox-director/out/money-60s/clips/clip_4b.mp4"
+ }
+ ],
+ "narration_audio": "/Users/qiutian/Projects/skills/vox-director/out/money-60s/audio/narr_4.mp3",
+ "narration_dur": 7.34
+ },
+ {
+ "id": 5,
+ "title_cn": "",
+ "title_en": "MONEY GOES DIGITAL",
+ "bg": "dark charcoal with neon glow",
+ "feel": "electric, frontier, cold neon energy",
+ "narration": "Then money left the physical world entirely. Screens. Apps. And in 2009, Bitcoin. Cash with no bank, no border, no paper.",
+ "shots": [
+ {
+ "id": "a",
+ "dur": 5,
+ "title": true,
+ "scene": "a glowing smartphone showing a payment, a bright bitcoin coin as the focal cut-out, a web of glowing network nodes, streams of ones and zeros, neon cyan and orange accents on a dark ground",
+ "motion": "one slow gentle push-in on the whole collage; layered paper elements drift with parallax; halftone pulses softly",
+ "keyframe_prompt": "Mixed-media hand-cut PAPER COLLAGE, editorial motion-graphic zine style. Clearly layered paper cut-outs with visible torn and scissor-cut edges, tape corners and soft real paper drop shadows, on a bold flat dark charcoal with neon glow paper background. Halftone print dots, newspaper-clipping scraps, paper-stencil shapes, aged paper texture, slight print misregistration. Scattered geometric collage accents (a small blue paper triangle, a red circle, a zigzag, halftone strips, bits of washi tape). Figures are PRINTED-texture cut-outs of real imagery (sepia old photographs / Chinese woodblock-print / mural), NOT CGI, NOT a 3D render — keep print grain and paper imperfections. High-contrast, punchy, tactile, hand-assembled. SCENE (as layered paper cut-outs): a glowing smartphone showing a payment, a bright bitcoin coin as the focal cut-out, a web of glowing network nodes, streams of ones and zeros, neon cyan and orange accents on a dark ground. Include a torn-paper banner with a big bold cut-out English headline 'MONEY GOES DIGITAL', plus a single red seal stamp. Keep the headline crisp and legible. Aspect ratio 9:16.",
+ "keyframe_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/images/58ddc086-75d0-437c-a464-7956925bf593.jpg",
+ "keyframe_path": "/Users/qiutian/Projects/skills/vox-director/out/money-60s/keyframes/kf_5.jpg",
+ "clip_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/videos/20260710-d04ce26f42b95f007725a5d954147265-0.mp4",
+ "clip_path": "/Users/qiutian/Projects/skills/vox-director/out/money-60s/clips/clip_5a.mp4"
+ },
+ {
+ "id": "b",
+ "dur": 5,
+ "title": false,
+ "scene": "a close cut-in of a smartphone screen showing a digital payment beside a glowing bitcoin symbol, streams of binary and neon glow",
+ "motion": "one slow push-in on the detail; paper cut-outs drift gently; halftone pulses",
+ "keyframe_prompt": "Mixed-media hand-cut PAPER COLLAGE, editorial motion-graphic zine style. Clearly layered paper cut-outs with visible torn and scissor-cut edges, tape corners and soft real paper drop shadows, on a bold flat dark charcoal with neon glow paper background. Halftone print dots, newspaper-clipping scraps, paper-stencil shapes, aged paper texture, slight print misregistration. Scattered geometric collage accents (a small blue paper triangle, a red circle, a zigzag, halftone strips, bits of washi tape). Figures are PRINTED-texture cut-outs of real imagery (sepia old photographs / Chinese woodblock-print / mural), NOT CGI, NOT a 3D render — keep print grain and paper imperfections. High-contrast, punchy, tactile, hand-assembled. SCENE (as layered paper cut-outs): a close cut-in of a smartphone screen showing a digital payment beside a glowing bitcoin symbol, streams of binary and neon glow. No big headline banner in this shot (keep only a small seal); it is a cut-in detail of the same scene. Aspect ratio 9:16.",
+ "keyframe_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/images/20260710-a0cf695f1a3a3842def13f6d8231ce57-0.jpg",
+ "keyframe_path": "/Users/qiutian/Projects/skills/vox-director/out/money-60s/keyframes/kf_5b.jpg",
+ "clip_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/videos/20260710-41a66e1093b4fced3b3a90b599633218-0.mp4",
+ "clip_path": "/Users/qiutian/Projects/skills/vox-director/out/money-60s/clips/clip_5b.mp4"
+ }
+ ],
+ "narration_audio": "/Users/qiutian/Projects/skills/vox-director/out/money-60s/audio/narr_5.mp3",
+ "narration_dur": 10.55
+ },
+ {
+ "id": 6,
+ "title_cn": "",
+ "title_en": "WHAT IS MONEY?",
+ "bg": "bold gold on black",
+ "feel": "reflective, profound, resonant, cinematic",
+ "narration": "From shells to code, money never truly changed. It was always the same thing: a story we all agree to believe.",
+ "shots": [
+ {
+ "id": "a",
+ "dur": 5,
+ "title": true,
+ "scene": "a montage collage of a cowrie shell, a gold coin, a paper banknote, a credit card and a bitcoin arranged in a row, a pair of open cupped hands beneath them, bold radiating rays",
+ "motion": "one slow gentle push-in on the whole collage; layered paper elements drift with parallax; halftone pulses softly",
+ "keyframe_prompt": "Mixed-media hand-cut PAPER COLLAGE, editorial motion-graphic zine style. Clearly layered paper cut-outs with visible torn and scissor-cut edges, tape corners and soft real paper drop shadows, on a bold flat bold gold on black paper background. Halftone print dots, newspaper-clipping scraps, paper-stencil shapes, aged paper texture, slight print misregistration. Scattered geometric collage accents (a small blue paper triangle, a red circle, a zigzag, halftone strips, bits of washi tape). Figures are PRINTED-texture cut-outs of real imagery (sepia old photographs / Chinese woodblock-print / mural), NOT CGI, NOT a 3D render — keep print grain and paper imperfections. High-contrast, punchy, tactile, hand-assembled. SCENE (as layered paper cut-outs): a montage collage of a cowrie shell, a gold coin, a paper banknote, a credit card and a bitcoin arranged in a row, a pair of open cupped hands beneath them, bold radiating rays. Include a torn-paper banner with a big bold cut-out English headline 'WHAT IS MONEY?', plus a single red seal stamp. Keep the headline crisp and legible. Aspect ratio 9:16.",
+ "keyframe_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/images/e7191fcd-d852-4fd2-a4ac-c6b8f35a19fd.jpg",
+ "keyframe_path": "/Users/qiutian/Projects/skills/vox-director/out/money-60s/keyframes/kf_6.jpg",
+ "clip_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/videos/20260710-42095ffbd00f44bee94ee4bba0ae5ea3-0.mp4",
+ "clip_path": "/Users/qiutian/Projects/skills/vox-director/out/money-60s/clips/clip_6a.mp4"
+ },
+ {
+ "id": "b",
+ "dur": 5,
+ "title": false,
+ "scene": "a close cut-in of open cupped hands cradling a cowrie shell, a gold coin, a paper banknote and a bitcoin together, radiating rays",
+ "motion": "one slow push-in on the detail; paper cut-outs drift gently; halftone pulses",
+ "keyframe_prompt": "Mixed-media hand-cut PAPER COLLAGE, editorial motion-graphic zine style. Clearly layered paper cut-outs with visible torn and scissor-cut edges, tape corners and soft real paper drop shadows, on a bold flat bold gold on black paper background. Halftone print dots, newspaper-clipping scraps, paper-stencil shapes, aged paper texture, slight print misregistration. Scattered geometric collage accents (a small blue paper triangle, a red circle, a zigzag, halftone strips, bits of washi tape). Figures are PRINTED-texture cut-outs of real imagery (sepia old photographs / Chinese woodblock-print / mural), NOT CGI, NOT a 3D render — keep print grain and paper imperfections. High-contrast, punchy, tactile, hand-assembled. SCENE (as layered paper cut-outs): a close cut-in of open cupped hands cradling a cowrie shell, a gold coin, a paper banknote and a bitcoin together, radiating rays. No big headline banner in this shot (keep only a small seal); it is a cut-in detail of the same scene. Aspect ratio 9:16.",
+ "keyframe_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/images/20260710-11b67691afe353e6916b5409f748b7d4-0.jpg",
+ "keyframe_path": "/Users/qiutian/Projects/skills/vox-director/out/money-60s/keyframes/kf_6b.jpg",
+ "clip_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/videos/20260710-fc6389e475178e27e2361488029e26bc-0.mp4",
+ "clip_path": "/Users/qiutian/Projects/skills/vox-director/out/money-60s/clips/clip_6b.mp4"
+ }
+ ],
+ "narration_audio": "/Users/qiutian/Projects/skills/vox-director/out/money-60s/audio/narr_6.mp3",
+ "narration_dur": 7.86
+ }
+ ],
+ "bgm_path": "/Users/qiutian/Projects/skills/vox-director/out/money-60s/audio/bgm.mp3",
+ "bgm_dur": 215.5
+}
\ No newline at end of file
diff --git a/examples/ronaldo-9x16-kling.beats.json b/examples/ronaldo-9x16-kling.beats.json
new file mode 100644
index 0000000..05117e5
--- /dev/null
+++ b/examples/ronaldo-9x16-kling.beats.json
@@ -0,0 +1,82 @@
+{
+ "project": "ronaldo",
+ "topic": "Cristiano Ronaldo — a career in five moments (collage tribute)",
+ "language": "en",
+ "aspect": "9:16",
+ "era": "modern",
+ "style": "collage",
+ "video_model": "kwaivgi/kling-video-o3-pro/image-to-video",
+ "watermark": "Atlas Cloud · 100% AUTOMATED",
+ "voice": {
+ "gender": "male",
+ "tone": "epic cinematic sports documentary narrator",
+ "voice_id": "leo",
+ "language": "en",
+ "speed": 1.0
+ },
+ "music": "epic emotional cinematic orchestral, soaring strings and triumphant drums, nostalgic then triumphant, building to a climax, no vocals",
+ "beats": [
+ {
+ "id": 1,
+ "narration": "In 2004, a boy of nineteen wept before a nation. The dream was over. The legend had not yet begun.",
+ "keyframe_path": "/Users/qiutian/Projects/skills/vox-director/out/ronaldo/keyframes/kf_1.png",
+ "dur": 5,
+ "motion": "one slow push-in on the crying young footballer; aged newspaper edges and halftone dots drift softly; somber and still",
+ "keyframe_url": "https://atlas-img.oss-accelerate-overseas.aliyuncs.com/images/ad8f99b9-20c7-4aac-aefa-242c2c39e5b2.png",
+ "clip_path": "/Users/qiutian/Projects/skills/vox-director/out/ronaldo/clips/clip_1.mp4",
+ "clip_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/videos/196de7b6-ea0a-4482-95c6-96b7f35e8f4b.mp4",
+ "narration_audio": "/Users/qiutian/Projects/skills/vox-director/out/ronaldo/audio/narr_1.mp3",
+ "narration_dur": 7.73
+ },
+ {
+ "id": 2,
+ "narration": "By 2008, he ruled the continent — his first Ballon d'Or, and the whole world at his feet.",
+ "keyframe_path": "/Users/qiutian/Projects/skills/vox-director/out/ronaldo/keyframes/kf_2.png",
+ "dur": 5,
+ "motion": "one slow push-in on the roaring player; the golden trophy gleams; halftone dots pulse gently",
+ "keyframe_url": "https://atlas-img.oss-accelerate-overseas.aliyuncs.com/images/b792a763-16ac-4b8e-8b9a-f31139564ae2.png",
+ "clip_path": "/Users/qiutian/Projects/skills/vox-director/out/ronaldo/clips/clip_2.mp4",
+ "clip_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/videos/0bb9e3c9-36ba-413c-92d8-1998d0caa569.mp4",
+ "narration_audio": "/Users/qiutian/Projects/skills/vox-director/out/ronaldo/audio/narr_2.mp3",
+ "narration_dur": 6.5
+ },
+ {
+ "id": 3,
+ "narration": "In Madrid he became immortal — Champions League after Champions League. La Duodécima.",
+ "keyframe_path": "/Users/qiutian/Projects/skills/vox-director/out/ronaldo/keyframes/kf_3.png",
+ "dur": 5,
+ "motion": "one slow rise from the player's outstretched arms up to the stacked trophies; paper cut-outs drift lightly",
+ "keyframe_url": "https://atlas-img.oss-accelerate-overseas.aliyuncs.com/images/dfb61cc7-8e35-4b7d-8657-b3b75097ff59.png",
+ "clip_path": "/Users/qiutian/Projects/skills/vox-director/out/ronaldo/clips/clip_3.mp4",
+ "clip_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/videos/39397378-03d6-48a4-832c-bdcb5cf49689.mp4",
+ "narration_audio": "/Users/qiutian/Projects/skills/vox-director/out/ronaldo/audio/narr_3.mp3",
+ "narration_dur": 6.4
+ },
+ {
+ "id": 4,
+ "narration": "Then the impossible — an overhead strike that turned a rival stadium into applause.",
+ "keyframe_path": "/Users/qiutian/Projects/skills/vox-director/out/ronaldo/keyframes/kf_4.png",
+ "dur": 5,
+ "motion": "one slow zoom into the bicycle-kick silhouette as the orange starburst radiates; halftone dots pulse",
+ "keyframe_url": "https://atlas-img.oss-accelerate-overseas.aliyuncs.com/images/6cd2726d-a9e9-4942-bee1-9184c1286f7d.png",
+ "clip_path": "/Users/qiutian/Projects/skills/vox-director/out/ronaldo/clips/clip_4.mp4",
+ "clip_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/videos/617ad105-48f7-4d52-b655-f21f60d8a140.mp4",
+ "narration_audio": "/Users/qiutian/Projects/skills/vox-director/out/ronaldo/audio/narr_4.mp3",
+ "narration_dur": 5.67
+ },
+ {
+ "id": 5,
+ "narration": "And in 2016, he lifted a continent. Portugal, champions of Europe. Cristiano, forever.",
+ "keyframe_path": "/Users/qiutian/Projects/skills/vox-director/out/ronaldo/keyframes/kf_5.png",
+ "dur": 5,
+ "motion": "one slow push-in as the player lifts the trophy; gold confetti drifts down; red-and-green ribbons flutter softly",
+ "keyframe_url": "https://atlas-img.oss-accelerate-overseas.aliyuncs.com/images/25cf570c-7efb-46f3-a976-e1ae3a5201e5.png",
+ "clip_path": "/Users/qiutian/Projects/skills/vox-director/out/ronaldo/clips/clip_5.mp4",
+ "clip_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/videos/6d11f3de-7f5a-4959-91fc-c5cae5dc99d1.mp4",
+ "narration_audio": "/Users/qiutian/Projects/skills/vox-director/out/ronaldo/audio/narr_5.mp3",
+ "narration_dur": 6.77
+ }
+ ],
+ "bgm_path": "/Users/qiutian/Projects/skills/vox-director/out/ronaldo/audio/bgm.mp3",
+ "bgm_dur": 185.57
+}
\ No newline at end of file
diff --git a/examples/tang-30s.beats.json b/examples/tang-30s.beats.json
new file mode 100644
index 0000000..45f6ea1
--- /dev/null
+++ b/examples/tang-30s.beats.json
@@ -0,0 +1,125 @@
+{
+ "project": "tang-30s",
+ "topic": "The Tang Dynasty — golden age of Chinese civilization",
+ "language": "en",
+ "aspect": "16:9",
+ "era": "tang",
+ "style": "collage",
+ "voice": {
+ "gender": "male",
+ "tone": "calm authoritative documentary narrator",
+ "voice_id": "leo",
+ "language": "en",
+ "speed": 1.0
+ },
+ "music": "cinematic guzheng and erhu, majestic and warm, slowly building",
+ "beats": [
+ {
+ "id": 1,
+ "title_cn": "盛唐",
+ "title_en": "TANG GOLDEN AGE",
+ "bg": "imperial deep-red",
+ "narration": "In the seventh century, Tang China built Chang'an — the largest, richest city on Earth. The whole world came to its gates.",
+ "narration_audio": "/Users/qiutian/Projects/skills/vox-director/out/tang-30s/audio/narr_1.mp3",
+ "narration_dur": 8.62,
+ "shots": [
+ {
+ "id": "a",
+ "dur": 5,
+ "title": true,
+ "scene": "a Tang emperor on a golden throne in dragon robes with court ladies, tall palace halls and pagodas of Chang'an behind, cut-out ink-wash mountains and drifting clouds",
+ "motion": "slow commanding push-in toward the enthroned emperor; paper clouds drift; halftone dots pulse on the beat",
+ "keyframe_prompt": "Mixed-media hand-cut PAPER COLLAGE, editorial motion-graphic zine style. Clearly layered paper cut-outs with visible torn and scissor-cut edges, tape corners and soft real paper drop shadows, on a bold flat imperial deep-red paper background. Halftone print dots, newspaper-clipping scraps, paper-stencil shapes, aged paper texture, slight print misregistration. Scattered geometric collage accents (a small blue paper triangle, a red circle, a zigzag, halftone strips, bits of washi tape). Figures are PRINTED-texture cut-outs of real imagery (sepia old photographs / Chinese woodblock-print / mural), NOT CGI, NOT a 3D render — keep print grain and paper imperfections. High-contrast, punchy, tactile, hand-assembled. SCENE (as layered paper cut-outs): a Tang emperor on a golden throne in dragon robes with court ladies, tall palace halls and pagodas of Chang'an behind, cut-out ink-wash mountains and drifting clouds. Include a title cartouche with large red Chinese characters '盛唐' and a small clean English subtitle 'TANG GOLDEN AGE', plus a single red seal stamp. Keep the headline crisp and legible. Aspect ratio 16:9.",
+ "keyframe_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/images/8eafd46c-baae-470e-bf62-443d33ee9d0f.jpg",
+ "keyframe_path": "/Users/qiutian/Projects/skills/vox-director/out/tang-30s/keyframes/kf_1a.jpg",
+ "clip_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/videos/20260708-1b4ed14cd3fdd61e83ae1a3e900ee440-0.mp4",
+ "clip_path": "/Users/qiutian/Projects/skills/vox-director/out/tang-30s/clips/clip_1a.mp4"
+ },
+ {
+ "id": "b",
+ "dur": 5,
+ "title": false,
+ "scene": "a close cut-in of foreign envoys from many nations bowing before the Tang throne, silk banners and gift boxes, sepia old-photograph cut-out figures",
+ "motion": "one slow steady push-in on the bowing envoys; torn-paper edges and washi tape flutter lightly",
+ "keyframe_prompt": "Mixed-media hand-cut PAPER COLLAGE, editorial motion-graphic zine style. Clearly layered paper cut-outs with visible torn and scissor-cut edges, tape corners and soft real paper drop shadows, on a bold flat imperial deep-red paper background. Halftone print dots, newspaper-clipping scraps, paper-stencil shapes, aged paper texture, slight print misregistration. Scattered geometric collage accents (a small blue paper triangle, a red circle, a zigzag, halftone strips, bits of washi tape). Figures are PRINTED-texture cut-outs of real imagery (sepia old photographs / Chinese woodblock-print / mural), NOT CGI, NOT a 3D render — keep print grain and paper imperfections. High-contrast, punchy, tactile, hand-assembled. SCENE (as layered paper cut-outs): a close cut-in of foreign envoys from many nations bowing before the Tang throne, silk banners and gift boxes, sepia old-photograph cut-out figures. No big headline banner in this shot (keep only a small red seal); it is a cut-in detail of the same scene. Aspect ratio 16:9.",
+ "keyframe_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/images/20260708-21f9c125aeae5df109b3284b21de8864-0.jpg",
+ "keyframe_path": "/Users/qiutian/Projects/skills/vox-director/out/tang-30s/keyframes/kf_1b.jpg",
+ "clip_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/videos/20260708-072567748798ba138813874152cf1be0-0.mp4",
+ "clip_path": "/Users/qiutian/Projects/skills/vox-director/out/tang-30s/clips/clip_1b.mp4"
+ }
+ ]
+ },
+ {
+ "id": 2,
+ "title_cn": "丝绸之路",
+ "title_en": "THE SILK ROAD",
+ "bg": "warm ochre",
+ "narration": "Along the Silk Road, caravans carried silk and paper west, and returned with gold, new faiths, and ideas — Tang China, open to the world.",
+ "narration_audio": "/Users/qiutian/Projects/skills/vox-director/out/tang-30s/audio/narr_2.mp3",
+ "narration_dur": 10.16,
+ "shots": [
+ {
+ "id": "a",
+ "dur": 6,
+ "title": true,
+ "scene": "a long Bactrian camel caravan crossing layered paper desert dunes, cut-out ink-wash mountains, an oasis town scrap on the horizon",
+ "motion": "dynamic lateral parallax pan following the caravan; layered paper dunes and mountains slide at different depths; clouds drift",
+ "keyframe_prompt": "Mixed-media hand-cut PAPER COLLAGE, editorial motion-graphic zine style. Clearly layered paper cut-outs with visible torn and scissor-cut edges, tape corners and soft real paper drop shadows, on a bold flat warm ochre paper background. Halftone print dots, newspaper-clipping scraps, paper-stencil shapes, aged paper texture, slight print misregistration. Scattered geometric collage accents (a small blue paper triangle, a red circle, a zigzag, halftone strips, bits of washi tape). Figures are PRINTED-texture cut-outs of real imagery (sepia old photographs / Chinese woodblock-print / mural), NOT CGI, NOT a 3D render — keep print grain and paper imperfections. High-contrast, punchy, tactile, hand-assembled. SCENE (as layered paper cut-outs): a long Bactrian camel caravan crossing layered paper desert dunes, cut-out ink-wash mountains, an oasis town scrap on the horizon. Include a title cartouche with large red Chinese characters '丝绸之路' and a small clean English subtitle 'THE SILK ROAD', plus a single red seal stamp. Keep the headline crisp and legible. Aspect ratio 16:9.",
+ "keyframe_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/images/20260708-3d5f39f2b2afc0c105d9d5fade529834-0.jpg",
+ "keyframe_path": "/Users/qiutian/Projects/skills/vox-director/out/tang-30s/keyframes/kf_2a.jpg",
+ "clip_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/videos/20260708-72d7130197b406eea41d1978f03146d4-0.mp4",
+ "clip_path": "/Users/qiutian/Projects/skills/vox-director/out/tang-30s/clips/clip_2a.mp4"
+ },
+ {
+ "id": "b",
+ "dur": 5,
+ "title": false,
+ "scene": "a close cut-in of Silk Road merchants trading a bundle of silk and a porcelain vase beside a camel, sepia old-photograph cut-out figures",
+ "motion": "one slow push-in on the merchants' exchanging hands; a yellow zigzag scrap flutters lightly",
+ "keyframe_prompt": "Mixed-media hand-cut PAPER COLLAGE, editorial motion-graphic zine style. Clearly layered paper cut-outs with visible torn and scissor-cut edges, tape corners and soft real paper drop shadows, on a bold flat warm ochre paper background. Halftone print dots, newspaper-clipping scraps, paper-stencil shapes, aged paper texture, slight print misregistration. Scattered geometric collage accents (a small blue paper triangle, a red circle, a zigzag, halftone strips, bits of washi tape). Figures are PRINTED-texture cut-outs of real imagery (sepia old photographs / Chinese woodblock-print / mural), NOT CGI, NOT a 3D render — keep print grain and paper imperfections. High-contrast, punchy, tactile, hand-assembled. SCENE (as layered paper cut-outs): a close cut-in of Silk Road merchants trading a bundle of silk and a porcelain vase beside a camel, sepia old-photograph cut-out figures. No big headline banner in this shot (keep only a small red seal); it is a cut-in detail of the same scene. Aspect ratio 16:9.",
+ "keyframe_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/images/2ce2e2af-33cc-49d3-9ed2-f9bfc2266eaa.png",
+ "keyframe_path": "/Users/qiutian/Projects/skills/vox-director/out/tang-30s/keyframes/kf_2b.jpg",
+ "clip_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/videos/20260708-6830bed0dad0981e2289cde91bceeb3b-0.mp4",
+ "clip_path": "/Users/qiutian/Projects/skills/vox-director/out/tang-30s/clips/clip_2b.mp4"
+ }
+ ]
+ },
+ {
+ "id": 3,
+ "title_cn": "诗的盛世",
+ "title_en": "AGE OF POETRY",
+ "bg": "deep indigo night-blue",
+ "narration": "It was the golden age of poetry — Li Bai and Du Fu, still sung today. For three centuries, the Tang burned brightest.",
+ "narration_audio": "/Users/qiutian/Projects/skills/vox-director/out/tang-30s/audio/narr_3.mp3",
+ "narration_dur": 8.96,
+ "shots": [
+ {
+ "id": "a",
+ "dur": 5,
+ "title": true,
+ "scene": "Tang poets gathered by a river raising wine cups under a large cut-out full moon, plum-blossom branches and hanging red lanterns",
+ "motion": "gentle rise revealing the poets and the full moon; paper lanterns sway; plum petals drift across layers",
+ "keyframe_prompt": "Mixed-media hand-cut PAPER COLLAGE, editorial motion-graphic zine style. Clearly layered paper cut-outs with visible torn and scissor-cut edges, tape corners and soft real paper drop shadows, on a bold flat deep indigo night-blue paper background. Halftone print dots, newspaper-clipping scraps, paper-stencil shapes, aged paper texture, slight print misregistration. Scattered geometric collage accents (a small blue paper triangle, a red circle, a zigzag, halftone strips, bits of washi tape). Figures are PRINTED-texture cut-outs of real imagery (sepia old photographs / Chinese woodblock-print / mural), NOT CGI, NOT a 3D render — keep print grain and paper imperfections. High-contrast, punchy, tactile, hand-assembled. SCENE (as layered paper cut-outs): Tang poets gathered by a river raising wine cups under a large cut-out full moon, plum-blossom branches and hanging red lanterns. Include a title cartouche with large red Chinese characters '诗的盛世' and a small clean English subtitle 'AGE OF POETRY', plus a single red seal stamp. Keep the headline crisp and legible. Aspect ratio 16:9.",
+ "keyframe_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/images/20260708-0b387962055f5dbd7cb054bb95439fc5-0.jpg",
+ "keyframe_path": "/Users/qiutian/Projects/skills/vox-director/out/tang-30s/keyframes/kf_3a.jpg",
+ "clip_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/videos/20260708-1c0305faa313dccf33407c1f3c28fcaf-0.mp4",
+ "clip_path": "/Users/qiutian/Projects/skills/vox-director/out/tang-30s/clips/clip_3a.mp4"
+ },
+ {
+ "id": "b",
+ "dur": 5,
+ "title": false,
+ "scene": "a close cut-in of a single Tang poet raising a wine cup toward the glowing full moon, drifting plum petals and a flying paper crane",
+ "motion": "slow push toward the raised cup and the moon; a paper crane glides across; petals fall on the beat",
+ "keyframe_prompt": "Mixed-media hand-cut PAPER COLLAGE, editorial motion-graphic zine style. Clearly layered paper cut-outs with visible torn and scissor-cut edges, tape corners and soft real paper drop shadows, on a bold flat deep indigo night-blue paper background. Halftone print dots, newspaper-clipping scraps, paper-stencil shapes, aged paper texture, slight print misregistration. Scattered geometric collage accents (a small blue paper triangle, a red circle, a zigzag, halftone strips, bits of washi tape). Figures are PRINTED-texture cut-outs of real imagery (sepia old photographs / Chinese woodblock-print / mural), NOT CGI, NOT a 3D render — keep print grain and paper imperfections. High-contrast, punchy, tactile, hand-assembled. SCENE (as layered paper cut-outs): a close cut-in of a single Tang poet raising a wine cup toward the glowing full moon, drifting plum petals and a flying paper crane. No big headline banner in this shot (keep only a small red seal); it is a cut-in detail of the same scene. Aspect ratio 16:9.",
+ "keyframe_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/images/20260708-521f6e1973afc64647089cb4b80aeb56-0.jpg",
+ "keyframe_path": "/Users/qiutian/Projects/skills/vox-director/out/tang-30s/keyframes/kf_3b.jpg",
+ "clip_url": "https://atlas-media.oss-us-west-1.aliyuncs.com/videos/20260708-24e7369d795ccb4e20b6261a0625d806-0.mp4",
+ "clip_path": "/Users/qiutian/Projects/skills/vox-director/out/tang-30s/clips/clip_3b.mp4"
+ }
+ ]
+ }
+ ],
+ "bgm_path": "/Users/qiutian/Projects/skills/vox-director/out/tang-30s/audio/bgm.mp3",
+ "bgm_dur": 126.28
+}
\ No newline at end of file
diff --git a/references/beat-layer.md b/references/beat-layer.md
new file mode 100644
index 0000000..ea1a578
--- /dev/null
+++ b/references/beat-layer.md
@@ -0,0 +1,143 @@
+# Beat / Shot Layer Library — narrative arc + per-shot spec
+
+The counterpart to `vocab-bank.md` (which covers the LOOK / theme layer). This covers the
+**beat layer**: the narrative skeleton across the whole film + the per-shot spec (shot size,
+camera move, element motion). Distilled from short-form/story-structure/editing research
+(sources at bottom). One "poster per beat"; our per-shot unit ≈ what the sources call a beat.
+
+Three tiers, three control methods (this is the design):
+- **Narrative arc** → preset menu, AI recommends from topic, **user confirms** (one click).
+- **Per-beat scene + headline** → AI drafts from the topic, **user approves/edits** (the one mandatory gate).
+- **Shot size + camera move** → **rule/preset-derived from arc position + anti-monotony**; AI fills from a *hard-constrained* vocab; user can override but rarely needs to. Never free-form (the model will emit "orbit"/"dolly-zoom" and break the flat art).
+
+---
+
+## 1. Narrative Arc Library (pick one; AI recommends by topic)
+
+| Arc (token) | When to use | Beat shape |
+|---|---|---|
+| `hook_payoff` | default for any single idea; safest | Hook → Context → Build → Payoff → Button |
+| `pas` | pain-aware ads, urgency | Problem → Agitate → Solve → Proof → CTA |
+| `bab` | when the "after" sells better than the pain | Before → After → Bridge → CTA |
+| `aida` | cold-audience paid ads | Attention → Interest → Desire → Action |
+| `storybrand` | brand/service, customer-as-hero | Hero wants → Problem → Guide → Plan → CTA → stakes |
+| `how_it_works` | product/process/system explainer | Hook → What it is → 2–3 shown steps → Benefit → CTA |
+| `timeline` | history, "evolution of", journeys | Start → event → event → turning point → present → takeaway |
+| `man_in_hole` | case study, comeback, transformation (highest-rated arc) | OK → fall → deepen → climb out → better than before |
+| `story_spine` | mission/brand/founder tales | Once… → Every day… → Until one day… → Because… → Until finally… → Ever since… |
+| `origin` | founder / "why we exist" | World → spark → leap → struggle → breakthrough → today |
+| `myth_buster` | correct a misconception | FACT first → the myth → expose fallacy → what to believe → CTA |
+| `listicle` | tips/tools/rankings "N ways to…" | Promise → item → item → … → #1 → recap/CTA |
+| `three_act` | any narrative 60s piece | Setup → Confrontation (rising) → Resolution |
+| `story_circle` | character-driven UGC/brand | You → Need → Go → Search → Find → Take → Return → Change |
+
+**Topic → arc heuristic:** product/service ad → `pas`/`bab`/`aida`/`storybrand`; concept/system →
+`how_it_works`/`hook_payoff`; historical/"evolution of" → `timeline`; transformation/case study →
+`man_in_hole`; brand/mission → `story_spine`/`origin`; correcting a belief → `myth_buster`;
+ranking/tips → `listicle`.
+
+## 2. Hook · Pacing · Beat-count (firm presets)
+
+- **Hook in ≤3s** — ~65% of viewers decide by 3s. Beat 1's baked headline must carry the
+ payoff-promise (bold claim / provocative question / surprising stat / "you're doing X wrong").
+ Never spend beat 1 on setup.
+- **Hook patterns (pick one for beat 1):** `mistake_callout · pain_point · surprising_stat ·
+ direct_question · urgent_warning · secret_reveal · experiment_story · pattern_interrupt ·
+ outcome_tease`. Underlying triggers: curiosity gap, pattern interrupt, bold claim.
+- **Beat-count & length:**
+
+ | Duration | Beats (posters) | Beat length | VO words |
+ |---|---|---|---|
+ | **30s** | 6–8 | ~4–5s | ~70–80 |
+ | **60s** | 10–12 | ~5–6s | ~130–150 |
+
+ (Our "beat×2 shots" model: ~6 beats × 2 shots = ~12 posters for 60s — matches.)
+- **Proportions:** hook 1–3s → body 70–80% → payoff 10–20% → end/CTA 0–2s.
+- **Change something visually every 3–5s; never hold a static poster >8s** → every beat needs
+ internal motion (§3), which is why we split beats into short shots.
+- **Endings:** `hard_cut` (on the payoff; default, drives rewatches) · `quick_cta` (≤2s, one
+ action + benefit, 3–5 words) · `loop_close` (last line mirrors the first → seamless replay).
+
+## 3. Shot-Pattern Library (per beat)
+
+### Shot size (composition zoom of the poster)
+`EST_WIDE` (whole scene/system, orient, scale) · `WIDE` (subject in environment) · `MEDIUM`
+(one subject centered; workhorse) · `CLOSE` (one detail fills frame; emphasis/emotion) ·
+`DETAIL`/`ECU` (single texture/word/number; a punch beat).
+Coverage plays out **across beats** (we hold one poster per beat): move-in `EST_WIDE→MEDIUM→CLOSE`
+(build intensity, peak on CLOSE) · move-out `CLOSE→…→WIDE` (reveal context; good ending) ·
+**establishing-wide → detail cut-in** = the best 2-poster beat (a wide to orient, hard-cut to a
+CLOSE of the key element — generate two posters for that beat).
+
+### Camera move — HARD-CONSTRAINED flat-safe vocab
+Rule: **uniform translate + uniform scale = safe** (text scales/moves as one piece);
+**anything that warps perspective, blurs, or rotates text off-axis = banned.**
+
+| ✅ safe (token) | realize on flat art | job | i2v phrasing |
+|---|---|---|---|
+| `static` | no transform, tiny element float | let a stat/quote land | "locked-off static, only subtle paper flutter, text fixed" |
+| `push_in` | uniform scale-up (Ken Burns) | tension/focus | "very slow push in, text stays sharp and centered" |
+| `pull_out` | uniform scale-down | reveal / big picture | "slow pull out revealing the full scene, flat, steady" |
+| `pan` | translate across an over-wide poster | read a list/timeline | "slow horizontal pan, flat 2D, no perspective shift" |
+| `tilt` | vertical translate | reveal scale / countdown | "slow vertical tilt, flat parallax, steady" |
+| `parallax` | fg/mid/bg layers move at different speeds | the "living paper" signature | "subtle multi-layer parallax, paper layers drift at different speeds, 2.5D, flat" |
+| `element` | one cut-out slides/hinges in, others still | introduce/emphasize one item | "one paper element slides in from edge, others static, stop-motion feel" |
+
+**Bold / experimental (available, NOT banned):** `orbit`/`arc`, `dolly_zoom`, `roll/dutch`,
+`whip`. Verified 2026-07-10 to *tend to* warp the flat art / smear text — but they're a **style
+choice, not forbidden**. Use them with **`constraints: loose`** and **re-roll** until a
+take lands; save them for a beat where the effect earns it. In `strict` mode the guards will
+fight them (that's the point of the mode). `whip` also works well as a fast between-shot
+transition. If you just want a dolly-in's *feel* cleanly, a 2D `push_in` scales text as one
+piece and never warps.
+
+### Element motion (what moves inside — a SEPARATE axis from camera) ⭐ THE ENERGY ENGINE
+**We tested this on our own stack (2026-07-10) — it is where dynamism actually comes from, and
+rich motion is SAFE.** A single collage keyframe animated with "the goat bobs, both traders
+gesture, coins & shells scatter, AND a cut-out paper bird flaps across the whole frame" stayed
+perfectly flat, text intact — and looked great. The Tang film already did this (paper crane
+across frame). So **do NOT limit to one gentle verb.** `element_motion` is **AI's per-beat creative call — write
+what actually fits THIS scene**, and make it rich (multiple things moving). It is safe to be bold.
+Shot size gates it (WIDE → several elements move; CLOSE → that one thing animates strongly).
+- **Encouraged (safe + punchy):** multiple elements move at once · coins/petals/scraps scatter &
+ burst · elements pop/slide/flap/hinge in · drift · sway · flutter · pulse.
+- **A "hero" traveling element** (a bird/plane/coin/arrow flying across the frame) is a great
+ **occasional punch on a key beat — NOT every shot** (a flyer in every frame reads as a formula).
+ Use it where it earns the moment; let most beats just move their own elements richly.
+- **The ONLY real limits** (verified): keep it **rigid paper** (cut-outs slide/flap/scatter — no
+ organic melting/`morph`/`warp`/body-horror), keep **text stable**, keep **flat 2D**.
+- Camera and element motion are independent — one camera move + as much *element* motion as you like.
+
+### Anti-monotony (biggest quality lever)
+Every beat is a similar-looking poster, so **no two adjacent beats use the same camera move;
+alternate families (scale ↔ translate ↔ static); reserve `static` for the payoff/quote beat** so
+the motion drop signals "this is the point." Money-60s failed this (all 12 shots = push-in).
+
+**Move-rhythm presets (drop-in per arc):**
+- `hook_payoff` (8): push_in → pan → parallax → static → push_in → tilt → pull_out → static
+- `pas`/`bab` (6): push_in → static → pan → parallax → push_in → static
+- `listicle`: same move on every item (pan or tilt) but flip direction / parallax on #1; static on recap
+- `timeline`: pan the same direction beat-to-beat (feels like moving through time) → push_in on the turning point → pull_out on the takeaway
+
+## 4. Vocab tokens (copy-paste)
+
+```
+ARCS: hook_payoff pas bab aida storybrand how_it_works timeline man_in_hole
+ story_spine origin myth_buster listicle three_act story_circle
+HOOKS: mistake_callout pain_point surprising_stat direct_question urgent_warning
+ secret_reveal experiment_story pattern_interrupt outcome_tease
+SIZES: EST_WIDE WIDE MEDIUM CLOSE DETAIL
+MOVES: static push_in pull_out pan tilt parallax element (BANNED: orbit arc crane boom
+ pedestal dolly_zoom roll whip_pan handheld fast_zoom)
+ENDINGS: hard_cut quick_cta loop_close
+BEATS: 30s→6–8 @4–5s (~75w) · 60s→10–12 @5–6s (~140w) · hook ≤3s · change every 3–5s
+```
+
+## Sources (key)
+Story structure: StudioBinder (three-act, story-circle, story-structure), Pixar story spine
+(tckpublishing / sessionlab), Vonnegut shapes + Cornell 6-arc study (technologyreview). Ad
+frameworks: AIDA/PAS/BAB (soarai, swiftcopy), StoryBrand (innatemarketinggenius), per-second ad
+timing (benly.ai). Explainer/doc craft: Vox case studies (jasperpictures, storybench),
+mypromovideos, Ken Burns (masterclass). Hook/pacing/retention: go-viral.app, prepublish.ai,
+teleprompter.com, socialync.io, vidpros.com (clip length). Shots/coverage/editing: StudioBinder
+shot sizes & camera movements, learnaboutfilm coverage/sequence, insidetheedit (pacing).
diff --git a/references/local-engine.md b/references/local-engine.md
new file mode 100644
index 0000000..c08826e
--- /dev/null
+++ b/references/local-engine.md
@@ -0,0 +1,73 @@
+# Advanced: element-level motion collage (local keyframe engine)
+
+Use this when the standard whole-poster animation isn't dramatic enough — when you want the
+**pieces-fly-in-and-assemble** look (à la cr7v2), or you must animate **real people with full
+control and zero content filters**. The video model is not used here at all; frames are drawn
+locally, so nothing is blocked and everything is exact and reproducible.
+
+The tradeoff: it's **hands-on**. Cutting the pieces and hand-placing each element's keyframes
+is the bulk of the work — decomposition and hand-placement are where most of the time goes. The engine is
+reusable; the per-video layout is manual (until an LLM auto-layout layer exists).
+
+## Two stages
+
+### 1. `extract_elements.py` — cut the poster into pieces
+Reads `<project>/elements_spec.json`:
+```json
+{"card": "<poster.png>",
+ "elements": [
+ {"name": "hero", "bbox": [x0,y0,x1,y1], "mode": "cutout", "erase": [[x0,y0,x1,y1]]},
+ {"name": "title", "bbox": [x0,y0,x1,y1], "mode": "crop"}
+ ]}
+```
+- `crop` — rectangle kept as-is (newspaper strips, text blocks). Faster, cleaner.
+- `cutout` — crop → `youchuan/v8.1/remove-background` → transparent PNG (figures, trophies,
+ stickers).
+- `erase` — optional feathered regions to delete after cutout, in CARD coords. Needed when
+ the cutout drags in a neighbor (e.g. the player cutout also grabbed the trophy → erase the
+ trophy's box so it doesn't double with the separately-animated trophy).
+- Pick bboxes by overlaying a labeled grid on the poster and reading coordinates.
+- Clean residue: background-removal leaves color edges/ghosts — connected-components (keep the
+ largest blob), color-key, or geometric masks.
+
+### 2. `motion.py` — animate the pieces
+- **`Layer(img, keys, sway, pulse, shadow)`** — each element. `keys` is a list of
+ `dict(t, x, y, s, r, a, e)`: time, center x/y, scale, rotation, alpha, and the segment's
+ easing. `sway`+`pulse` add a low-frequency wobble / scale-breath so settled pieces aren't
+ dead-still.
+- **Easings**: `smooth/in/out` (normal), `back` (settle with slight overshoot — the paper
+ "snap" feel), `bounce` (drop-in). NOTE: `back` overshoots the target, so on scale it can dip
+ below 1.0 and briefly reveal a copy — use `out` for scale-settles over a full backdrop.
+- **Entrance helpers**: `fly_in(t0,x,y,W,H,frm,spin)` (off-screen fly + overshoot),
+ `slap(t0,x,y)` (from enlarged → snap in), `drop(...)` (bounce down),
+ `pop_settle(t0,x,y)` (focus-pop in place — opaque, scale 1.35→1.0, no off-screen travel, so
+ it never ghosts against a full backdrop).
+- **Procedural VFX** (drawn in code, keyed to the beat's palette): `starburst`, `Confetti`.
+ Confetti drifting throughout is a big part of the tactile energy.
+- **Camera**: `cam()` = slow zoom + impact shake (exponential-decay sine on entrances) + whip
+ between beats (sample from a 1.2× overscan canvas with directional blur — never affine
+ translate, or you reveal black edges).
+- **Render**: Pillow draws each frame, piped as rawvideo to ffmpeg. Supports `--only` to
+ re-render selected shots.
+
+## Making the assembly reconstruct the ORIGINAL poster
+
+The key lesson: if you scatter pieces into a *new* arrangement on a new background, the result
+stops looking like the source poster (the user will notice). To avoid that:
+- Elements rest at their **original positions** on the card (bbox center × canvas scale). The
+ canvas aspect must match the card (e.g. 3:4), so the assembled frame == the original poster.
+- Use the **original poster as the backdrop** so context/background matches.
+- **Placeholder problem**: before a flying element lands, its home spot on the backdrop would
+ show a copy (ghost). Dimming/lightening that region makes a visible dark/bright patch
+ (worse on off-color backgrounds). The fix that works: **blur that region only** — luminance
+ and color are preserved (no patch), and the sharp element flies in to "focus" it. Or inpaint
+ the region to clean background.
+
+## When NOT to bother
+If the content is non-real and "living poster" motion is enough, stay on the standard path —
+it's one prompt and fully automated. The local engine is worth it for hero pieces, real
+people, or when a client specifically wants the fragment-assembly aesthetic.
+
+Scripts: `extract_elements.py`, `motion.py`, plus `confetti.py` (overlay asset), `kenburns.py`
+(pure-ffmpeg fallback when no AI motion is available), and `mg_scrapbook.py` (a lighter
+"tilted cards on a desk + confetti + whip + ending layout" assembler).
diff --git a/references/models-and-gotchas.md b/references/models-and-gotchas.md
new file mode 100644
index 0000000..dd0e88b
--- /dev/null
+++ b/references/models-and-gotchas.md
@@ -0,0 +1,76 @@
+# Models & Gotchas
+
+Everything here was learned the hard way while building this pipeline. Read it before
+debugging — most failures are already solved below.
+
+## Model selection (verify IDs live first)
+
+`GET https://api.atlascloud.ai/api/v1/models` (no auth) → keep only `display_console: true`.
+Model schemas live at `https://static.atlascloud.ai/model/schema/<id-with-slashes-as-dashes>.json`
+under `components.schemas.Input`.
+
+| Job | Model | Price | Why |
+|---|---|---|---|
+| Keyframe / collage poster | `google/nano-banana-2/text-to-image` | ~$0.08 | best CN+EN text rendering; layered look |
+| Animate — non-real content | `google/gemini-omni-flash/image-to-video` | ~$0.13 | keeps on-screen text stable, layered/parallax motion |
+| Animate — **real people/brands** | `kwaivgi/kling-video-o3-pro/image-to-video` | ~$0.095 | the ONLY one that allows celebrities/logos |
+| Element cut-out (advanced) | `youchuan/v8.1/remove-background` | ~$0.086 | `image`=URL, submit via `generateImage` |
+| Narration | `xai/tts-v1` | ~$0.015 | clean multilingual TTS; `voice_id`, `language`, `speed` |
+| Music | `minimax/music-2.6` | ~$0.11 | `is_instrumental: true`; returns ~2min, trim in mix |
+| SFX (whoosh, ambience) | `bytedance/seed-audio-1.0` | ~$0.015 | describe the sound in the `text` field |
+
+### Content blocks (architecture-level, verified)
+Feeding a recognizable **real celebrity + brand logos** into a video model:
+- `gemini-omni-flash` (both image-to-video AND reference-to-video) → **blocked**:
+ "The prompt is blocked due to prohibited contents". Removing the name from the prompt,
+ converting PNG→JPG, or using a face-less silhouette does NOT help — it's the image content.
+- `bytedance/seedance-2.0` → **blocked**: "Content suspected of infringing digital rights"
+ (only an abstract silhouette passed).
+- `kwaivgi/kling-video-o3-pro` → **allows it.** Use Kling for real people.
+- The **local keyframe engine never hits this** (no video model in the loop) — the other way
+ through for real-person content.
+
+### Voice: why not seed-audio for plain narration
+`bytedance/seed-audio-1.0` is a general *audio-scene* model, not a plain TTS. Given bare
+narration with no pinned voice it adds pauses/SFX and produced wildly inconsistent lengths
+(same 3 lines: 22s / 14s / 12s vs xai-tts's clean 8.6 / 10.2 / 9.0s). It *can* do clean VO if
+you pin a `speaker` and strip em-dashes (the playbook used it for a Chinese male VO). Default
+to `xai/tts-v1` for narration; reach for seed-audio for Chinese-specific voices, voice
+cloning (`references`), or SFX like transition whooshes.
+
+## API gotchas (Atlas, behind a proxy)
+
+1. **Every request MUST send a real `User-Agent` header** — default Python `urllib` UA is
+ blocked by the WAF → 403 Forbidden. (`scripts/atlas.py` sets one.)
+2. **Download generated assets with curl, not urllib** — the OSS host behind the local proxy
+ kills `urlretrieve` with `RemoteDisconnected`.
+3. **Audio/TTS/music/video all submit via `POST /api/v1/model/generateVideo`**, image &
+ background-removal via `/generateImage`; poll `/model/prediction/{id}`.
+ (A playbook noted a `/generateAudio` endpoint — go by what the live schema/API accepts.)
+4. **A failed generation makes the prediction GET return HTTP 500** (not a clean
+ `status:failed`) — treat a persistent 500 on poll as a failure, and read `message` for the
+ reason.
+5. POST generation calls are **not** retried (they create billable tasks); GET polls are.
+
+## ffmpeg gotchas (this machine's build)
+
+The local ffmpeg is minimal: **no libass, no drawtext** (no libfreetype). So:
+- **Captions & watermark → render PNGs with Pillow and composite via `overlay`**
+ (`scripts/text_overlay.py`). Size text by `min(W,H)` so it works in 16:9 and 9:16.
+- **Off-aspect clips** (e.g. a 3:4 card in a 9:16 frame): use a blurred-cover background +
+ fitted sharp foreground via `overlay`, not black bars.
+- **Slow, don't freeze**: if a clip is shorter than its narration-driven segment, stretch it
+ with `setpts` to fill instead of `tpad` freezing the last frame.
+- **`blend` needs both inputs in the same pixel format** — convert both to `gbrp` before a
+ `screen` blend (confetti overlay) or the whole frame turns magenta.
+- **`sidechaincompress` output length follows its sidechain** — `apad` the narration track to
+ the full duration, or `-shortest` will cut a music-only ending (e.g. a scrapbook outro).
+- **Whip transitions**: `xfade` slides between shots; recompute each beat's start time
+ (each transition overlaps by the transition duration) so narration/captions stay in sync.
+- **Verify by extracting frames** — you can't read an mp4's content. `mjpeg` refuses
+ full-range YUV, so add `format=yuvj420p` when grabbing jpgs.
+
+## Cost
+
+A ~30s standard film ≈ **$0.8–1.0** (6 keyframes + 6 clips + VO + music). The element-level
+advanced path is pricier (~$1.5) because of ~15 background-removal calls.
diff --git a/references/prompt-guide.md b/references/prompt-guide.md
new file mode 100644
index 0000000..8acaa73
--- /dev/null
+++ b/references/prompt-guide.md
@@ -0,0 +1,134 @@
+# Prompt Guide — the heart of the Vox collage look
+
+Two prompts decide whether the film reads as a real Vox collage or a moving poster: the
+**image prompt** (makes the collage look) and the **video/motion prompt** (makes it move like
+collage). Get these right and the rest is plumbing.
+
+- [1. Image prompt — 5-part structure](#1-image-prompt)
+- [2. Video / motion prompt — 5-axis structure](#2-video-prompt)
+- [3. Why layering the image is what unlocks good AI motion](#3-layering)
+- [4. Real people](#4-real-people)
+
+---
+
+## 1. Image prompt
+
+The collage look is *born here*. On the standard (whole-poster-animation) path this single
+image carries the entire aesthetic, so invest in it. Structure every image prompt in 5 parts:
+
+```
+[1 STYLE BLOCK — identical on every beat]
+ Mixed-media hand-cut PAPER COLLAGE, editorial zine style. Torn/scissor-cut paper edges,
+ tape corners, halftone print dots, newspaper clippings, paper-stencil shapes, real paper
+ drop shadows. Figures are PRINTED-texture cut-outs of real imagery (photo / woodblock /
+ mural), NOT CGI, NOT a 3D render — keep print grain and paper imperfections. High-contrast.
+
+[2 SCENE — describe as SEPARATE cut-out pieces]
+ SCENE as layered paper cut-outs: {main subject}, {a prop}, {a text strip}, {a decorative
+ scrap}; elements have clear edges, distinct layers, each with its own drop shadow.
+
+[3 BACKGROUND — one bold flat color]
+ on a bold flat {bg color} paper background.
+
+[4 HEADLINE — baked in, short + bold]
+ A torn-paper banner with a big bold headline "{TITLE}" (+ small subtitle), plus a red seal.
+
+[5 TECH]
+ aspect ratio {16:9|9:16|3:4}, 2k resolution.
+```
+
+### Techniques
+- **Reuse the style block verbatim on every beat.** Only the scene, bg color and headline
+ change. This is what makes 6 different beats feel like one film.
+- **Describe distinct pieces with visible edges + shadows.** Two reasons: it looks assembled
+ (collage, not a smooth painting), and it gives the *video* model separable layers to
+ parallax (see §3). A blended scene can only be panned as one flat plane.
+- **Bake the headline text into the image** — image models render crisp text; video models
+ smear it. Keep it short, bold, 2–3 words.
+- **Bold flat background color, one per beat.** Busy backgrounds muddy the cut-out silhouettes
+ and kill the Vox punch. Let the palette travel across beats to carry mood (see the color
+ axis below): e.g. aged sepia → bold pop colors → champion gold.
+- **Say "NOT 3D / NOT CGI, printed texture, keep grain"** or the model drifts toward smooth
+ render-CGI and loses the paper feel.
+- **2k** so cut-outs stay crisp if scaled/animated.
+- Keep a **consistent paper-texture language** across beats (edge roughness, halftone
+ density); color can change, texture shouldn't.
+
+### Worked example (2008 "KING OF EUROPE" beat, deep-red)
+> Mixed-media hand-cut PAPER COLLAGE, editorial zine style; torn edges, tape, halftone dots,
+> newspaper clippings, paper-stencil texture, real drop shadows; PRINTED-texture cut-outs, NOT
+> 3D/CGI, keep print grain. SCENE as layered paper cut-outs: a roaring footballer in a red
+> kit, a gold trophy, a big cut-out "7", a torn "KING OF EUROPE" newspaper strip, a club
+> crest, scattered geometric scraps — clear edges and drop shadows. Bold flat deep-red paper
+> background. Torn-paper banner headline "KING OF EUROPE" + small subtitle, red seal. 3:4, 2k.
+
+---
+
+## 2. Video prompt
+
+The motion prompt turns "pan a poster" into "a living collage". Use the **5-axis** structure
+(this is the structure from the reference cr7 Omni prompt — all five axes matter, especially
+**feel** and **color**, which set mood and palette movement):
+
+```
+[GOAL] Animate this still into a mixed-media collage MOTION GRAPHIC. Keep it flat 2D paper,
+ NOT 3D, no photoreal.
+
+[AXIS 1 · CAMERA] one smooth continuous move for this shot: {slow push-in | lateral
+ parallax pan | slow rise}.
+[AXIS 2 · MOVEMENT] layered paper cut-outs drift with visible drop-shadow parallax; elements
+ and geometric scraps bob/settle gently on the beat; halftone dots pulse;
+ torn edges and tape flutter; a breathing quality.
+[AXIS 3 · AESTHETIC]preserve the torn-paper / tape / halftone / newspaper / paper-stencil
+ textures exactly; keep the bold flat background.
+[AXIS 4 · FEEL] {emotional tone of this beat} — e.g. tender / triumphant / cinematic
+ editorial, "a page from a scrapbook".
+[AXIS 5 · COLOR] {this beat's palette}, high contrast; if part of an arc, name where it
+ sits (aged sepia → bold pop → champion gold).
+
+[CONSTRAINTS] keep the layout, the seal and ALL on-screen text perfectly stable and legible;
+ ONE smooth continuous move — absolutely NO sudden zoom snaps, NO jump-cuts, NO
+ teleporting/re-framing inside the shot; no new objects, no morphing, no drift.
+```
+
+### Techniques
+- **The MOVEMENT axis is the lever** that makes Omni move *layers* (parallax) instead of
+ sliding the whole frame. Name the layered paper motion explicitly.
+- **FEEL and COLOR are not decoration** — they steer the model's pacing and grade. A "tender,
+ sepia" beat animates slower and warmer than a "triumphant, gold" beat. Don't drop them.
+- **The CONSTRAINTS axis prevents the common breaks**: text wobble, 3D drift, and the big one
+ — internal jump-cuts.
+- **Never write "snap / punch-in / slam / quick zoom".** Omni over-reacts and generates a
+ jump *inside* the shot that reads as a one-frame flash. Ask for ONE smooth continuous move.
+- **Don't rely on the video model for text** — it's already baked in the keyframe; just tell
+ the model to keep it stable.
+- **One move per shot.** For richer editing, cut between multiple short shots (wide + detail)
+ rather than asking one clip to do a complex timeline.
+
+---
+
+## 3. Layering
+
+Common question: *"can I feed a background + separate component images to the video model to
+get dramatic component motion?"* In practice, no — Omni/Kling `reference-to-video` is
+**generative**, not a layer compositor: it reinterprets the refs and invents its own motion,
+so you get *less* control, not more. For controlled per-element choreography, use the local
+engine (`references/local-engine.md`).
+
+But there's a real lever within the standard path: **the more clearly layered your keyframe
+is, the more layered motion the video model can produce.** Distinct cut-outs with edges and
+shadows → the model can drift them at different depths (parallax) → "living collage". A flat,
+blended image → only a whole-frame pan is possible. So push the *layering* in the image
+prompt (§1) if you want livelier auto-motion.
+
+---
+
+## 4. Real people
+
+Real-person keyframes are fine to *generate* (use web-search grounding or a reference photo
+with an edit model to anchor the face). The catch is *animation*: Google (Omni) and ByteDance
+(Seedance) refuse recognizable celebrities / brand logos ("prohibited contents" /
+"digital-rights"). Two ways through:
+- **Kling O3 pro** allows real people — set it as `video_model` (simplest).
+- **Local engine** — animating cut-outs frame-by-frame never touches a video model's content
+ filter, and gives full control. Best when you also want dramatic element choreography.
diff --git a/references/vocab-bank.md b/references/vocab-bank.md
new file mode 100644
index 0000000..b5aab41
--- /dev/null
+++ b/references/vocab-bank.md
@@ -0,0 +1,108 @@
+# Prompt Vocabulary Bank (image + video) — for building theme presets
+
+Distilled from the official prompt guides of Midjourney, Flux, Google Nano-Banana/Gemini,
+OpenAI, Ideogram (image) and Runway, Kling, ByteDance Seedance, Google Veo, OpenAI Sora,
+Luma (video), plus StudioBinder/Swiss/riso design references. Use it two ways: (1) mix a
+dimension's terms to compose a keyframe/motion prompt; (2) combine dimensions into named
+**theme presets** (see the bottom table).
+
+Everything here sits on top of the **common Vox constraints** (never drop these):
+> torn/scissor-cut paper edges · tape · halftone dots · newspaper clippings · paper-stencil
+> shapes · real paper drop-shadows · bold flat color · PRINTED/illustrated cut-outs · **NOT
+> 3D, NOT CGI, NOT photoreal** · keep print grain · headline text baked in **"quotes"**.
+
+---
+
+## PART A — IMAGE dimensions
+
+Our old prompt only had: style-idiom + collage-mechanics + scene + headline + aspect. Add these.
+
+| Dimension | Controls | Vocab bank (mix & match) |
+|---|---|---|
+| **Medium/technique** | the strongest style lever | paper collage · torn-paper collage · photomontage · screenprint · **risograph** · letterpress · linocut/woodcut · lithograph · halftone print · gouache · flat vector · photocopy/xerox · rubber-stamp |
+| **Art movement / era** ⭐ | single best "theme knob" — shifts palette+type+layout at once | Swiss/International Typographic · Bauhaus · mid-century modern · Russian Constructivism · Dada photomontage · Pop Art · psychedelic '60s · punk zine · Memphis · Art Deco · WPA/vintage travel poster · Soviet · atomic-age · retro-futurism |
+| **Composition/layout** ⭐ | poster hierarchy + negative space | modular grid · asymmetric · strong negative space · diagonal dynamic · foreground–midground–background depth · hero headline + subhead hierarchy · full-bleed · radial · stacked bands · off-center focal |
+| **Color palette** ⭐ | cleanest theme distinguisher (stops muddy gradients) | limited 2–3 color · duotone · monochrome + 1 accent · **riso fluorescent-pink + federal-blue** · Bauhaus primaries (red/yellow/blue) · '70s mustard/rust/avocado · '60s pop (hot-pink/orange) · teal-&-orange · CMYK process · cream/kraft base · neon-on-black · named hex (e.g. `#0047AB`) |
+| **Typography treatment** ⭐ | headline LOOK (we only passed the words) | **put exact words in "quotes"** + name a REAL type style: bold condensed grotesque (Helvetica/Akzidenz) · geometric sans (Futura/Bauhaus) · slab serif · '70s display serif · wood-type · hand-lettered · **ransom-note cut-out letters** · stencil · all-caps · knockout/reversed · huge headline + small caption |
+| **Print finish / texture** | "made by hand, not AI-slick" | halftone dots · **Ben-Day dots** · riso ink misregistration/overprint · letterpress deboss · newsprint · kraft/cardstock · aged/foxed paper · fold creases · coffee stains · deckled vs scissor-cut edges |
+| **Lighting / capture** | keeps it "scanned" not "rendered" (anti-3D) | flat even studio light · shadowless scanned-document light · straight-on/head-on · flat-lay top-down · subtle paper drop-shadows |
+| **Mood** | tone anchor | playful · bold · urgent · editorial/serious · nostalgic · optimistic · ominous · satirical · activist/protest |
+
+**Image prompt structure** (consensus of Nano-Banana/Ideogram/OpenAI/Flux — Ideogram is
+"format-first", best for baked text):
+`[MEDIUM] + [ART MOVEMENT/ERA] of [SUBJECT + SCENE], [COMPOSITION/hierarchy/negative space],
+[straight-on scanned-flat framing] + [flat even light, paper drop-shadows], [named limited COLOR
+PALETTE], [PRINT FINISH/texture], headline "EXACT WORDS" in [NAMED TYPE STYLE] [placement], [MOOD],
+[aspect]` — then per model: Omni/Nano-Banana/Flux/DALL·E take **no negatives** (phrase positively);
+SDXL needs a negative field; Midjourney uses `--no` + params last.
+Sources: Nano-Banana https://deepmind.google/models/gemini-image/prompt-guide/ · Ideogram
+https://docs.ideogram.ai/using-ideogram/prompting-guide/2-prompting-fundamentals · OpenAI
+https://developers.openai.com/cookbook/examples/multimodal/image-gen-models-prompting-guide · Flux
+https://docs.bfl.ml/guides/prompting_summary · Midjourney https://docs.midjourney.com/hc/en-us/articles/32859204029709-Parameter-List
+
+---
+
+## PART B — VIDEO dimensions
+
+Our old 5-axis (camera/movement/aesthetic/feel/color + constraints) is missing the axes that
+control STABILITY. Add these — they fix the loop / text-wobble / morph we hit.
+
+| Axis | Controls | Vocab / phrasing |
+|---|---|---|
+| **Motion amplitude** ⭐⭐ | THE anti-morph/anti-text-warp lever | `very subtle` · `minimal` · `moderate` · "~5% movement" · avoid `intense/large/explosive` near text |
+| **Camera move** | how the camera travels | **safe for flat paper:** static/locked-off · slow push-in/pull-out · slow pan/tilt · subtle parallax truck. **AVOID (bend 2D into fake 3D):** orbit · crane · dolly-zoom · roll · 3D arc |
+| **Shot size / angle** | framing | full poster in frame (default) · slow push to a detail · **eye-level straight-on (default)** · overhead (reads as paper on a table) |
+| **Element motion** | what moves inside | **safe paper-native verbs:** drift · sway · ripple · flutter · slide · pivot (rigid) · bob · pulse · shimmer · settle · parallax between layers. **AVOID:** warp · transform · morph · vortex · explode |
+| **Speed / easing** | tempo | slow · gentle · continuous · ease-in-ease-out · (risky: quick/snap/whip) |
+| **Lighting-over-time** | best "safe motion" for flat art | soft light sweep across the surface · gentle shadow drift · subtle flicker/glow pulse |
+| **Dimensional lock** ⭐ | keep it flat | "flat 2D, camera parallel to the poster, no 3D rotation, no perspective change; paper layers parallax only, elements slide/pivot as rigid flat paper, do not bend or morph" |
+| **Stability anchors** ⭐⭐ | protect text/layout | "the printed headline, logo and layout stay sharp, legible and perfectly stable — do not redraw, distort or move the lettering" |
+| **Shot structure** | cuts / loop | "single continuous shot, no cuts, no scene changes" · one-way: add a **motion endpoint** ("…then settles into place") · seamless loop: say "looping video" (Luma) |
+
+### The best-practice rules that fix our bugs (all from official guides)
+1. **Describe motion, not the picture.** The still already has subject/scene/text/style —
+ restating them (esp. the text) makes the model re-synthesize and warp them. (Runway, Veo, Kling.)
+2. **One camera move + one action per shot.** Multiple simultaneous moves = instability/morph.
+ (Sora, Seedance: "specify only 1 type of camera movement… increases image instability".)
+3. **Keep amplitude small; motion physically plausible.** (Kling, Seedance: "slow, gentle,
+ coherent subtle movements… avoid high-burst, large-dynamic actions".)
+4. **Positive phrasing only for Omni/Veo/Runway** — "no/don't" backfires ("may result in the
+ opposite"). **Kling & Seedance DO support negative prompts.** Know your model.
+5. **Text:** don't ask the video model to render text; anchor it as stable; keep motion away
+ from the text region; **for critical text, overlay in post.** (Cross-source.)
+6. **Anti-loop:** give a one-way move a settle endpoint, or say "single continuous"; short
+ clips shouldn't over-script per-second beats. (Kling, Runway Gen-4.)
+7. **Flat-collage:** name the style ("flat 2D paper cutout animation, rigid paper layers")
+ and lock dimensionality → steers the model away from 3D morphing. (Storyblocks + rules above.)
+
+**Video prompt structure** (I2V, adapted): `[SHOT SIZE+ANGLE] + [CAMERA MOVE + AMPLITUDE] +
+[ELEMENT MOTION + SPEED/EASING] + [LIGHTING-OVER-TIME] + [AESTHETIC/TEXTURE + DIMENSIONAL LOCK] +
+[FEEL] + [COLOR] + [STABILITY ANCHORS] + [SHOT STRUCTURE/LOOP]`.
+Sources: Runway https://help.runwayml.com/hc/en-us/articles/39789879462419 · Kling I2V
+https://kling.ai/quickstart/image-to-video-guide · Seedance https://docs.byteplus.com/en/docs/ModelArk/2222480 ·
+Veo https://cloud.google.com/blog/products/ai-machine-learning/ultimate-prompting-guide-for-veo-3-1 ·
+Sora https://developers.openai.com/cookbook/examples/sora/sora2_prompting_guide · StudioBinder camera
+glossary https://www.studiobinder.com/blog/different-types-of-camera-movements-in-film/
+
+---
+
+## PART C — Building THEME PRESETS (combine the dimensions)
+
+A **theme preset** = one pick from each image dimension + a motion preset, on top of the common
+Vox constraints. This is how we offer "different theme options" without hand-writing each prompt.
+
+| Preset | Era/movement | Palette | Type style | Print finish | Motion preset | Fits topics |
+|---|---|---|---|---|---|---|
+| `american-retro` | 1950s US ad/pulp | bold retro primaries | wood-type / bold slab | halftone, aged | punchy | ads, sports, business, money |
+| `swiss-modern` | Swiss/Intl Typographic | 2-color + red accent | Helvetica/Akzidenz grotesk | clean flat, subtle grain | calm | tech, finance, explainers |
+| `punk-zine` | 90s punk/DIY | B&W + 1 spot color | ransom-note cut letters | photocopy, misregistration | punchy/max | rebellion, music, counterculture |
+| `soviet-constructivist` | Russian Constructivism | red/black/cream | bold condensed diagonal | letterpress, newsprint | punchy | politics, revolution, industry |
+| `wpa-propaganda` | 1930s WPA poster | muted 3-color | stencil / gothic | screenprint grain | calm | history, labor, public health |
+| `70s-groovy` | 1970s | mustard/rust/avocado | bulbous display serif | riso grain | punchy | culture, food, nostalgia |
+| `chinese-ink` | Chinese woodblock/ink | ink + vermilion | Chinese brush + red seal | rice-paper, seal | calm/punchy | Chinese history/culture |
+| `atomic-age` | 1950s futurism | teal/orange/cream | atomic script | halftone | punchy | science, space, future |
+
+**How to use:** Claude reads the topic → suggests 3–4 fitting presets (or composes a new one by
+mixing the banks above) → `style_bakeoff.py` renders one beat in each → the user picks. The picked
+preset's fields drop into the image prompt (via `collage_style` + palette/type/finish) and its
+`motion_style` into the video prompt. The common Vox constraints and stability anchors are always on.
diff --git a/scripts/assemble.py b/scripts/assemble.py
new file mode 100644
index 0000000..eddb7ca
--- /dev/null
+++ b/scripts/assemble.py
@@ -0,0 +1,154 @@
+#!/usr/bin/env python3
+"""
+Assembly stage (ffmpeg): multi-shot clips + per-beat narration + music -> final.mp4
+
+Model: beats -> shots. Each shot is one short clip (its own cut). Narration and
+captions are per BEAT and span all the beat's shots, so the voice stays aligned
+while the visuals cut. BGM is ducked under the narration. Captions + watermark
+are Pillow PNGs composited with `overlay` (this ffmpeg has no libass/drawtext).
+
+Usage: python3 assemble.py <project_dir> (default: out/tang-30s)
+"""
+import json
+import os
+import subprocess
+import sys
+
+import text_overlay
+
+FPS, TAIL = 24, 0.5
+WATERMARK = "Made with Atlas Cloud · vox-director"
+RES = {"16:9": (1920, 1080), "9:16": (1080, 1920), "1:1": (1080, 1080)}
+
+
+def ff(args):
+ subprocess.run(["ffmpeg", "-y", "-loglevel", "error", *args], check=True)
+
+
+def probe_dur(path):
+ out = subprocess.run(["ffprobe", "-v", "error", "-show_entries", "format=duration",
+ "-of", "csv=p=0", path], capture_output=True, text=True).stdout
+ try:
+ return float(out.strip())
+ except ValueError:
+ return 0.0
+
+
+def shots_of(beat):
+ if beat.get("shots"):
+ for s in beat["shots"]:
+ yield s
+ else:
+ yield beat
+
+
+def run(project_dir):
+ with open(os.path.join(project_dir, "beats.json")) as f:
+ doc = json.load(f)
+ beats = doc["beats"]
+ W, H = RES.get(doc.get("aspect", "16:9"), (1920, 1080))
+ wm_text = doc.get("watermark", WATERMARK)
+ tmp = os.path.join(project_dir, "_seg")
+ os.makedirs(tmp, exist_ok=True)
+
+ # ---- flatten shots into timed segments; track each beat's span ----
+ segs = [] # {clip, dur}
+ beat_spans = [] # {start, dur, beat}
+ t = 0.0
+ for beat in beats:
+ beat_start = t
+ shot_list = list(shots_of(beat))
+ # ensure the beat covers its narration (extend last shot if needed)
+ durs = [float(s.get("dur", 10)) for s in shot_list]
+ need = float(beat.get("narration_dur", sum(durs))) + TAIL
+ if sum(durs) < need:
+ durs[-1] += need - sum(durs)
+ for s, d in zip(shot_list, durs):
+ segs.append({"clip": s["clip_path"], "dur": round(d, 2)})
+ t += d
+ beat_spans.append({"start": beat_start, "dur": round(t - beat_start, 2), "beat": beat})
+ total = round(t, 2)
+
+ # ---- 1) normalise each shot to a silent segment of exactly its dur ----
+ seg_files = []
+ for i, s in enumerate(segs):
+ out = os.path.join(tmp, f"seg_{i:02d}.mp4")
+ # If the clip is shorter than the segment (narration longer than the AI
+ # clip), slow it to fill instead of freezing the last frame.
+ cd = probe_dur(s["clip"])
+ factor = s["dur"] / cd if cd > 0 else 1.0
+ pre = f"setpts={factor:.4f}*PTS," if factor > 1.02 else ""
+ # blurred-fill background so off-aspect clips (e.g. 3:4 card in 9:16) get a
+ # nice bg instead of black bars; for matching-aspect clips the fg fills fully.
+ fc = (f"[0:v]{pre}split[s0][s1];"
+ f"[s0]scale={W}:{H}:force_original_aspect_ratio=increase,crop={W}:{H},"
+ f"boxblur=26:2,eq=brightness=-0.05[bg];"
+ f"[s1]scale={W}:{H}:force_original_aspect_ratio=decrease[fg];"
+ f"[bg][fg]overlay=(W-w)/2:(H-h)/2,setsar=1,fps={FPS},"
+ f"tpad=stop_mode=clone:stop_duration=1[v]")
+ ff(["-i", s["clip"], "-an", "-filter_complex", fc, "-map", "[v]", "-t", f"{s['dur']}",
+ "-c:v", "libx264", "-pix_fmt", "yuv420p", out])
+ seg_files.append(out)
+
+ # ---- 2) concat all shot segments (video only) ----
+ listf = os.path.join(tmp, "list.txt")
+ with open(listf, "w") as f:
+ for s in seg_files:
+ f.write(f"file '{os.path.abspath(s)}'\n")
+ body = os.path.join(tmp, "body_silent.mp4")
+ ff(["-f", "concat", "-safe", "0", "-i", listf, "-c", "copy", body])
+
+ # ---- 3) captions (per beat) + watermark PNGs ----
+ cap_pngs = []
+ for bs in beat_spans:
+ p = os.path.join(tmp, f"cap_{bs['beat']['id']}.png")
+ text_overlay.render_caption(bs["beat"]["narration"], p, W, H)
+ cap_pngs.append(p)
+ wm_png = text_overlay.render_watermark(wm_text, os.path.join(tmp, "wm.png"), W, H)
+
+ # ---- 4) one pass: overlay captions+wm, mix per-beat narration, duck BGM ----
+ nb = len(beat_spans)
+ inputs = ["-i", body] # 0
+ for p in cap_pngs:
+ inputs += ["-i", p] # 1..nb
+ inputs += ["-i", wm_png] # nb+1
+ narr_base = nb + 2
+ for bs in beat_spans:
+ inputs += ["-i", bs["beat"]["narration_audio"]] # narr inputs
+ bgm_idx = narr_base + nb
+ inputs += ["-i", doc["bgm_path"]]
+
+ chain, prev = [], "[0:v]"
+ for i, bs in enumerate(beat_spans):
+ s, e = bs["start"] + 0.2, bs["start"] + bs["dur"] - 0.1
+ lbl = f"[v{i+1}]"
+ chain.append(f"{prev}[{i+1}:v]overlay=0:0:enable='between(t,{s:.2f},{e:.2f})'{lbl}")
+ prev = lbl
+ chain.append(f"{prev}[{nb+1}:v]overlay=0:0[v]")
+
+ # per-beat narration delayed to its start, then mixed
+ nlabels = []
+ for i, bs in enumerate(beat_spans):
+ ms = int(bs["start"] * 1000)
+ chain.append(f"[{narr_base+i}:a]adelay={ms}:all=1[n{i}]")
+ nlabels.append(f"[n{i}]")
+ # pad the narration mix to the FULL duration, else sidechaincompress follows the (shorter)
+ # narration length and -shortest clips the tail (e.g. a silent payoff/ending beat).
+ chain.append(f"{''.join(nlabels)}amix=inputs={nb}:normalize=0:duration=longest,apad,atrim=0:{total}[narrmix]")
+ # a filter-output label can only be consumed once -> split narration in two
+ chain.append("[narrmix]asplit=2[narrA][narrB]")
+ chain.append(f"[{bgm_idx}:a]atrim=0:{total},volume=0.9,afade=t=out:st={max(total-2,0):.2f}:d=2[bgt]")
+ chain.append("[bgt][narrA]sidechaincompress=threshold=0.02:ratio=12:attack=5:release=350[bgd]")
+ chain.append(f"[narrB][bgd]amix=inputs=2:normalize=0:duration=longest,volume=1.4,atrim=0:{total}[a]")
+ filt = ";".join(chain)
+
+ final = os.path.join(project_dir, "final.mp4")
+ ff([*inputs, "-filter_complex", filt, "-map", "[v]", "-map", "[a]",
+ "-c:v", "libx264", "-pix_fmt", "yuv420p", "-c:a", "aac", "-shortest", final])
+ print("FINAL:", final, f"(~{total}s, {len(segs)} shots)")
+
+
+if __name__ == "__main__":
+ proj = sys.argv[1] if len(sys.argv) > 1 else os.path.join(
+ os.path.dirname(__file__), "..", "out", "tang-30s")
+ run(os.path.abspath(proj))
diff --git a/scripts/atlas.py b/scripts/atlas.py
new file mode 100644
index 0000000..6073e69
--- /dev/null
+++ b/scripts/atlas.py
@@ -0,0 +1,167 @@
+#!/usr/bin/env python3
+"""
+Atlas Cloud API client for vox-director.
+
+Thin, dependency-free wrapper around the Atlas Cloud Media Generation API
+(image / video / upload) plus the OpenAI-compatible LLM endpoint.
+
+Hard-won gotchas baked in:
+ 1. Every request MUST send a real User-Agent header — the default urllib UA
+ is blocked by the WAF and returns 403 Forbidden.
+ 2. Generated assets live on OSS behind the user's local proxy; python's
+ urlretrieve dies with "Remote end closed connection". Download via curl.
+ 3. POST generation calls are NOT retried (they create billable tasks).
+ GET polls are safe to retry.
+
+Env: ATLASCLOUD_API_KEY must be set.
+"""
+import json
+import os
+import subprocess
+import time
+import urllib.request
+import urllib.error
+
+MEDIA_BASE = "https://api.atlascloud.ai/api/v1"
+LLM_BASE = "https://api.atlascloud.ai/v1"
+UA = "vox-director/0.1 (+https://atlascloud.ai)"
+
+
+class AtlasError(RuntimeError):
+ pass
+
+
+def _key() -> str:
+ k = os.environ.get("ATLASCLOUD_API_KEY")
+ if not k:
+ raise AtlasError("ATLASCLOUD_API_KEY is not set. Get one at "
+ "https://www.atlascloud.ai/console/api-keys")
+ return k
+
+
+def _headers(json_body: bool = True) -> dict:
+ h = {"Authorization": f"Bearer {_key()}", "User-Agent": UA}
+ if json_body:
+ h["Content-Type"] = "application/json"
+ return h
+
+
+def _post(path: str, payload: dict, base: str = MEDIA_BASE, timeout: int = 60) -> dict:
+ req = urllib.request.Request(base + path, data=json.dumps(payload).encode(),
+ headers=_headers(), method="POST")
+ try:
+ with urllib.request.urlopen(req, timeout=timeout) as r:
+ return json.load(r)
+ except urllib.error.HTTPError as e:
+ raise AtlasError(f"POST {path} -> {e.code}: {e.read().decode()[:400]}") from e
+
+
+def _get(path: str, base: str = MEDIA_BASE, timeout: int = 60, retries: int = 3) -> dict:
+ last = None
+ for i in range(retries):
+ try:
+ req = urllib.request.Request(base + path, headers=_headers(json_body=False))
+ with urllib.request.urlopen(req, timeout=timeout) as r:
+ return json.load(r)
+ except (urllib.error.URLError, TimeoutError) as e: # transient
+ last = e
+ time.sleep(2 ** i)
+ raise AtlasError(f"GET {path} failed after {retries} tries: {last}")
+
+
+# ---------------------------------------------------------------- generation
+
+def submit_image(model: str, prompt: str, **params) -> str:
+ """Submit an image generation task; return prediction id."""
+ body = {"model": model, "prompt": prompt, **params}
+ return _post("/model/generateImage", body)["data"]["id"]
+
+
+def submit_video(model: str, prompt: str, **params) -> str:
+ """Submit a video generation task; return prediction id.
+
+ For image-to-video pass image="<url>"; for reference-to-video pass
+ images=["<url>", ...] (1-5 refs).
+ """
+ body = {"model": model, "prompt": prompt, **params}
+ return _post("/model/generateVideo", body)["data"]["id"]
+
+
+def submit_media(model: str, **params) -> str:
+ """Submit any media task that runs through the generateVideo endpoint
+ (audio/TTS, music, etc.); return prediction id."""
+ body = {"model": model, **params}
+ return _post("/model/generateVideo", body)["data"]["id"]
+
+
+def poll(prediction_id: str, interval: int = 3, timeout_s: int = 900) -> str:
+ """Poll a prediction until done; return the first output URL."""
+ deadline = time.time() + timeout_s
+ while time.time() < deadline:
+ time.sleep(interval)
+ d = _get(f"/model/prediction/{prediction_id}").get("data", {})
+ status = d.get("status", "?")
+ if status in ("completed", "succeeded"):
+ out = d.get("outputs") or d.get("output")
+ if isinstance(out, str):
+ out = [out]
+ if not out:
+ raise AtlasError(f"{prediction_id}: completed but no output")
+ return out[0]
+ if status == "failed":
+ raise AtlasError(f"{prediction_id} failed: {json.dumps(d)[:300]}")
+ raise AtlasError(f"{prediction_id} timed out after {timeout_s}s")
+
+
+def image(model: str, prompt: str, **params) -> str:
+ """Blocking image generation -> output URL."""
+ return poll(submit_image(model, prompt, **params), interval=3, timeout_s=180)
+
+
+def video(model: str, prompt: str, **params) -> str:
+ """Blocking video generation -> output URL."""
+ return poll(submit_video(model, prompt, **params), interval=4, timeout_s=900)
+
+
+# ---------------------------------------------------------------- upload / dl
+
+def upload(file_path: str) -> str:
+ """Upload a local file, return its public URL. Uses curl (multipart)."""
+ out = subprocess.run(
+ ["/usr/bin/curl", "-s", "-X", "POST", f"{MEDIA_BASE}/model/uploadMedia",
+ "-H", f"Authorization: Bearer {_key()}", "-H", f"User-Agent: {UA}",
+ "-F", f"file=@{file_path}"],
+ capture_output=True, text=True, check=True).stdout
+ data = json.loads(out).get("data", {})
+ url = data.get("download_url") or data.get("url")
+ if not url:
+ raise AtlasError(f"upload failed: {out[:300]}")
+ return url
+
+
+def download(url: str, dest: str) -> str:
+ """Proxy-safe download via curl (urllib breaks on the OSS host)."""
+ subprocess.run(["/usr/bin/curl", "-s", "--retry", "3", "-o", dest, url], check=True)
+ if not os.path.exists(dest) or os.path.getsize(dest) == 0:
+ raise AtlasError(f"download produced empty file: {url}")
+ return dest
+
+
+# ---------------------------------------------------------------- llm
+
+def chat(model: str, messages: list, **params) -> str:
+ """OpenAI-compatible chat completion -> assistant text."""
+ body = {"model": model, "messages": messages, **params}
+ resp = _post("/chat/completions", body, base=LLM_BASE, timeout=120)
+ return resp["choices"][0]["message"]["content"]
+
+
+if __name__ == "__main__":
+ # smoke test: confirm key + UA work
+ import sys
+ print("key:", "set" if os.environ.get("ATLASCLOUD_API_KEY") else "MISSING")
+ if "--ping" in sys.argv:
+ url = image("google/nano-banana-2/text-to-image",
+ "a tiny red seal stamp on white paper, minimalist",
+ aspect_ratio="1:1", resolution="1k")
+ print("image ok:", url)
diff --git a/scripts/audio.py b/scripts/audio.py
new file mode 100644
index 0000000..bbdcc27
--- /dev/null
+++ b/scripts/audio.py
@@ -0,0 +1,108 @@
+#!/usr/bin/env python3
+"""
+Audio stage: per-beat narration (one consistent voice) + one instrumental BGM.
+
+Narration uses Seed-Audio's instruct style: a fixed voice descriptor is given
+before `says:` so only the quoted line is spoken, in the same voice every beat
+(this is how vox-director sidesteps Omni's clip-to-clip voice drift).
+
+Usage: python3 audio.py <project_dir> (default: out/tang-30s)
+"""
+import json
+import os
+import subprocess
+import sys
+import time
+
+import atlas
+
+# xai/tts-v1 is a clean, predictable multilingual TTS (named voices + language
+# select). Seed-Audio is a general *sound* model that injects pauses/SFX and
+# gave wildly inconsistent narration lengths, so we use a real TTS here.
+VOICE_MODEL = "xai/tts-v1"
+MUSIC_MODEL = "minimax/music-2.6"
+
+
+def probe_dur(path: str) -> float:
+ out = subprocess.run(["ffprobe", "-v", "error", "-show_entries", "format=duration",
+ "-of", "csv=p=0", path], capture_output=True, text=True).stdout
+ try:
+ return float(out.strip())
+ except ValueError:
+ return 0.0
+
+
+def run(project_dir: str):
+ bpath = os.path.join(project_dir, "beats.json")
+ with open(bpath) as f:
+ doc = json.load(f)
+ adir = os.path.join(project_dir, "audio")
+ os.makedirs(adir, exist_ok=True)
+
+ voice = doc.get("voice", {})
+ voice_id = voice.get("voice_id", "leo") # named male documentary-ish voice
+ language = voice.get("language", doc.get("language", "en"))
+ speed = float(voice.get("speed", 1.0))
+
+ jobs = {}
+ for beat in doc["beats"]:
+ pid = atlas.submit_media(VOICE_MODEL, text=beat["narration"], language=language,
+ voice_id=voice_id, codec="mp3", sample_rate=44100, speed=speed)
+ jobs[("narr", beat["id"])] = pid
+ print(f"[narr {beat['id']}] submitted {pid}")
+
+ # BGM: only generate if we don't already have one (it's slow + costs more).
+ bgm_path = os.path.join(adir, "bgm.mp3")
+ if not os.path.exists(bgm_path):
+ music_prompt = doc.get("music", "cinematic majestic traditional Chinese guzheng erhu, warm")
+ mpid = atlas.submit_media(MUSIC_MODEL, prompt=music_prompt, is_instrumental=True,
+ format="mp3")
+ jobs[("bgm", 0)] = mpid
+ print(f"[bgm] submitted {mpid}")
+ else:
+ print(f"[bgm] reuse existing {bgm_path}")
+
+ # poll all
+ done = {}
+ deadline = time.time() + 600
+ while len(done) < len(jobs) and time.time() < deadline:
+ time.sleep(4)
+ for key, pid in jobs.items():
+ if key in done:
+ continue
+ d = atlas._get(f"/model/prediction/{pid}").get("data", {})
+ st = d.get("status")
+ if st in ("completed", "succeeded"):
+ out = d.get("outputs") or d.get("output")
+ done[key] = out[0] if isinstance(out, list) else out
+ print(f"{key} done")
+ elif st == "failed":
+ done[key] = None
+ print(f"{key} FAILED: {json.dumps(d)[:200]}")
+
+ # download + record
+ for beat in doc["beats"]:
+ url = done.get(("narr", beat["id"]))
+ if url:
+ dest = os.path.join(adir, f"narr_{beat['id']}.mp3")
+ atlas.download(url, dest)
+ beat["narration_audio"] = dest
+ beat["narration_dur"] = round(probe_dur(dest), 2)
+ print(f"[narr {beat['id']}] {beat['narration_dur']}s -> {dest}")
+ bgm_url = done.get(("bgm", 0))
+ if bgm_url:
+ bgm = os.path.join(adir, "bgm.mp3")
+ atlas.download(bgm_url, bgm)
+ doc["bgm_path"] = bgm
+ doc["bgm_dur"] = round(probe_dur(bgm), 2)
+ print(f"[bgm] {doc['bgm_dur']}s -> {bgm}")
+
+ with open(bpath, "w") as f:
+ json.dump(doc, f, ensure_ascii=False, indent=2)
+ print("updated", bpath)
+
+
+if __name__ == "__main__":
+ proj = sys.argv[1] if len(sys.argv) > 1 else os.path.join(
+ os.path.dirname(__file__), "..", "out", "tang-30s")
+ run(os.path.abspath(proj))
diff --git a/scripts/clips.py b/scripts/clips.py
new file mode 100644
index 0000000..dcf4c89
--- /dev/null
+++ b/scripts/clips.py
@@ -0,0 +1,188 @@
+#!/usr/bin/env python3
+"""
+Clip stage: animate each SHOT's keyframe into a short clip (Gemini Omni Flash
+image-to-video), using the shot's own duration and a punchy collage
+motion-graphic prompt (5-axis + the shot's specific move). More, shorter shots
+= more cuts = less "one static frame for 10s".
+
+Usage: python3 clips.py <project_dir> (default: out/tang-30s)
+"""
+import json
+import os
+import sys
+import time
+
+import atlas
+from styles import resolve_theme
+
+VIDEO_MODEL = "google/gemini-omni-flash/image-to-video"
+
+
+def shots_of(beat):
+ if beat.get("shots"):
+ for s in beat["shots"]:
+ yield s, f"{beat['id']}{s.get('id','')}"
+ else:
+ yield beat, f"{beat['id']}"
+
+
+# Camera-move vocab. The first group is flat-collage-SAFE (default). The "bold" group can warp
+# the flat art / smear text (verified) — they're AVAILABLE, not banned: use with constraints
+# "loose" and expect to re-roll. Any string not in the dict passes through verbatim too.
+CAMERA_VOCAB = {
+ "static": "a locked-off static camera (no camera move)",
+ "push_in": "one very slow smooth push-in (uniform scale-up, Ken-Burns)",
+ "pull_out": "one slow smooth pull-out (uniform scale-down) revealing the full scene",
+ "pan": "one slow horizontal pan across the frame (flat translate, no perspective shift)",
+ "tilt": "one slow vertical tilt (flat translate, no perspective shift)",
+ "parallax": "a gentle multi-layer parallax drift (paper layers moving at slightly different "
+ "speeds), the camera otherwise steady",
+ # bold / experimental (pair with constraints="loose", re-roll):
+ "orbit": "a slow 3D orbit / camera arc around the scene",
+ "dolly_zoom": "a dolly-zoom (vertigo) — push in while the background pulls back",
+ "roll": "a slow camera roll / canted rotation",
+ "whip": "a fast whip-pan sweep that settles",
+}
+
+AMPLITUDE = {
+ "calm": "subtle, restrained amplitude",
+ "punchy": "lively, energetic amplitude with clear, bold movement",
+ "max": "high-energy amplitude — elements burst, scatter and fly boldly",
+}
+
+# Neutral fallback when a shot doesn't specify element_motion. Prefer per-shot AI-authored
+# element_motion that fits the scene — do NOT force a flying element into every shot.
+DEFAULT_ELEMENT = ("several cut-out elements move naturally with the scene — they bob, tilt, "
+ "slide, drift and scatter; halftone dots pulse")
+
+
+def collage_prompt(camera, element_motion=None, feel=None, palette=None, amplitude="punchy",
+ has_title=True, constraints="strict"):
+ """Collage motion prompt. `constraints`: 'strict' = defect guards on (flat-2D, one-way,
+ no-morph) for text-heavy explainers; 'loose' = let the model explore (3D/bold moves), keep
+ only the essentials. Text is hard-protected ONLY when the shot has a headline (has_title)."""
+ cam = CAMERA_VOCAB.get(camera, camera)
+ element = element_motion or DEFAULT_ELEMENT
+ feel = feel or "tactile, editorial, a page from a scrapbook"
+ palette = palette or "the still's existing palette, high contrast"
+ amp = AMPLITUDE.get(amplitude, AMPLITUDE["punchy"])
+ text_lock = ("Keep the HEADLINE TEXT sharp, legible and stable — do not warp or wobble the "
+ "lettering. " if has_title else "")
+ if constraints == "loose":
+ guard = (text_lock + "Keep the paper-collage look (printed cut-outs, not photoreal); "
+ "avoid a subject melting into shapeless goo. Otherwise explore freely.")
+ else: # strict — defect guards for clean, text-heavy explainers
+ guard = (text_lock + "Keep the layout stable. Stay flat 2D — no 3D rotation, no "
+ "perspective change, camera parallel to the poster. ONE continuous move that "
+ "does not loop, retract or reset. Rigid paper — no morph/melt. Animate the "
+ "motion only; don't re-render the picture.")
+ return (
+ "Animate this still into a mixed-media paper-collage MOTION GRAPHIC, printed cut-outs, "
+ "not photoreal.\n"
+ f"CAMERA (one move only): {cam}.\n"
+ f"ELEMENT MOTION (rich — this is the energy, {amp}): {element}. Elements move as paper "
+ "cut-outs (slide, flap, hinge, pop, scatter, fly).\n"
+ "AESTHETIC: keep the torn-paper, tape, halftone, newsprint and paper-stencil textures "
+ "and the bold flat background.\n"
+ f"FEEL: {feel}.\nCOLOR: {palette}.\n"
+ f"CONSTRAINTS: {guard}"
+ )
+
+
+def painterly_prompt(motion):
+ return (f"Animate this classical Chinese painting with subtle, tasteful motion: {motion}. "
+ f"Keep the painted style, textures and all on-screen text intact and stable. "
+ f"Gentle, cinematic, no morphing, no new objects.")
+
+
+def run(project_dir, only=None):
+ bpath = os.path.join(project_dir, "beats.json")
+ with open(bpath) as f:
+ doc = json.load(f)
+ aspect = doc.get("aspect", "16:9")
+ style = doc.get("style", "painterly")
+ _theme = resolve_theme(doc.get("theme")) or {}
+ motion_style = doc.get("motion_style") or _theme.get("motion_style", "punchy") # calm|punchy|max
+ constraints = doc.get("constraints", "strict") # strict = defect guards on | loose = explore
+ model = doc.get("video_model", VIDEO_MODEL) # Seedance for real people; Omni otherwise
+ clip_dir = os.path.join(project_dir, "clips")
+ os.makedirs(clip_dir, exist_ok=True)
+
+ jobs = {}
+ for beat in doc["beats"]:
+ for shot, key in shots_of(beat):
+ if only and key not in only:
+ continue
+ url = shot.get("keyframe_url")
+ if not url and shot.get("keyframe_path") and os.path.exists(shot["keyframe_path"]):
+ # user-provided keyframe (e.g. hand-made collage card) -> upload it
+ url = atlas.upload(shot["keyframe_path"])
+ shot["keyframe_url"] = url
+ print(f"[{key}] uploaded provided keyframe -> {url}")
+ if not url:
+ print(f"[{key}] no keyframe — provide keyframe_path or run keyframes.py")
+ continue
+ # new schema: camera_move (token) + element_motion (rich). Back-compat: old `motion`.
+ camera = shot.get("camera_move") or shot.get("motion", "push_in")
+ element = shot.get("element_motion")
+ if style == "collage":
+ prompt = collage_prompt(camera, element_motion=element, feel=beat.get("feel"),
+ palette=beat.get("bg"), amplitude=motion_style,
+ has_title=shot.get("title", True), constraints=constraints)
+ else:
+ prompt = painterly_prompt(shot.get("motion", camera))
+ dur = int(shot.get("dur", 10))
+ if "seedance" in model: # ratio (not aspect_ratio); real-person OK
+ params = dict(image=url, duration=dur, ratio=aspect,
+ resolution="1080p", generate_audio=False)
+ elif "kling" in model: # no aspect param (follows input); allows real people
+ params = dict(image=url, duration=dur, sound=False)
+ else: # gemini omni flash
+ params = dict(image=url, duration=dur, aspect_ratio=aspect, resolution="720p")
+ pid = atlas.submit_video(model, prompt, **params)
+ jobs[key] = (pid, shot)
+ print(f"[{key}] submitted {pid} ({dur}s, {model.split('/')[1]})")
+
+ done = {}
+ deadline = time.time() + 1200
+ while len(done) < len(jobs) and time.time() < deadline:
+ time.sleep(5)
+ for key, (pid, _) in jobs.items():
+ if key in done:
+ continue
+ try:
+ d = atlas._get(f"/model/prediction/{pid}").get("data", {})
+ except atlas.AtlasError as e:
+ # a failed task makes the prediction endpoint return 500 -> stop waiting
+ done[key] = None
+ print(f"[{key}] FAILED (poll error): {str(e)[:180]}")
+ continue
+ st = d.get("status")
+ if st in ("completed", "succeeded"):
+ out = d.get("outputs") or d.get("output")
+ done[key] = out[0] if isinstance(out, list) else out
+ print(f"[{key}] done")
+ elif st == "failed":
+ done[key] = None
+ print(f"[{key}] FAILED: {d.get('error','')[:160]}")
+
+ for key, (_, shot) in jobs.items():
+ url = done.get(key)
+ if not url:
+ continue
+ dest = os.path.join(clip_dir, f"clip_{key}.mp4")
+ atlas.download(url, dest)
+ shot["clip_url"] = url
+ shot["clip_path"] = dest
+ print(f"[{key}] saved {dest}")
+
+ with open(bpath, "w") as f:
+ json.dump(doc, f, ensure_ascii=False, indent=2)
+ print("updated", bpath)
+
+
+if __name__ == "__main__":
+ proj = sys.argv[1] if len(sys.argv) > 1 else os.path.join(
+ os.path.dirname(__file__), "..", "out", "tang-30s")
+ only = set(sys.argv[2].split(",")) if len(sys.argv) > 2 else None
+ run(os.path.abspath(proj), only=only)
diff --git a/scripts/confetti.py b/scripts/confetti.py
new file mode 100644
index 0000000..1476563
--- /dev/null
+++ b/scripts/confetti.py
@@ -0,0 +1,52 @@
+#!/usr/bin/env python3
+"""
+Generate a confetti / torn-paper-scrap overlay clip (on black, for screen-blend).
+Adds the constant tactile motion that gives collage explainers their energy.
+
+Usage: python3 confetti.py <out.mp4> [W H seconds]
+"""
+import os
+import random
+import subprocess
+import sys
+import tempfile
+from PIL import Image, ImageDraw
+
+random.seed(7)
+COLORS = [(212, 175, 55), (240, 240, 235), (200, 50, 40), (40, 120, 120),
+ (230, 210, 120), (180, 140, 30)]
+
+
+def run(out, W=540, H=960, secs=6.0, fps=24, n=70):
+ frames = int(secs * fps)
+ parts = []
+ for _ in range(n):
+ parts.append(dict(
+ x=random.uniform(0, W), y=random.uniform(-H, H),
+ vy=random.uniform(0.6, 2.0), vx=random.uniform(-0.6, 0.6),
+ w=random.randint(6, 16), h=random.randint(8, 22),
+ rot=random.uniform(0, 360), vr=random.uniform(-6, 6),
+ col=random.choice(COLORS), flut=random.uniform(0.5, 1.5)))
+ tmp = tempfile.mkdtemp()
+ for f in range(frames):
+ img = Image.new("RGB", (W, H), (0, 0, 0))
+ d = ImageDraw.Draw(img)
+ for p in parts:
+ p["y"] += p["vy"] + 0.5
+ p["x"] += p["vx"] + 0.6 * __import__("math").sin(f * 0.05 * p["flut"])
+ p["rot"] += p["vr"]
+ if p["y"] > H + 20:
+ p["y"] = random.uniform(-40, -10); p["x"] = random.uniform(0, W)
+ chip = Image.new("RGBA", (p["w"], p["h"]), p["col"] + (255,))
+ chip = chip.rotate(p["rot"], expand=True)
+ img.paste(chip, (int(p["x"]), int(p["y"])), chip)
+ img.save(os.path.join(tmp, f"c_{f:04d}.png"))
+ subprocess.run(["ffmpeg", "-y", "-loglevel", "error", "-framerate", str(fps),
+ "-i", os.path.join(tmp, "c_%04d.png"),
+ "-c:v", "libx264", "-pix_fmt", "yuv420p", out], check=True)
+ print("confetti ->", out, f"({frames}f, {W}x{H})")
+
+
+if __name__ == "__main__":
+ out = sys.argv[1] if len(sys.argv) > 1 else "confetti.mp4"
+ run(out)
diff --git a/scripts/extract_elements.py b/scripts/extract_elements.py
new file mode 100644
index 0000000..765bedf
--- /dev/null
+++ b/scripts/extract_elements.py
@@ -0,0 +1,74 @@
+#!/usr/bin/env python3
+"""
+Extract independent collage elements from a static card (the core of the
+"motion collage" pipeline — animating 26 cut-out pieces, not one whole card).
+
+Reads <project>/elements_spec.json:
+ {"card": "<png>", "elements": [{"name","bbox":[x0,y0,x1,y1],"mode":"cutout|crop"}]}
+ - crop : rectangle crop kept as-is (newspaper strips / text blocks)
+ - cutout: crop -> youchuan remove-background -> transparent PNG (figures/trophies/stickers)
+
+Saves elements/<name>.png (RGBA). Usage: python3 extract_elements.py <project_dir>
+"""
+import json
+import os
+import sys
+
+from PIL import Image, ImageDraw, ImageFilter
+
+import atlas
+
+RMBG = "youchuan/v8.1/remove-background"
+
+
+def apply_erase(elem, bbox, erase):
+ """Erase (feathered) sub-regions from a cut element, given in CARD coords.
+ Used to remove an object that youchuan pulled in with the subject
+ (e.g. a trophy embedded in the player cutout)."""
+ import numpy as np
+ ox, oy = bbox[0], bbox[1]
+ mask = Image.new("L", elem.size, 255)
+ d = ImageDraw.Draw(mask)
+ for r in erase:
+ d.rounded_rectangle([r[0] - ox, r[1] - oy, r[2] - ox, r[3] - oy], radius=30, fill=0)
+ mask = mask.filter(ImageFilter.GaussianBlur(14))
+ a = np.asarray(elem.split()[3], dtype=float) * (np.asarray(mask, dtype=float) / 255.0)
+ elem.putalpha(Image.fromarray(a.astype("uint8"), "L"))
+ return elem
+
+
+def run(project_dir):
+ spec = json.load(open(os.path.join(project_dir, "elements_spec.json")))
+ card = Image.open(spec["card"]).convert("RGBA")
+ ed = os.path.join(project_dir, "elements"); os.makedirs(ed, exist_ok=True)
+
+ for el in spec["elements"]:
+ name, bbox, mode = el["name"], el["bbox"], el.get("mode", "crop")
+ crop = card.crop(tuple(bbox))
+ raw = os.path.join(ed, f"raw_{name}.png")
+ crop.save(raw)
+ out = os.path.join(ed, f"{name}.png")
+ if mode == "cutout":
+ url = atlas.upload(raw)
+ pid = atlas._post("/model/generateImage", {"model": RMBG, "image": url})["data"]["id"]
+ res = atlas.poll(pid, interval=3, timeout_s=180)
+ atlas.download(res, out)
+ elem = Image.open(out).convert("RGBA")
+ else:
+ elem = crop
+ if el.get("erase"):
+ elem = apply_erase(elem, bbox, el["erase"])
+ elem.save(out)
+ print(f"[{name}] {mode} -> {out}")
+ el["file"] = out
+ el["size"] = list(crop.size)
+
+ json.dump(spec, open(os.path.join(project_dir, "elements_spec.json"), "w"),
+ ensure_ascii=False, indent=2)
+ print("done ->", ed)
+
+
+if __name__ == "__main__":
+ proj = sys.argv[1] if len(sys.argv) > 1 else os.path.join(
+ os.path.dirname(__file__), "..", "out", "cr7-act")
+ run(os.path.abspath(proj))
diff --git a/scripts/kenburns.py b/scripts/kenburns.py
new file mode 100644
index 0000000..04f6747
--- /dev/null
+++ b/scripts/kenburns.py
@@ -0,0 +1,82 @@
+#!/usr/bin/env python3
+"""
+Ken-Burns fallback clip stage (NO AI video model): turn each beat's keyframe
+into a slow moving clip with ffmpeg zoompan. Use when AI i2v models refuse the
+content (e.g. real-celebrity / brand collage cards get blocked by both Omni and
+Seedance for likeness / digital-rights reasons).
+
+Each card: a blurred cover fills the frame behind the sharp, fully-visible card,
+then a slow push-in/out (direction alternates per beat) gives it life.
+
+Usage: python3 kenburns.py <project_dir> [shotkeys]
+"""
+import json
+import os
+import subprocess
+import sys
+
+FPS = 25
+RES = {"16:9": (1920, 1080), "9:16": (1080, 1920), "1:1": (1080, 1080), "3:4": (1080, 1440)}
+
+
+def shots_of(beat):
+ if beat.get("shots"):
+ for s in beat["shots"]:
+ yield s, f"{beat['id']}{s.get('id','')}"
+ else:
+ yield beat, f"{beat['id']}"
+
+
+def run(project_dir, only=None):
+ bpath = os.path.join(project_dir, "beats.json")
+ with open(bpath) as f:
+ doc = json.load(f)
+ W, H = RES.get(doc.get("aspect", "9:16"), (1080, 1920))
+ clip_dir = os.path.join(project_dir, "clips")
+ os.makedirs(clip_dir, exist_ok=True)
+
+ idx = 0
+ for beat in doc["beats"]:
+ for shot, key in shots_of(beat):
+ if only and key not in only:
+ idx += 1
+ continue
+ img = shot.get("keyframe_path")
+ if not img or not os.path.exists(img):
+ print(f"[{key}] no keyframe_path")
+ continue
+ dur = float(shot.get("dur", 5))
+ frames = int(dur * FPS)
+ zin = (idx % 2 == 0) # alternate push-in / push-out for variety
+ if zin:
+ z = "min(zoom+0.0009,1.18)"
+ else:
+ z = "if(eq(on,1),1.18,max(zoom-0.0009,1.0))"
+ # blurred cover background + sharp fitted card, then zoompan
+ vf = (
+ f"[0:v]scale={W}:{H}:force_original_aspect_ratio=increase,"
+ f"crop={W}:{H},boxblur=26:2,eq=brightness=-0.05[bg];"
+ f"[0:v]scale={W}:{H}:force_original_aspect_ratio=decrease[fg];"
+ f"[bg][fg]overlay=(W-w)/2:(H-h)/2,setsar=1,scale={W*2}:{H*2},"
+ f"zoompan=z='{z}':d={frames}:x='iw/2-(iw/zoom/2)':y='ih/2-(ih/zoom/2)':"
+ f"s={W}x{H}:fps={FPS}[v]"
+ )
+ out = os.path.join(clip_dir, f"clip_{key}.mp4")
+ subprocess.run(["ffmpeg", "-y", "-loglevel", "error", "-loop", "1", "-i", img,
+ "-filter_complex", vf, "-map", "[v]", "-t", f"{dur}",
+ "-c:v", "libx264", "-pix_fmt", "yuv420p", out], check=True)
+ shot["clip_path"] = out
+ shot.pop("clip_url", None)
+ print(f"[{key}] ken-burns -> {out} ({'in' if zin else 'out'}, {dur}s)")
+ idx += 1
+
+ with open(bpath, "w") as f:
+ json.dump(doc, f, ensure_ascii=False, indent=2)
+ print("updated", bpath)
+
+
+if __name__ == "__main__":
+ proj = sys.argv[1] if len(sys.argv) > 1 else os.path.join(
+ os.path.dirname(__file__), "..", "out", "ronaldo")
+ only = set(sys.argv[2].split(",")) if len(sys.argv) > 2 else None
+ run(os.path.abspath(proj), only=only)
diff --git a/scripts/keyframes.py b/scripts/keyframes.py
new file mode 100644
index 0000000..68d324c
--- /dev/null
+++ b/scripts/keyframes.py
@@ -0,0 +1,105 @@
+#!/usr/bin/env python3
+"""
+Keyframe stage: one styled keyframe per SHOT.
+
+Each beat holds one or more shots (different framings of the same narration
+beat) so the cut has variety. Falls back to one implicit shot per beat if a
+beat has no "shots". Generates concurrently, downloads to
+<project>/keyframes/kf_<beat><shot>.jpg, records url+path onto each shot.
+
+Usage: python3 keyframes.py <project_dir> (default: out/tang-30s)
+"""
+import json
+import os
+import sys
+import time
+
+import atlas
+from styles import compose_keyframe_prompt, compose_collage_prompt, resolve_theme
+
+IMAGE_MODEL = "google/nano-banana-2/text-to-image"
+
+
+def shots_of(beat):
+ """Yield (shot_dict, shot_key) for a beat; synthesize one shot if none."""
+ if beat.get("shots"):
+ for s in beat["shots"]:
+ yield s, f"{beat['id']}{s.get('id','')}"
+ else:
+ yield beat, f"{beat['id']}" # beat acts as its own single shot
+
+
+def run(project_dir):
+ bpath = os.path.join(project_dir, "beats.json")
+ with open(bpath) as f:
+ doc = json.load(f)
+ aspect = doc.get("aspect", "16:9")
+ style = doc.get("style", "painterly")
+ theme = resolve_theme(doc.get("theme")) or {} # theme preset -> full look bundle
+ collage_style = theme.get("idiom") or doc.get("collage_style", "american-retro")
+ t_palette, t_type, t_finish = theme.get("palette"), theme.get("type_style"), theme.get("finish")
+ era = doc.get("era") # only needed for the painterly (per-dynasty) style
+ kf_dir = os.path.join(project_dir, "keyframes")
+ os.makedirs(kf_dir, exist_ok=True)
+
+ jobs = {} # key -> (pid, shot_ref)
+ for beat in doc["beats"]:
+ for shot, key in shots_of(beat):
+ if shot.get("keyframe_url"): # already generated (e.g. reused wide) -> skip
+ continue
+ scene = shot["scene"]
+ if style == "collage":
+ prompt = compose_collage_prompt(scene, beat["title_cn"], beat["title_en"],
+ beat.get("bg", "warm ochre"), aspect,
+ with_title=shot.get("title", True),
+ style=collage_style, palette=t_palette,
+ type_style=t_type, finish=t_finish)
+ else:
+ prompt = compose_keyframe_prompt(era, scene, beat["title_cn"],
+ beat["title_en"], aspect)
+ shot["keyframe_prompt"] = prompt
+ pid = atlas.submit_image(IMAGE_MODEL, prompt, aspect_ratio=aspect, resolution="2k")
+ jobs[key] = (pid, shot)
+ print(f"[{key}] submitted {pid}")
+
+ done = {}
+ deadline = time.time() + 300
+ while len(done) < len(jobs) and time.time() < deadline:
+ time.sleep(3)
+ for key, (pid, _) in jobs.items():
+ if key in done:
+ continue
+ try:
+ d = atlas._get(f"/model/prediction/{pid}").get("data", {})
+ except atlas.AtlasError as e:
+ done[key] = None
+ print(f"[{key}] FAILED (poll error): {str(e)[:160]}")
+ continue
+ st = d.get("status")
+ if st in ("completed", "succeeded"):
+ out = d.get("outputs") or d.get("output")
+ done[key] = out[0] if isinstance(out, list) else out
+ print(f"[{key}] done")
+ elif st == "failed":
+ done[key] = None
+ print(f"[{key}] FAILED: {d.get('error','')[:160]}")
+
+ for key, (_, shot) in jobs.items():
+ url = done.get(key)
+ if not url:
+ continue
+ dest = os.path.join(kf_dir, f"kf_{key}.jpg")
+ atlas.download(url, dest)
+ shot["keyframe_url"] = url
+ shot["keyframe_path"] = dest
+ print(f"[{key}] saved {dest}")
+
+ with open(bpath, "w") as f:
+ json.dump(doc, f, ensure_ascii=False, indent=2)
+ print("updated", bpath)
+
+
+if __name__ == "__main__":
+ proj = sys.argv[1] if len(sys.argv) > 1 else os.path.join(
+ os.path.dirname(__file__), "..", "out", "tang-30s")
+ run(os.path.abspath(proj))
diff --git a/scripts/mg_scrapbook.py b/scripts/mg_scrapbook.py
new file mode 100644
index 0000000..93b4f37
--- /dev/null
+++ b/scripts/mg_scrapbook.py
@@ -0,0 +1,172 @@
+#!/usr/bin/env python3
+"""
+Scrapbook MG assembly (with whip cuts + ending card layout):
+ - each (Kling) card clip = a tilted card on a cream desk
+ - beats joined with fast whip (xfade slide) transitions
+ - an ending shot where all cards settle into a scrapbook layout + title
+ - drifting confetti over the whole piece; narration + ducked music + captions
+
+Assumes one clip per beat (beats have no multi-shot). Needs assets/confetti.mp4.
+Usage: python3 mg_scrapbook.py <project_dir>
+"""
+import json
+import math
+import os
+import subprocess
+import sys
+
+import text_overlay
+
+FPS, TAIL, WHIP = 24, 0.5, 0.3
+END_DUR = 4.5
+RES = {"16:9": (1920, 1080), "9:16": (1080, 1920), "1:1": (1080, 1080), "3:4": (1080, 1440)}
+CREAM = "0xE9E1D0"
+TILT = [-2.5, 2.0, -2.0, 2.5, -1.5, 2.2]
+TRANS = ["slideright", "slideleft", "slideup", "slideright", "slideleft"]
+END_TITLE = "CRISTIANO — FOREVER"
+END_SUB = "FIVE CHAPTERS · ONE No.7"
+
+
+def ff(a):
+ subprocess.run(["ffmpeg", "-y", "-loglevel", "error", *a], check=True)
+
+
+def probe_dur(p):
+ o = subprocess.run(["ffprobe", "-v", "error", "-show_entries", "format=duration",
+ "-of", "csv=p=0", p], capture_output=True, text=True).stdout
+ try:
+ return float(o.strip())
+ except ValueError:
+ return 0.0
+
+
+def build_seg(clip, dur, tilt_deg, W, H, out):
+ cd = probe_dur(clip)
+ factor = dur / cd if cd > 0 else 1.0
+ pre = f"setpts={factor:.4f}*PTS," if factor > 1.02 else ""
+ rad = math.radians(tilt_deg)
+ fc = (f"color=c={CREAM}:s={W}x{H}:d={dur}:r={FPS},format=rgb24[bg];"
+ f"[0:v]{pre}scale={int(W*0.84)}:-1:flags=lanczos,format=rgba,"
+ f"rotate={rad:.4f}:c=none:ow=rotw({rad:.4f}):oh=roth({rad:.4f}),fps={FPS}[c];"
+ f"[bg][c]overlay=(W-w)/2:(H-h)/2,setsar=1,format=yuv420p,"
+ f"tpad=stop_mode=clone:stop_duration=1[v]")
+ ff(["-i", clip, "-filter_complex", fc, "-map", "[v]", "-t", f"{dur}",
+ "-an", "-c:v", "libx264", "-pix_fmt", "yuv420p", out])
+
+
+def build_ending(cards, W, H, out, tmp):
+ title = text_overlay.render_title(END_TITLE, os.path.join(tmp, "title.png"), W, H, END_SUB)
+ Wm = int(W * 0.34)
+ pos = [(70, 440, -6), (600, 370, 5), (95, 980, 4), (610, 960, -5), (345, 1380, 3)]
+ inputs = ["-f", "lavfi", "-i", f"color=c={CREAM}:s={W}x{H}:d={END_DUR}:r={FPS}"]
+ for c in cards:
+ inputs += ["-i", c]
+ inputs += ["-i", title]
+ parts = ["[0:v]format=rgb24[bg]"]
+ prev = "[bg]"
+ for i, (x, y, deg) in enumerate(pos):
+ rad = math.radians(deg)
+ parts.append(f"[{i+1}:v]scale={Wm}:-1,format=rgba,"
+ f"rotate={rad:.4f}:c=none:ow=rotw({rad:.4f}):oh=roth({rad:.4f})[k{i}]")
+ parts.append(f"{prev}[k{i}]overlay={x}:{y}:eof_action=repeat[o{i}]")
+ prev = f"[o{i}]"
+ parts.append(f"{prev}[{len(cards)+1}:v]overlay=0:0:eof_action=repeat,setsar=1,format=yuv420p[v]")
+ ff([*inputs, "-filter_complex", ";".join(parts), "-map", "[v]", "-t", f"{END_DUR}",
+ "-c:v", "libx264", "-pix_fmt", "yuv420p", out])
+
+
+def run(project_dir):
+ with open(os.path.join(project_dir, "beats.json")) as f:
+ doc = json.load(f)
+ beats = doc["beats"]
+ W, H = RES.get(doc.get("aspect", "9:16"), (1080, 1920))
+ wm_text = doc.get("watermark", "Made with Atlas Cloud · vox-director")
+ confetti = os.path.join(project_dir, "assets", "confetti.mp4")
+ tmp = os.path.join(project_dir, "_seg"); os.makedirs(tmp, exist_ok=True)
+
+ # 1) per-beat segments (tilted card on cream)
+ seg_files, seg_durs = [], []
+ for i, beat in enumerate(beats):
+ shot = beat["shots"][0] if beat.get("shots") else beat
+ d = max(float(shot.get("dur", 5)), float(beat.get("narration_dur", 5)) + TAIL)
+ out = os.path.join(tmp, f"seg_{i:02d}.mp4")
+ build_seg(shot["clip_path"], round(d, 2), TILT[i % len(TILT)], W, H, out)
+ seg_files.append(out); seg_durs.append(round(d, 2))
+
+ # ending assembly clip
+ ending = os.path.join(tmp, "ending.mp4")
+ build_ending([b.get("shots", [b])[0]["keyframe_path"] if b.get("shots")
+ else b["keyframe_path"] for b in beats], W, H, ending, tmp)
+
+ clips = seg_files + [ending]
+ durs = seg_durs + [END_DUR]
+
+ # 2) whip (xfade) chain; compute each beat's start in the final timeline
+ inputs = []
+ for c in clips:
+ inputs += ["-i", c]
+ chain, prev, acc, starts = [], "[0:v]", durs[0], [0.0]
+ for i in range(1, len(clips)):
+ off = acc - WHIP
+ lbl = f"[x{i}]"
+ tr = TRANS[(i - 1) % len(TRANS)]
+ chain.append(f"{prev}[{i}:v]xfade=transition={tr}:duration={WHIP}:offset={off:.3f}{lbl}")
+ prev = lbl
+ starts.append(off)
+ acc = acc + durs[i] - WHIP
+ total = round(acc, 2)
+ body = os.path.join(tmp, "body_whip.mp4")
+ ff([*inputs, "-filter_complex", ";".join(chain), "-map", prev,
+ "-c:v", "libx264", "-pix_fmt", "yuv420p", body])
+
+ # beat spans (only the narrated beats, not the ending)
+ spans = []
+ for i, beat in enumerate(beats):
+ st = starts[i] + (WHIP if i > 0 else 0)
+ spans.append({"start": st, "dur": seg_durs[i], "beat": beat})
+
+ # 3) captions + wm PNGs
+ caps = [text_overlay.render_caption(sp["beat"]["narration"],
+ os.path.join(tmp, f"cap_{sp['beat']['id']}.png"), W, H) for sp in spans]
+ wm = text_overlay.render_watermark(wm_text, os.path.join(tmp, "wm.png"), W, H)
+
+ # 4) confetti screen-blend + captions + wm + narration/music
+ nb = len(spans)
+ inp = ["-i", body, "-stream_loop", "-1", "-i", confetti]
+ for p in caps:
+ inp += ["-i", p]
+ inp += ["-i", wm]
+ narr_base = 2 + nb + 1
+ for sp in spans:
+ inp += ["-i", sp["beat"]["narration_audio"]]
+ bgm_idx = narr_base + nb
+ inp += ["-i", doc["bgm_path"]]
+
+ ch = [f"[1:v]scale={W}:{H},setpts=PTS-STARTPTS,format=gbrp[cf]",
+ "[0:v]format=gbrp[bb]",
+ "[bb][cf]blend=all_mode=screen:shortest=1,format=yuv420p[vb]"]
+ prev = "[vb]"
+ for i, sp in enumerate(spans):
+ s, e = sp["start"] + 0.2, sp["start"] + sp["dur"] - 0.1
+ ch.append(f"{prev}[{2+i}:v]overlay=0:0:enable='between(t,{s:.2f},{e:.2f})'[v{i+1}]")
+ prev = f"[v{i+1}]"
+ ch.append(f"{prev}[{2+nb}:v]overlay=0:0[v]")
+ nl = []
+ for i, sp in enumerate(spans):
+ ch.append(f"[{narr_base+i}:a]adelay={int(sp['start']*1000)}:all=1[n{i}]"); nl.append(f"[n{i}]")
+ ch.append(f"{''.join(nl)}amix=inputs={nb}:normalize=0:duration=longest,apad,atrim=0:{total}[nm]")
+ ch.append("[nm]asplit=2[nA][nB]")
+ ch.append(f"[{bgm_idx}:a]atrim=0:{total},volume=0.9,afade=t=out:st={max(total-2,0):.2f}:d=2[bgt]")
+ ch.append("[bgt][nA]sidechaincompress=threshold=0.02:ratio=12:attack=5:release=350[bgd]")
+ ch.append(f"[nB][bgd]amix=inputs=2:normalize=0:duration=longest,volume=1.4,atrim=0:{total}[a]")
+
+ final = os.path.join(project_dir, "final_mg.mp4")
+ ff([*inp, "-filter_complex", ";".join(ch), "-map", "[v]", "-map", "[a]",
+ "-c:v", "libx264", "-pix_fmt", "yuv420p", "-c:a", "aac", "-shortest", final])
+ print("FINAL:", final, f"(~{total}s, {len(beats)} beats + ending)")
+
+
+if __name__ == "__main__":
+ proj = sys.argv[1] if len(sys.argv) > 1 else os.path.join(
+ os.path.dirname(__file__), "..", "out", "ronaldo")
+ run(os.path.abspath(proj))
diff --git a/scripts/motion.py b/scripts/motion.py
new file mode 100644
index 0000000..58752f5
--- /dev/null
+++ b/scripts/motion.py
@@ -0,0 +1,217 @@
+#!/usr/bin/env python3
+"""
+motion.py — local keyframe animation engine for motion-collage videos.
+
+The core the playbook is built on: each extracted element is a Layer with a
+keyframe track (fly-in / back-overshoot / bounce / slap) plus sway+pulse
+"breathing"; procedural VFX (starburst, confetti) and a camera (zoom + impact
+shake) sit around them. Frames are drawn with Pillow and piped to ffmpeg.
+
+This file renders ONE proof act (2008 "KING OF EUROPE") from cr7-act elements.
+Usage: python3 motion.py <project_dir> [W H fps seconds]
+"""
+import json
+import math
+import os
+import subprocess
+import sys
+
+from PIL import Image, ImageDraw, ImageFilter
+
+# ----------------------------------------------------------------- easing
+def ease(e, p):
+ p = max(0.0, min(1.0, p))
+ if e == "linear": return p
+ if e == "smooth": return p * p * (3 - 2 * p)
+ if e == "in": return p * p
+ if e == "out": return 1 - (1 - p) ** 2
+ if e == "back": # settle with slight overshoot
+ s = 1.70158
+ q = p - 1
+ return 1 + (s + 1) * q ** 3 + s * q ** 2
+ if e == "bounce": # drop-in bounce
+ if p < 1 / 2.75: return 7.5625 * p * p
+ if p < 2 / 2.75: p -= 1.5 / 2.75; return 7.5625 * p * p + 0.75
+ if p < 2.5 / 2.75: p -= 2.25 / 2.75; return 7.5625 * p * p + 0.9375
+ p -= 2.625 / 2.75; return 7.5625 * p * p + 0.984375
+ return p
+
+
+class Layer:
+ """img path + keyframe track. key = dict(t,x,y,s,r,a,e). x,y = center."""
+ def __init__(self, img, keys, sway=0.0, pulse=0.0, shadow=True, z=0):
+ self.im = Image.open(img).convert("RGBA")
+ self.keys = sorted(keys, key=lambda k: k["t"])
+ self.sway, self.pulse, self.shadow, self.z = sway, pulse, shadow, z
+
+ def state(self, t):
+ ks = self.keys
+ if t <= ks[0]["t"]:
+ k = ks[0]; return k["x"], k["y"], k["s"], k.get("r", 0), k.get("a", 1)
+ if t >= ks[-1]["t"]:
+ k = ks[-1]; return k["x"], k["y"], k["s"], k.get("r", 0), k.get("a", 1)
+ for i in range(len(ks) - 1):
+ a, b = ks[i], ks[i + 1]
+ if a["t"] <= t <= b["t"]:
+ p = (t - a["t"]) / (b["t"] - a["t"])
+ q = ease(b.get("e", "smooth"), p)
+ lerp = lambda u, v: u + (v - u) * q
+ return (lerp(a["x"], b["x"]), lerp(a["y"], b["y"]), lerp(a["s"], b["s"]),
+ lerp(a.get("r", 0), b.get("r", 0)), lerp(a.get("a", 1), b.get("a", 1)))
+ return ks[-1]["x"], ks[-1]["y"], ks[-1]["s"], 0, 1
+
+ def draw(self, canvas, t):
+ x, y, s, r, a = self.state(t)
+ if a <= 0.01 or s <= 0.01:
+ return
+ # breathing
+ s *= 1 + self.pulse * math.sin(t * 2.1)
+ r += self.sway * math.sin(t * 1.3)
+ w, h = max(1, int(self.im.width * s)), max(1, int(self.im.height * s))
+ im = self.im.resize((w, h), Image.LANCZOS)
+ if r:
+ im = im.rotate(r, expand=True, resample=Image.BICUBIC)
+ if a < 1:
+ al = im.split()[3].point(lambda v: int(v * a))
+ im.putalpha(al)
+ px, py = int(x - im.width / 2), int(y - im.height / 2)
+ if self.shadow:
+ sh = Image.new("RGBA", im.size, (0, 0, 0, 0))
+ sh.paste((0, 0, 0, 130), (0, 0), im.split()[3])
+ sh = sh.filter(ImageFilter.GaussianBlur(9))
+ canvas.alpha_composite(sh, (px + 10, py + 16))
+ canvas.alpha_composite(im, (px, py))
+
+
+# ------------------------------------------------------ keyframe helpers
+def fly_in(t0, x, y, W, H, frm="R", spin=8, dur=0.7, s=1.0):
+ off = {"R": (W + 400, y), "L": (-400, y), "T": (x, -400), "B": (x, H + 400)}[frm]
+ return [dict(t=t0, x=off[0], y=off[1], s=s, r=spin, a=0, e="out"),
+ dict(t=t0 + dur, x=x, y=y, s=s, r=0, a=1, e="back")]
+
+
+def slap(t0, x, y, s=1.0, dur=0.25):
+ return [dict(t=t0, x=x, y=y, s=s * 1.5, r=0, a=0, e="out"),
+ dict(t=t0 + dur, x=x, y=y, s=s, r=0, a=1, e="back")]
+
+
+def drop(t0, x, y, H, s=1.0, dur=0.8):
+ return [dict(t=t0, x=x, y=-300, s=s, r=0, a=0, e="linear"),
+ dict(t=t0 + 0.1, x=x, y=-300, s=s, r=0, a=1, e="linear"),
+ dict(t=t0 + dur, x=x, y=y, s=s, r=0, a=1, e="bounce")]
+
+
+def pop_settle(t0, x, y, s=1.0, dur=0.5, spin=6):
+ """Focus-pop in place: element appears LARGER and fully opaque (so it covers
+ its own copy on a full backdrop -> no ghost, no dimming needed), then settles
+ to size. Scale eases only downward to 1.0 (never below) so the copy stays hidden."""
+ return [dict(t=t0, x=x, y=y, s=s * 1.35, r=spin, a=0, e="out"),
+ dict(t=t0 + 0.03, x=x, y=y, s=s * 1.35, r=spin, a=1, e="out"),
+ dict(t=t0 + dur, x=x, y=y, s=s, r=0, a=1, e="out")]
+
+
+# ------------------------------------------------------ procedural VFX
+def starburst(canvas, cx, cy, t, R=760, rays=28, col=(240, 200, 70)):
+ lay = Image.new("RGBA", canvas.size, (0, 0, 0, 0))
+ d = ImageDraw.Draw(lay)
+ rot = t * 18
+ for i in range(rays):
+ a0 = math.radians(rot + i * 360 / rays)
+ a1 = math.radians(rot + (i + 0.5) * 360 / rays)
+ d.polygon([(cx, cy),
+ (cx + R * math.cos(a0), cy + R * math.sin(a0)),
+ (cx + R * math.cos(a1), cy + R * math.sin(a1))], fill=col + (60,))
+ canvas.alpha_composite(lay)
+
+
+class Confetti:
+ def __init__(self, W, H, n=46, seed=7):
+ import random
+ self.r = random.Random(seed); self.W, self.H = W, H
+ self.p = [dict(x=self.r.uniform(0, W), y=self.r.uniform(-H, H),
+ vy=self.r.uniform(60, 150), vx=self.r.uniform(-30, 30),
+ w=self.r.randint(7, 16), h=self.r.randint(9, 22),
+ rot=self.r.uniform(0, 360), vr=self.r.uniform(-120, 120),
+ c=self.r.choice([(212, 175, 55), (240, 240, 235), (200, 50, 40),
+ (40, 110, 110), (230, 205, 110)])) for _ in range(n)]
+
+ def draw(self, canvas, t, dt):
+ lay = Image.new("RGBA", canvas.size, (0, 0, 0, 0))
+ for p in self.p:
+ p["y"] += p["vy"] * dt; p["x"] += p["vx"] * dt + 6 * math.sin(t + p["w"])
+ p["rot"] += p["vr"] * dt
+ if p["y"] > self.H + 20:
+ p["y"] = -20; p["x"] = self.r.uniform(0, self.W) if hasattr(self, "r") else p["x"]
+ chip = Image.new("RGBA", (p["w"], p["h"]), p["c"] + (235,))
+ chip = chip.rotate(p["rot"], expand=True)
+ lay.alpha_composite(chip, (int(p["x"]), int(p["y"])))
+ canvas.alpha_composite(lay)
+
+
+# ------------------------------------------------------------- 2008 act
+def build_act(project_dir, W, H):
+ """Elements fly back to their ORIGINAL positions on the card (canvas 3:4),
+ so the assembled frame reconstructs the original poster."""
+ els = {e["name"]: e["file"] for e in
+ json.load(open(os.path.join(project_dir, "elements_spec.json")))["elements"]}
+ S = W / 768.0 # card is 768 wide; scale elements to canvas
+ # original centers on card * S -> (x, y)
+ P = {"crest": (255, 238), "seven": (215, 575), "ronaldo": (666, 647),
+ "trophy": (863, 889), "king": (249, 966), "y2008": (839, 1249)}
+ # draw order = original z (trophy sits in front of ronaldo, etc.)
+ # off-screen fly-in back to each element's ORIGINAL position; pale placeholders
+ # on the backdrop mark the landing zones (no dark boxes, no ghost).
+ return [
+ Layer(els["crest"], fly_in(0.15, *P["crest"], W, H, "T", spin=-6, dur=0.6, s=S), sway=0.6),
+ Layer(els["seven"], fly_in(0.30, *P["seven"], W, H, "L", spin=-8, dur=0.6, s=S), sway=1.0),
+ Layer(els["ronaldo"], fly_in(0.50, *P["ronaldo"], W, H, "R", spin=4, dur=0.7, s=S),
+ sway=0.4, pulse=0.004),
+ Layer(els["trophy"], drop(0.85, *P["trophy"], H, s=S), sway=0.8),
+ Layer(els["king"], fly_in(1.10, *P["king"], W, H, "L", spin=-5, dur=0.6, s=S), sway=0.6),
+ Layer(els["y2008"], fly_in(1.40, *P["y2008"], W, H, "R", spin=8, dur=0.5, s=S)),
+ ]
+
+
+def cam(t, T):
+ z = 1.0 + 0.06 * (t / T) # slow push-in
+ sx = sy = 0.0
+ for hit in (0.6, 1.25, 1.7): # impact shakes on entries
+ if t >= hit:
+ d = t - hit
+ amp = 22 * math.exp(-8 * d)
+ sx += amp * math.sin(d * 60); sy += amp * math.cos(d * 55)
+ return z, sx, sy
+
+
+def render(project_dir, W=1080, H=1440, fps=24, secs=5.5):
+ backdrop = Image.open(os.path.join(project_dir, "base_backdrop.png")).convert("RGBA").resize((W, H))
+ layers = build_act(project_dir, W, H)
+ conf = Confetti(W, H, n=30)
+ out = os.path.join(project_dir, "act.mp4")
+ p = subprocess.Popen(
+ ["ffmpeg", "-y", "-loglevel", "error", "-f", "rawvideo", "-pix_fmt", "rgb24",
+ "-s", f"{W}x{H}", "-r", str(fps), "-i", "-",
+ "-c:v", "libx264", "-pix_fmt", "yuv420p", out], stdin=subprocess.PIPE)
+ n = int(secs * fps); dt = 1.0 / fps
+ for f in range(n):
+ t = f * dt
+ cv = backdrop.copy() # original card as base
+ for L in layers:
+ L.draw(cv, t)
+ conf.draw(cv, t, dt)
+ z, sx, sy = cam(t, secs)
+ frame = cv.convert("RGB")
+ zw, zh = int(W * z), int(H * z)
+ frame = frame.resize((zw, zh), Image.LANCZOS)
+ cx, cy = (zw - W) // 2 + int(sx), (zh - H) // 2 + int(sy)
+ cx = max(0, min(zw - W, cx)); cy = max(0, min(zh - H, cy))
+ frame = frame.crop((cx, cy, cx + W, cy + H))
+ p.stdin.write(frame.tobytes())
+ p.stdin.close(); p.wait()
+ print("FINAL:", out, f"({n}f {W}x{H})")
+
+
+if __name__ == "__main__":
+ proj = sys.argv[1] if len(sys.argv) > 1 else os.path.join(
+ os.path.dirname(__file__), "..", "out", "cr7-act")
+ render(os.path.abspath(proj))
diff --git a/scripts/style_bakeoff.py b/scripts/style_bakeoff.py
new file mode 100644
index 0000000..efdb873
--- /dev/null
+++ b/scripts/style_bakeoff.py
@@ -0,0 +1,82 @@
+#!/usr/bin/env python3
+"""
+Style bake-off: render ONE representative beat in several candidate collage styles so
+the user can pick the visual idiom before committing the whole film.
+
+Hybrid selection: Claude reads the topic and chooses which idioms to try (names from
+styles.STYLE_LIBRARY, or a custom idiom string), matching the topic's era/culture/tone —
+don't default to Chinese motifs for a Western topic. Then the human picks by eye.
+
+Usage:
+ python3 style_bakeoff.py <project_dir> [style1,style2,...] [beat_index]
+Defaults: the 4 Western library styles, beat 0. Output -> <project>/style-bakeoff/<style>.jpg
+Then set "collage_style": "<pick>" in beats.json, clear old keyframe_url/path, re-run keyframes.
+"""
+import json
+import os
+import sys
+import time
+
+import atlas
+from styles import compose_collage_prompt, STYLE_LIBRARY, THEME_PRESETS, resolve_theme
+
+IMAGE_MODEL = "google/nano-banana-2/text-to-image"
+# candidates are THEME names (full look bundles); Claude picks topic-fitting ones
+DEFAULT_CANDIDATES = ["american-retro", "swiss-modern", "punk-zine", "atomic-age"]
+
+
+def first_shot(beat):
+ return beat["shots"][0] if beat.get("shots") else beat
+
+
+def run(project_dir, styles=None, beat_index=0):
+ styles = styles or DEFAULT_CANDIDATES
+ with open(os.path.join(project_dir, "beats.json")) as f:
+ doc = json.load(f)
+ aspect = doc.get("aspect", "16:9")
+ beat = doc["beats"][beat_index]
+ shot = first_shot(beat)
+ scene, bg = shot["scene"], beat.get("bg", "warm ochre")
+ tcn, ten = beat.get("title_cn", ""), beat.get("title_en", "")
+ out = os.path.join(project_dir, "style-bakeoff"); os.makedirs(out, exist_ok=True)
+
+ jobs = {}
+ for name in styles:
+ tp = resolve_theme(name) or {} # theme name -> full look bundle
+ prompt = compose_collage_prompt(scene, tcn, ten, bg, aspect,
+ style=tp.get("idiom", name), palette=tp.get("palette"),
+ type_style=tp.get("type_style"), finish=tp.get("finish"))
+ jobs[name] = atlas.submit_image(IMAGE_MODEL, prompt, aspect_ratio=aspect, resolution="2k")
+ tag = "library" if name in STYLE_LIBRARY else "custom"
+ print(f"[{name}] ({tag}) submitted {jobs[name]}")
+
+ done, deadline = {}, time.time() + 240
+ while len(done) < len(jobs) and time.time() < deadline:
+ time.sleep(3)
+ for name, pid in jobs.items():
+ if name in done:
+ continue
+ try:
+ d = atlas._get(f"/model/prediction/{pid}").get("data", {})
+ except atlas.AtlasError as e:
+ done[name] = None; print(f"[{name}] FAILED: {str(e)[:120]}"); continue
+ st = d.get("status")
+ if st in ("completed", "succeeded"):
+ o = d.get("outputs") or d.get("output")
+ done[name] = o[0] if isinstance(o, list) else o
+ print(f"[{name}] done")
+ elif st == "failed":
+ done[name] = None; print(f"[{name}] FAILED: {d.get('error','')[:120]}")
+
+ for name, url in done.items():
+ if url:
+ atlas.download(url, os.path.join(out, f"{name}.jpg"))
+ print(f"\nsaved candidates to {out} — review, then set \"collage_style\" in beats.json.")
+
+
+if __name__ == "__main__":
+ proj = os.path.abspath(sys.argv[1] if len(sys.argv) > 1 else
+ os.path.join(os.path.dirname(__file__), "..", "out", "money-60s"))
+ styles = sys.argv[2].split(",") if len(sys.argv) > 2 else None
+ bi = int(sys.argv[3]) if len(sys.argv) > 3 else 0
+ run(proj, styles, bi)
diff --git a/scripts/styles.py b/scripts/styles.py
new file mode 100644
index 0000000..157c4d3
--- /dev/null
+++ b/scripts/styles.py
@@ -0,0 +1,171 @@
+#!/usr/bin/env python3
+"""
+Per-era style bible for vox-director (validated on Atlas Cloud / Nano Banana 2).
+
+Each STYLE_BASE is scene-agnostic: it fixes ONLY the visual idiom of a dynasty.
+compose_keyframe_prompt() appends the beat's scene + a shared bilingual
+title/seal treatment so the whole film stays coherent while the style evolves.
+"""
+
+# The "evolution" arc: the visual idiom evolves with the civilization.
+STYLE_BASES = {
+ "tang": (
+ "Classical Chinese gongbi fine-line court painting fused with Dunhuang mural "
+ "style, painted with mineral pigments (ochre, vermilion, malachite green, lapis "
+ "blue, gold) on aged cracked silk with flaking patina, elegant flowing brushwork "
+ "and decorative cloud motifs. Ornate, luminous, museum handscroll aesthetic."
+ ),
+ "song": (
+ "Song Dynasty literati ink-wash painting in the minimalist 'one-corner' "
+ "manner of Ma Yuan and Xia Gui: vast empty negative space, sparse delicate "
+ "monochrome ink with the faintest grey wash on aged cream silk, misty and "
+ "restrained. Quiet, refined, elegant."
+ ),
+ "ming": (
+ "Blue-and-white porcelain illustration: cobalt-blue underglaze brushwork "
+ "on a white porcelain ground with subtle celadon crackle-glaze texture, flowing "
+ "porcelain-painting line and wash, decorative wave and cloud borders. Elegant, "
+ "iconic, ceramic aesthetic with aged patina."
+ ),
+ "qing": (
+ "Aged late-imperial Chinese court painting on dark silk in the fusion "
+ "Sino-European manner of Giuseppe Castiglione, in a somber twilight palette of "
+ "deep crimson, fading imperial gold and dusk shadows. Fine detailed brushwork, "
+ "darkened silk with patina. Melancholic, ornate, empire-in-decline mood."
+ ),
+ "modern": (
+ "High-contrast black-and-white woodcut print in the 1930s Chinese modern woodcut "
+ "movement style (Lu Xun era), with the grain of an aged sepia photograph. Bold "
+ "gouged black-and-white lines, rough carved texture, torn newsprint edges, "
+ "sepia-and-ink tone. Stark, urgent, revolutionary."
+ ),
+ "rising": (
+ "Bold contemporary minimalist 'new Chinese' graphic poster: elegant "
+ "modern flat shapes with fine gold linework and a touch of ink-brush energy, a "
+ "palette of bold red, deep ink and gold, generous negative space, dynamic upward "
+ "motion. Sleek, powerful, optimistic, classical-modern fusion."
+ ),
+}
+
+# Shared treatment so the evolving styles still read as one film.
+TITLE_TREATMENT = (
+ "Include a title cartouche with large red Chinese characters '{title_cn}' and a "
+ "small clean English subtitle '{title_en}', plus a single red seal stamp. Keep the "
+ "headline crisp and legible."
+)
+
+# ---- Paper-collage STYLE LIBRARY (pick per topic; hybrid selection) --------------
+# Shared collage MECHANICS (same for every style) — only the visual IDIOM changes.
+# The library is a palette + quality floor, NOT a fixed menu: Claude reads the topic,
+# picks the 3-4 idioms that fit its era/culture/tone (or composes a custom one), runs a
+# bake-off, and the human picks. Match the idiom to the TOPIC, not the language — an English
+# film about Chinese history should still look Chinese (that's fine). The goal is the right
+# look per topic, not a fixed default culture.
+COLLAGE_MECHANICS = (
+ "Clearly layered hand-cut paper cut-outs with visible torn and scissor-cut edges, tape "
+ "corners and soft real paper drop shadows, on a bold flat {bg} paper background. Halftone "
+ "print dots, newspaper-clipping scraps, paper-stencil shapes, aged paper texture, slight "
+ "print misregistration, scattered geometric paper accents (triangles, circles, zigzags, "
+ "washi tape). Figures are PRINTED / illustrated cut-outs, NOT CGI, NOT a 3D render — keep "
+ "print grain and paper imperfections. High-contrast, punchy, tactile, hand-assembled."
+)
+
+STYLE_LIBRARY = {
+ "american-retro": (
+ "Vintage 1950s-60s American advertising and pulp-magazine paper collage: bold flat "
+ "retro colors, mid-century engraved and illustrated Western cut-out figures, classic "
+ "Americana printed imagery, nostalgic."
+ ),
+ "modern-flat": (
+ "Clean modern flat 2D illustrated collage in the Vox explainer motion-graphic style: "
+ "bold flat-color vector-illustration cut-outs, simple confident shapes, a limited "
+ "contemporary palette, crisp infographic editorial layout."
+ ),
+ "zine": (
+ "Gritty punk zine / ransom-note collage: torn newspaper and magazine scraps, cut-out "
+ "mismatched headline letters, photocopied high-contrast halftone, black-and-white with "
+ "one spot color, raw hand-cut edges. DIY, analog, urgent."
+ ),
+ "photo-collage": (
+ "Cinematic documentary photo-collage: real black-and-white archival photographs cut "
+ "out and layered with soft drop shadows, one restrained accent color, sepia and "
+ "monochrome vintage photography. Serious, editorial, museum-like."
+ ),
+ "chinese-ink": (
+ "Mixed-media collage of Chinese woodblock-print and ink-mural cut-out figures, aged "
+ "rice-paper and Chinese newspaper clippings, vermilion seal stamps. Oriental, historical."
+ ),
+}
+DEFAULT_STYLE = "american-retro"
+
+# THEME PRESETS = full "look" bundles (theme-layer). A preset fixes the LOOK dims (idiom +
+# palette + type + finish + mood + default motion energy); scene/camera/element-motion stay
+# per-beat (beat-layer); Vox constraints + text/flat locks are universal. Extensible: Claude may
+# compose a custom theme by mixing vocab-bank.md when a topic needs one the library lacks.
+THEME_PRESETS = {
+ "american-retro": {"idiom": "american-retro", "palette": "bold retro primaries — red, mustard, teal, cream",
+ "type_style": "bold wood-type / heavy slab, all-caps", "finish": "heavy halftone dots, aged newsprint, slight misregistration",
+ "mood": "nostalgic, punchy", "motion_style": "punchy"},
+ "swiss-modern": {"idiom": "modern-flat", "palette": "two-color + one red accent, lots of white",
+ "type_style": "Helvetica/Akzidenz grotesque, tight caps", "finish": "clean flat, very subtle grain",
+ "mood": "precise, confident", "motion_style": "calm"},
+ "punk-zine": {"idiom": "zine", "palette": "black & white + one fluorescent spot color",
+ "type_style": "ransom-note cut-out mismatched letters", "finish": "photocopy grain, heavy misregistration",
+ "mood": "urgent, rebellious", "motion_style": "max"},
+ "soviet-constructivist": {"idiom": "Russian Constructivist photomontage, bold diagonal geometry",
+ "palette": "red, black, cream", "type_style": "bold condensed gothic set on strong diagonals",
+ "finish": "letterpress, newsprint", "mood": "heroic, urgent", "motion_style": "punchy"},
+ "wpa-propaganda": {"idiom": "1930s WPA / vintage travel silkscreen poster",
+ "palette": "muted 3-color screenprint", "type_style": "gothic / stencil caps",
+ "finish": "screenprint grain, flat ink", "mood": "earnest, civic", "motion_style": "calm"},
+ "70s-groovy": {"idiom": "1970s groovy print", "palette": "mustard, rust, avocado, cream",
+ "type_style": "bulbous 70s display serif", "finish": "riso grain, warm", "mood": "warm, funky", "motion_style": "punchy"},
+ "chinese-ink": {"idiom": "chinese-ink", "palette": "ink black + vermilion, aged paper",
+ "type_style": "Chinese brush characters + small English + red seal", "finish": "rice-paper, ink bleed",
+ "mood": "elegant, historical", "motion_style": "calm"},
+ "atomic-age": {"idiom": "1950s atomic-age retro-futurism", "palette": "teal, orange, cream",
+ "type_style": "atomic script + geometric caps", "finish": "halftone, starbursts",
+ "mood": "optimistic, bright", "motion_style": "punchy"},
+}
+
+
+def resolve_theme(name):
+ """Theme name -> full look bundle (or None). Use to drive keyframes + motion_style."""
+ return THEME_PRESETS.get(name)
+
+
+def _headline(title_cn, title_en, style, type_style=None):
+ if title_cn: # bilingual (CJK styles)
+ return (" " + TITLE_TREATMENT.format(title_cn=title_cn, title_en=title_en))
+ ts = f" in {type_style}" if type_style else ""
+ seal = "a vermilion seal stamp" if style == "chinese-ink" else "a small paper sticker accent"
+ return (f" Include a torn-paper banner with a big bold cut-out English headline "
+ f"'{title_en}'{ts} and {seal}. Keep the headline crisp and legible.")
+
+
+def compose_collage_prompt(scene, title_cn, title_en, bg="warm ochre", aspect="16:9",
+ with_title=True, style=DEFAULT_STYLE,
+ palette=None, type_style=None, finish=None):
+ """Paper-collage keyframe prompt. `style` = a STYLE_LIBRARY idiom name (or custom string).
+ palette/type_style/finish come from the chosen THEME_PRESET (theme-layer) and sharpen the
+ look. Culture/topic-matched. with_title=False for detail cut-in shots."""
+ idiom = STYLE_LIBRARY.get(style, style) # named -> library; else treat as custom
+ pal = f" Palette: {palette}." if palette else ""
+ fin = f" Print finish: {finish}." if finish else ""
+ block = f"{idiom}{pal} {COLLAGE_MECHANICS.format(bg=bg)}{fin}"
+ if with_title:
+ title = _headline(title_cn, title_en, style, type_style)
+ else:
+ title = " No big headline in this shot (a small accent only); it is a cut-in detail."
+ return (f"{block} SCENE (as layered paper cut-outs): {scene}.{title} "
+ f"Aspect ratio {aspect}.")
+
+
+def compose_keyframe_prompt(era: str, scene: str, title_cn: str, title_en: str,
+ aspect: str = "16:9") -> str:
+ base = STYLE_BASES[era]
+ title = TITLE_TREATMENT.format(title_cn=title_cn, title_en=title_en)
+ return (
+ f"{base} SCENE: {scene}. Arrange the composition with one clear focal subject "
+ f"and strong editorial poster balance. {title} Aspect ratio {aspect}."
+ )
diff --git a/scripts/text_overlay.py b/scripts/text_overlay.py
new file mode 100644
index 0000000..e34217b
--- /dev/null
+++ b/scripts/text_overlay.py
@@ -0,0 +1,97 @@
+#!/usr/bin/env python3
+"""
+Text overlays via Pillow -> transparent PNG (this ffmpeg has no libass/drawtext,
+so captions/watermark are rendered as images and composited with `overlay`).
+"""
+import os
+from PIL import Image, ImageDraw, ImageFont
+
+FONT_BOLD = [
+ "/System/Library/Fonts/Supplemental/Arial Bold.ttf",
+ "/Library/Fonts/Arial Bold.ttf",
+ "/System/Library/Fonts/Supplemental/Arial.ttf",
+]
+FONT_REG = [
+ "/System/Library/Fonts/Supplemental/Arial.ttf",
+ "/Library/Fonts/Arial.ttf",
+]
+
+
+def _font(paths, size):
+ for p in paths:
+ if os.path.exists(p):
+ return ImageFont.truetype(p, size)
+ return ImageFont.load_default()
+
+
+def _wrap(draw, text, fnt, max_w):
+ words, lines, cur = text.split(), [], ""
+ for w in words:
+ trial = f"{cur} {w}".strip()
+ if draw.textlength(trial, font=fnt) <= max_w:
+ cur = trial
+ else:
+ if cur:
+ lines.append(cur)
+ cur = w
+ if cur:
+ lines.append(cur)
+ return lines
+
+
+def render_caption(text, out_path, W=1920, H=1080, margin_v=None):
+ img = Image.new("RGBA", (W, H), (0, 0, 0, 0))
+ d = ImageDraw.Draw(img)
+ size = int(min(W, H) * 0.045) # size by short edge (works 16:9 & 9:16)
+ if margin_v is None:
+ margin_v = int(H * 0.06)
+ fnt = _font(FONT_BOLD, size)
+ lines = _wrap(d, text, fnt, int(W * 0.8))
+ lh = int(size * 1.32)
+ total_h = lh * len(lines)
+ y = H - margin_v - total_h
+ for ln in lines:
+ w = d.textlength(ln, font=fnt)
+ x = (W - w) / 2
+ d.text((x, y), ln, font=fnt, fill=(255, 255, 255, 255),
+ stroke_width=max(2, size // 12), stroke_fill=(0, 0, 0, 235))
+ y += lh
+ img.save(out_path)
+ return out_path
+
+
+def render_title(text, out_path, W=1080, H=1920, sub=None):
+ """Big centered title (dark on transparent) for the ending assembly card."""
+ img = Image.new("RGBA", (W, H), (0, 0, 0, 0))
+ d = ImageDraw.Draw(img)
+ size = int(min(W, H) * 0.075)
+ fnt = _font(FONT_BOLD, size)
+ lines = _wrap(d, text, fnt, int(W * 0.86))
+ lh = int(size * 1.2)
+ y = int(H * 0.1)
+ for ln in lines:
+ w = d.textlength(ln, font=fnt)
+ d.text(((W - w) / 2, y), ln, font=fnt, fill=(40, 30, 24, 255),
+ stroke_width=2, stroke_fill=(255, 255, 255, 180))
+ y += lh
+ if sub:
+ sf = _font(FONT_REG, int(size * 0.4))
+ sw = d.textlength(sub, font=sf)
+ d.text(((W - sw) / 2, y + 6), sub, font=sf, fill=(150, 40, 30, 255))
+ img.save(out_path)
+ return out_path
+
+
+def render_watermark(text, out_path, W=1920, H=1080):
+ img = Image.new("RGBA", (W, H), (0, 0, 0, 0))
+ d = ImageDraw.Draw(img)
+ size = int(min(W, H) * 0.024) # size by short edge
+ fnt = _font(FONT_REG, size)
+ tw = d.textlength(text, font=fnt)
+ pad = 14
+ x, y = W - tw - 28 - pad, H - size - 28 - pad
+ d.rounded_rectangle([x - pad, y - pad, x + tw + pad, y + size + pad + 4],
+ radius=8, fill=(0, 0, 0, 90))
+ d.text((x, y), text, font=fnt, fill=(255, 255, 255, 210))
+ img.save(out_path)
+ return out_path
diff --git a/vox-director.skill b/vox-director.skill
new file mode 100644
index 0000000..48ad0e2
Binary files /dev/null and b/vox-director.skill differ