Skip to content

gooseworks-ai/goose-skills / skills/video/caption-burn

caption-burn

Verified

Burned-in captions for a finished vertical video, three kinds. transcribe.py gets word timings from the video's own audio through the GooseWorks proxy (fal Whisper, charged to your GooseWorks credits, cents); captions.py burns one to three words at a time with Pillow + ffmpeg (no libass needed), either pinned to a split-screen seam (plate 25% above / 75% below) or at a fixed height, in a plate, outline or one-word serif style, with an optional red hook card; plates.py burns per-beat caption blocks (black, one union silhouette, placed in the emptiest band) for formats with no voice. The last caption (the CTA) holds to the final frame. Use as the last step of any video ad.

FileKindSize
SKILL.mdskill md4.7 KB
scripts/_fonts.pyscript3.0 KB
scripts/captions.pyscript12.6 KB
scripts/footprint.pyscript2.6 KB
scripts/media_proxy.pyscript56.8 KB
scripts/plates.pyscript7.5 KB
scripts/transcribe.pyscript1.9 KB
skill.meta.jsonconfig243 B
tests/smoke-test.mdmarkdown634 B

scripts/transcribe.py

View on GitHub
#!/usr/bin/env python3
"""Word-level transcript of a video or audio file, through the GooseWorks proxy (fal
Whisper, charged to your GooseWorks credits; a few cents a minute).

    transcribe.py --media reel.mp4 --out reel.words.json [--offset 0] [--language en]

Writes [{"text", "start", "end"}, ...] in the media's own time (+ --offset). Captions and
line alignment are timed from THIS, measured on the finished audio, never from the
script's estimate: a generated voice never speaks at the estimated pace.
"""
import argparse
import json
import pathlib
import subprocess
import tempfile

from media_proxy import fal_upload, fal_whisper


def main():
    ap = argparse.ArgumentParser()
    ap.add_argument("--media", required=True)
    ap.add_argument("--out", required=True)
    ap.add_argument("--offset", type=float, default=0.0)
    ap.add_argument("--language", default="en")
    a = ap.parse_args()
    with tempfile.TemporaryDirectory() as td:
        mp3 = pathlib.Path(td) / "audio.mp3"
        subprocess.run(["ffmpeg", "-v", "error", "-y", "-i", a.media, "-vn", "-ac", "1", "-ar", "16000",
                        "-b:a", "64k", str(mp3)], check=True)
        url = fal_upload(mp3, "audio/mpeg")
        words = fal_whisper(url, language=a.language, timeout_s=900)
    out = []
    for w in words:
        if w.get("start") is None or w.get("end") is None or not w.get("text"):
            continue
        out.append({"text": w["text"], "start": round(w["start"] + a.offset, 3),
                    "end": round(w["end"] + a.offset, 3)})
    pathlib.Path(a.out).write_text(json.dumps(out, indent=1, ensure_ascii=False), encoding="utf-8")
    print("[transcribe] %d words, %.2f-%.2fs -> %s" % (len(out), out[0]["start"] if out else 0,
                                                     out[-1]["end"] if out else 0, a.out))
    print("  " + " ".join(w["text"] for w in out)[:300])


if __name__ == "__main__":
    main()
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: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated 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: 194kUpdated Claude CodeCodexVerifiedInstall