Skip to content

gooseworks-ai/goose-skills / skills/video/render-cosmic-mythology-voiceover

render-cosmic-mythology-voiceover

Verified

Assemble a cosmic-mythology-voiceover reel from a config — one spoken voiceover carries the whole narrative while N curated stills in one chosen look are weighted beat-synced across the delivered VO duration (cut_dur = VO_dur times weight over the weight sum, so emotional beats hold longer), Ken-Burns-zoomed per still (scale 2x, center crop, zoompan, fade-in first and fade-out last), ffmpeg-concatenated, the VO composited under the picture (libx264 crf18 plus aac), the ONE on-screen hook line faded on over the open with a drawtext alpha window, and Whisper/VEED captions burned along the bottom — never in-world text on a still. This is the FREE deterministic assembly stage (weighted sequence plus Ken-Burns plus concat plus VO composite plus hook overlay plus caption burn); the VO and the stills come from create-vo-elevenlabs and create-image-fal. Use for the cosmic-mythology-voiceover format.

FileKindSize
SKILL.mdskill md5.6 KB
scripts/PIPELINE.mdmarkdown5.6 KB
scripts/README.mdmarkdown4.6 KB
scripts/config.example.jsonconfig9.7 KB
scripts/render.pyscript11.8 KB
skill.meta.jsonconfig243 B
tests/smoke-test.mdmarkdown1.7 KB

scripts/README.md

View on GitHub
# render-cosmic-mythology-voiceover scripts — the FREE assembly

`render-cosmic-mythology-voiceover` is the **deterministic, free assembly stage** of the
cosmic-mythology-voiceover format. The paid stages (the spoken VO, the N hero stills) are
separate capabilities — `create-vo-elevenlabs`, `create-image-fal`. This capability spends nothing
(the caption burn has a free local Whisper + ffmpeg fallback): it takes the atempo VO + the stills
+ the per-cut weight array + the hook line and stitches the finished master. Re-cuts (re-weighted
windows, new hook timing, caption chunking, zoom params) reuse the existing VO / stills and spend
nothing.

`config.example.json` is the worked example (Peerlark Optics "The North Star isn't the brightest", ~31s
1080×1920) — its script, voice, look and shots are the demo's; the recipe's choices supply yours. `PIPELINE.md` maps every config block to its production step. This README documents the
FREE assembly pieces that `render-cosmic-mythology-voiceover` owns.

## 0. Run it — `render.py` (config-driven, portable)

There IS a single runnable script: `scripts/render.py`. Given the bound recipe config + the atempo
VO + the stills, it does the whole free assembly (sequence → Ken-Burns → concat → VO composite →
hook → captions → optional end card) and reports duration/size/bitrate:

```bash
python3 scripts/render.py \
  --config config.json \                 # the recipe.config bound for this brand
  --vo     working/vo2/vo_atempo.mp3 \    # the atempo VO (delivered duration sets the timeline)
  --stills-dir working/stills \           # holds <still-id>.png for every sequence cut
  --out    working/final.mp4 \
  --words  working/vo2/words.json \       # OPTIONAL word-timing JSON → captions (skipped if absent)
  --endcard working/endcard.png           # OPTIONAL brand end card, appended ~2.6s
```

Deps: **ffmpeg + Pillow only** — NO API keys, and NO `drawtext`/`libass` required (the hook +
captions burn as timed PIL PNG overlays; see §3–4). `--words` is any word-level timing list
(`[{word|text,start,end}]`, groq/fal shapes both accepted) — the orchestrator makes it from the VO
via the proxy Whisper. A re-cut (new weights/hook timing/caption chunking/zoom) reuses the same VO +
stills for free.

## 1. Weighted beat-sync sequencing

The delivered VO duration sets the timeline. For each cut in `sequence.cuts[]`, the cut duration is
`cut_dur = VO_dur × weight / Σweights` — so heavier weights **hold longer** on the emotional beats
(in the demo: the open, the reframe, the "look north" close) and the lighter setup cuts run shorter. Every
cut stays proportional to the whole VO; never trim the VO to a pre-planned grid. Stills are
reusable — the sequence repeats a few across the ~10–12 cuts.

## 2. Ken-Burns render per still

Each cut renders as a Ken Burns move with ffmpeg: scale 2×, center crop, and a
`zoompan` to the configured `zoom_end` (~1.10). Apply `zoom_out` on the flagged cuts. The FIRST cut
gets a `fade_in` (~0.4s) up from black and the LAST cut a `fade_out` (~0.6s); the body cuts
hard-join.

## 3. Concat + VO composite + hook overlay

- **Concat:** ffmpeg-concat the N Ken-Burns clips (`-c copy`) → the background.
- **VO composite:** one ffmpeg pass composites the atempo VO under the picture (libx264 `crf 18` +
  aac 192k). The spoken VO IS the bed — no separate VO and no music bed by default.
- **Hook overlay:** the ONE hook line, alpha-faded over the **open** only (fade in ~0.5s, hold,
  fade out ~0.6s) — never a persistent caption, never in-world text. `render.py` renders the line to
  a transparent PIL PNG and fades it with ffmpeg `fade=…:alpha=1`, so it needs NO `drawtext` filter
  (stock Homebrew ffmpeg often lacks it). If your ffmpeg *has* `drawtext`, that's an equivalent
  alternative — but the PIL path is the portable default.

## 4. Caption burn

VEED/Whisper subtitle burn tracks the spoken VO in the **bottom** third, white `#FFFFFF`, on the
draft. If the host ffmpeg lacks libass (no `subtitles`/`ass` filter), render the cues as timed PIL
PNG overlays composited with ffmpeg `overlay=…:enable='between(t,st,en)'` instead — same bottom
placement, no libass dependency. A local Whisper + ffmpeg burn is the **free** fallback to the VEED
tier. The stills carry no in-world text — the reel's only text is the hook + these captions.

## 5. FFmpeg composite

FFmpeg stitches the master: weighted-sequence the cuts, Ken-Burns-render each still, concat, burn
the VO composite + the hook alpha-fade + the caption track → a 1080×1920 h264 + aac master (~31s).
Deterministic, no paid calls, no keys (the local caption fallback is free).
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
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: 196kUpdated Claude CodeCodexVerifiedInstall