gooseworks-ai/goose-skills / skills/video/render-hypermotion
render-hypermotion
VerifiedAssemble the FREE steps of the product-hypermotion + kinetic-typography video format — dice ONE Seedance 2.0 hypermotion clip into 5-6 segments and intercut them with PIL kinetic-typography spec/CTA cards (italic skew, 1.08x outline echo, 3D extrusion, slam-with-shake, inversion flash) plus a real-logo PIL end card (base64-decoded from the brand SVG), center-crop 1:1 to 9:16, and explicit-map mux a music bed. Deterministic, FREE (PIL + FFmpeg), no paid calls, the real logo and spec typography stay pixel-crisp. The paid steps (the ONE Seedance i2v, the music) are separate capabilities; the recipe orchestrates them. Use for the product-hypermotion format.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 5.7 KB |
| scripts/PIPELINE.md | markdown | 9.8 KB |
| scripts/README.md | markdown | 5.2 KB |
| scripts/config.example.json | config | 6.5 KB |
| skill.meta.json | config | 173 B |
| tests/smoke-test.md | markdown | 1.3 KB |
scripts/PIPELINE.md
View on GitHub# Pipeline — product hypermotion + specs
The source format has **no runnable driver**: the pipeline is prose + referenced atoms +
inline PIL/ffmpeg. This doc is the step-by-step recipe, naming the atom/tool each step
uses. Config lives in `config.example.json`. The demo's reference implementations (`gen_kinetic_v6.py`,
`gen_endcard_v10.py`, `assemble_v10.py`) are not vendored here — rebuild them from this doc.
Two PAID calls total (Seedance i2v + ElevenLabs Music). Everything else is free
PIL/ffmpeg. Guard **both** paid calls with skip-if-exists so a re-run never re-bills.
> **Worked example, not the format.** Glowmule values throughout (adventure energy,
> mountain campsite ledge, blue-hour amber rim, 124 BPM outdoor anthem, the spec strings,
> amber accent) are the demo's build. Energy, environment, lighting and music come from the
> recipe's `choices` (`energy`, `environment`, `lighting`, `music`); spec callouts, logo,
> colours and CTA come from the brand kit.
Keys: none to set. GooseWorks holds every key; the two paid calls go through the media proxy
(the `create-video-seedance-2-fal` and `create-music-elevenlabs` atoms).
---
## Phase 0 — Brand asset gathering (autonomous, free)
1. **Hero product PNG.** Scrape the highest-res PDP shot (Shopify: `curl -sL
"${product_url}.json" | jq -r '.product.images[0].src'`). Real photo, NOT AI-gen. This
is the Seedance start frame. → `assets/product/`.
2. **Brand logo PNG.** Most brand SVGs wrap a base64 PNG — decode it out:
```python
import re, base64
svg = open('logo.svg').read()
m = re.search(r'data:image?/png;base64,([A-Za-z0-9+/=]+)', svg)
open('logo.png', 'wb').write(base64.b64decode(m.group(1)))
```
Pure-vector SVG (rare) → `rsvg-convert -w 2400 logo.svg -o logo.png`. Validated on
the demo → a clean, wide real wordmark. → `assets/logo/`.
3. **Palette.** Count `#xxxxxx` in the homepage CSS; map the dominant accent →
`accent_color_hex`.
4. **Font.** Download the **static** Space Grotesk Bold (variable TTF renders as Regular in
PIL):
`curl -sSL -o assets/fonts/SpaceGrotesk-Bold.ttf https://raw.githubusercontent.com/floriankarsten/space-grotesk/master/fonts/ttf/static/SpaceGrotesk-Bold.ttf`
5. Write `config.json` + `brief.md`. **GATE 1** — show the brief + 5-block Seedance prompt
+ spec callouts (GooseWorks shows the price on the card).
---
## Phase 1 — Hypermotion + music, in parallel [PAID — GATE]
Fire both concurrently; each behind a skip-if-exists guard.
### 1a. Seedance i2v hypermotion — atom `create-video-seedance-2-fal` (paid, one 15s call)
The prompt MUST carry all **5 blocks** in order (see `config.hypermotion_i2v.prompt_blocks`).
The 5th block (ABSOLUTE CONSTRAINTS) is what stops geometry drift — an early demo take
run without it morphed the product into a different object mid-clip. Rules for block 4: ONE camera move
per beat (Seedance fails on stacked moves), 3–5 beats, first beat high-energy, last beat a
settle.
```python
import fal_client, os # paid call: the atom routes it through the media proxy
prompt = "\n\n".join(cfg["hypermotion_i2v"]["prompt_blocks"].values())
image_url = fal_client.upload_file(cfg["product_image"])
if not os.path.exists("working/hypermotion-raw.mp4"): # skip-if-exists
r = fal_client.subscribe("fal-ai/bytedance/seedance/v2/pro/image-to-video",
arguments={"prompt": prompt, "image_url": image_url,
"duration": "15", "resolution": "1080p",
"aspect_ratio": "1:1", "generate_audio": False})
# download r["video"]["url"] -> working/hypermotion-raw.mp4
```
### 1b. ElevenLabs Music — atom `create-music-elevenlabs` (paid)
`fal-ai/elevenlabs/music`, generate at target length, `output_format: mp3_44100_192`.
Bake the sync points into the prompt (kick at 1s for the first cut, build 10–20s, peak +
lyric hook at 20s for the CTA, lyric land at ~22s for the end-card inversion flash). Music
with a single rallying lyric is a feature here — no VO competes.
---
## Phase 2 — Kinetic-typography cards (autonomous, free)
Render each card 1080×1920 via PIL **frame-by-frame** → PNG sequence
(`working/kinetic-frames/<label>/f%04d.png`) → ffmpeg-encode (yuv420p, libx264) →
`working/kinetic-movs/<label>.mp4` — keep each card's `label` equal to its `text_cards` key
(`intro`, `spec_1`..`spec_N`, `cta`, plus `endcard`) so `beat_structure.concat_order` resolves
straight to `kinetic-movs/<key>.mp4`. (The demo's older config used content-named labels
like `spec_<value>` / `cta_<word>`; don't copy those.) Reference impl: `gen_kinetic_v6.py` (spec/CTA cards),
`gen_endcard_v10.py` (end card).
### The 11 validated PIL techniques
| Technique | Helper | Use | Note |
|---|---|---|---|
| Italic skew | `italicize(img, 6)` — affine shear | faux italic | 6° = subtle; 10°+ cartoony |
| Outline echo | transparent fill + colored stroke | ambient shadow behind text | scale **1.08×** bleed-safe sweet spot |
| 3D extrusion | stack 18–28 offset copies + solid face | hero stat / CTA pop | side color = brand accent; shadow_dx/dy=(2,2) |
| Repetition stack | same word at multiple Y | layered look | 4 echoes around 1 solid |
| Slam-with-shake | scale 0.3→1.10 cubic-ease + sin/cos shake | killer-stat reveal | shake × (1−p) decay over 0.20s |
| Drop-in staggered | per-char entry + motion blur | letters fall from above | char_in 0.30s, stagger 0.04s |
| Mask wipe | cover unwiped part with BG | reveal by wipe | colored leading edge |
| Letterbox slide | line1 from left / line2 from right | two-line entry | x_off = ±W·(1−ease) |
| Color flash | BG transition 0.15s + type invert | CTA energy | invert type too or legibility drops |
| Inversion flash | full-frame BG/type swap 0.3s | mid-clip art moment | bg↔accent (demo: black↔amber) |
| Dark grain BG | `dark_grain_bg(w,h,(12,12,12),grain=12)` | industrial base | (paper_texture for editorial only — off-brand here) |
### Cards to render (per `config.text_cards` + `config.end_card`)
- `intro` (1.0s) — "INTRODUCING", italic + outline echo on the dark grain BG.
- `spec_1` … `spec_N` (1.5s each) — **hero stat = 3D extrusion in accent color**; the rest
cycle italic + outline-echo / white-slam / sparkle / shadow-stack.
- `cta` (1.5s) — 3D extrusion + accent→black color flash.
- `endcard` (3.5s) — the **real logo PNG** with a slam-motion-blur entry, settle,
**continuous micro-motion** (±1% scale pulse + ±3px drift — never freeze), an inversion
flash at ~60% of the card, and a cascade reveal of the spec-dot subtitle
(from approved specs; demo: "3000 LM · 72 HRS · IPX7") + CTA. Composite the logo scaled to `logo_target_w` (leaves
~80px margin), LANCZOS resize, GaussianBlur the motion-blur frames.
Entry-motion timing (kept across every demo iteration):
```python
if t < 0.40: p=t/0.40; ease=1-(1-p)**4; scale=0.5+(1.18-0.5)*ease; blur=(1-p)*22
elif t < 0.70: p=(t-0.40)/0.30; scale=1.18-0.18*p; blur=0
else: d=t-0.70; scale=1.0+0.010*math.sin(d*1.4); x_off=int(3*math.sin(d*1.1)); blur=0
```
---
## Phase 3 — Dice + intercut + mux (autonomous, free)
1. **Center-crop** the hypermotion 1:1 → 9:16:
```bash
ffmpeg -i working/hypermotion-raw.mp4 -vf "scale=-1:1920,crop=1080:1920:(iw-1080)/2:0,fps=30" -c:v libx264 -crf 18 working/hypermotion-9x16.mp4
```
2. **Dice into 5–6 segments** at beat boundaries via `-ss/-t` (see
`config.beat_structure.hypermotion_segments_s`). Decreasing lengths build energy; cut on
Seedance's natural beats (crash-zoom → orbit → settle), inspected via /watch:watch — NOT
at uniform intervals.
3. **Concat** cards + segments in `config.beat_structure.concat_order`
(intro → segA → spec1 → segB → spec2 → segC → spec3 → segD → spec4 → segE → spec5 →
segF → cta → endcard). Build `concat.txt` with absolute paths, then:
```bash
ffmpeg -y -f concat -safe 0 -i concat.txt -c copy working/master-silent.mp4
```
4. **Mux music as a SEPARATE pass** with explicit maps (default mapping silently yields
1 kbps garbage audio):
```bash
ffmpeg -y -i working/master-silent.mp4 -i working/music.mp3 \
-c:v copy -c:a aac -b:a 192k -ar 44100 -map 0:v -map 1:a -shortest \
-movflags +faststart master-final.mp4
```
Verify `ffprobe` audio bit_rate ≈ 192000 (NOT 1000).
### Beat-structure variants
- **25s (5 specs, default):** 15s hypermotion → 6 segments (2.5/2.5/2.0/1.5/1.5/1.5s).
- **20s (4 specs):** 5 segments (2.0×3, 1.5×2), CTA 1.0s, endcard 3.0s.
- **30s (6 specs):** needs a 20s hypermotion source > Seedance's 15s cap — chain 2 calls or
reuse one segment.
- BPM alignment: `music.bpm` follows the user's `energy` + `music` choices (demo: 124 for
adventure). At ~120–128 BPM, 4 beats ≈ 2.0s (segment), 3 beats ≈ 1.5s (spec card). Slower
beds (~100 BPM, e.g. sport/utility/rock) → round segments up to 2.5s, spec cards to 1.8s.
Faster beds (drum & bass ~170 BPM) → cut on 8 beats ≈ 2.8s or keep 2-beat stabs.
---
## Phase 4 — Watch / QC (mandatory before ship)
`/watch:watch master-final.mp4`. Confirm: duration ±0.5s, 1080×1920; every card readable
(echoes ≤1.08×); product holds identity across every segment (label sharp, no morph);
no people/hands/text inside the hypermotion clip; end-card **real logo** sharp +
micro-moving (not frozen); inversion flash on beat (~60%); music holds to the tail (no
decay), aligned to cuts; audio ≈192 kbps aac. Re-render cards / re-cut for free; only re-fire
the paid Seedance call if the clip itself drifted.
## Paid vs free (validated on the demo)
| Item | Paid? | Note |
|---|---|---|
| Seedance 2.0 i2v 15s (1080p, audio off) | **PAID** | one call, diced into 6 |
| ElevenLabs Music 25s | **PAID** | |
| PIL cards + ffmpeg dice/concat/mux + logo extract | free | |
One run is the two paid calls; every extra iteration re-fires them, so guard both
with skip-if-exists. GooseWorks quotes the price.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |