Skip to content

andyhuo520/vibe-knowledge / skills/ai-teardown

ai-teardown

Unverified

「AI 拆机课」系列课工作室:输入一个主题(AI 产品、开源项目/书、人物历史、软件教程),产出由浅入深、每句话有出处的中文讲解视频系列 + 每节互动版 + 课程总页。流水线:收集资料 → 确认对象与课时 → 大纲 → 逐节旁白(MiMo 克隆音色 + 逐字对齐)→ scenes.json 画面编排(Notion 极简手绘引擎 / 马卡龙模板引擎,IconPark 图标与插画、Noto 动态 emoji、AntV X6 流程图、像素讲解小人、截图圈注、终端录屏)或 film.js 代码成片(cine 引擎:Three.js、粒子、着色器、真片段叠加、曲库配乐)→ Hyperframes / 无头 GPU 逐帧 1080p 渲染 → Artifact 发布 → 课程总页 + 导学视频。触发:做系列课 / 做课程视频 / 把某本书或某个开源项目做成课 / 科普讲解视频 / 教学视频 / 课程地图 / 导学视频 / 互动课件 / 「拆机课」「上手课」「实战课」「编排课」/ 王炸讲解片 / 用真实会话和成片教人做视频。不用于:单支宣传片(用 promo-video)、单张信息图、纯文章写作。

FileKindSize
SKILL.mdskill md8.9 KB
engine/assets/fonts/Geist-VF.ttfbinary165.1 KB
engine/assets/fonts/GeistMono-VF.ttfbinary167.9 KB
engine/assets/fonts/LXGWWenKai-Medium.ttfbinary24.2 MB
engine/assets/fonts/LXGWWenKai-Regular.ttfbinary24.4 MB
engine/assets/fonts/NotoSansSC-VF.ttfbinary16.9 MB
engine/assets/iconsets/README.mdmarkdown834 B
engine/assets/iconsets/icon-park-outline.jsonconfig984.1 KB
engine/assets/iconsets/icon-park-solid.jsonconfig946.0 KB
engine/assets/iconsets/icon-park-twotone.jsonconfig991.3 KB
engine/assets/iconsets/icon-park.jsonconfig1.5 MB
engine/assets/iconsets/iconoir.jsonconfig648.2 KB
engine/assets/iconsets/lucide.jsonconfig563.5 KB
engine/assets/iconsets/tabler.jsonconfig2.0 MB
engine/assets/illustrations/iconpark/_sheet.htmlother9.8 KB
engine/assets/illustrations/iconpark/a1-1.svgother7.7 KB
engine/assets/illustrations/iconpark/a1-2.svgother5.7 KB
engine/assets/illustrations/iconpark/a1-3.svgother12.8 KB
engine/assets/illustrations/iconpark/a1-4.svgother7.8 KB
engine/assets/illustrations/iconpark/a10-120.svgother18.7 KB
engine/assets/illustrations/iconpark/a10-121.svgother19.6 KB
engine/assets/illustrations/iconpark/a10-122.svgother28.3 KB
engine/assets/illustrations/iconpark/a10-123.svgother33.1 KB
engine/assets/illustrations/iconpark/a11-136.svgother7.9 KB
engine/assets/illustrations/iconpark/a11-137.svgother5.2 KB
engine/assets/illustrations/iconpark/a11-138.svgother6.5 KB
engine/assets/illustrations/iconpark/a11-139.svgother7.8 KB
engine/assets/illustrations/iconpark/a12-152.svgother12.7 KB
engine/assets/illustrations/iconpark/a12-153.svgother13.7 KB
engine/assets/illustrations/iconpark/a12-154.svgother21.2 KB
engine/assets/illustrations/iconpark/a12-155.svgother9.3 KB
engine/assets/illustrations/iconpark/a13-167.svgother5.0 KB
engine/assets/illustrations/iconpark/a13-168.svgother5.0 KB
engine/assets/illustrations/iconpark/a13-169.svgother3.5 KB
engine/assets/illustrations/iconpark/a13-170.svgother4.6 KB
engine/assets/illustrations/iconpark/a14-184.svgother17.4 KB
engine/assets/illustrations/iconpark/a14-185.svgother27.5 KB
engine/assets/illustrations/iconpark/a14-186.svgother35.2 KB
engine/assets/illustrations/iconpark/a14-187.svgother34.1 KB
engine/assets/illustrations/iconpark/a15-200.svgother19.8 KB
engine/assets/illustrations/iconpark/a15-201.svgother20.3 KB
engine/assets/illustrations/iconpark/a15-202.svgother19.2 KB
engine/assets/illustrations/iconpark/a15-203.svgother24.3 KB
engine/assets/illustrations/iconpark/a16-215.svgother10.1 KB
engine/assets/illustrations/iconpark/a16-216.svgother16.5 KB
engine/assets/illustrations/iconpark/a16-217.svgother10.2 KB
engine/assets/illustrations/iconpark/a16-218.svgother15.2 KB
engine/assets/illustrations/iconpark/a17-230.svgother7.0 KB
engine/assets/illustrations/iconpark/a17-231.svgother6.8 KB
engine/assets/illustrations/iconpark/a17-232.svgother8.6 KB
engine/assets/illustrations/iconpark/a17-233.svgother5.5 KB
engine/assets/illustrations/iconpark/a18-245.svgother15.2 KB
engine/assets/illustrations/iconpark/a18-246.svgother14.1 KB
engine/assets/illustrations/iconpark/a18-247.svgother8.9 KB
engine/assets/illustrations/iconpark/a18-248.svgother8.7 KB
engine/assets/illustrations/iconpark/a19-265.svgother9.4 KB
engine/assets/illustrations/iconpark/a19-266.svgother11.5 KB
engine/assets/illustrations/iconpark/a19-267.svgother6.6 KB
engine/assets/illustrations/iconpark/a19-268.svgother5.5 KB
engine/assets/illustrations/iconpark/a2-11.svgother8.8 KB
engine/assets/illustrations/iconpark/a2-12.svgother10.7 KB
engine/assets/illustrations/iconpark/a2-13.svgother116.5 KB
engine/assets/illustrations/iconpark/a2-14.svgother35.3 KB
engine/assets/illustrations/iconpark/a20-280.svgother10.4 KB
engine/assets/illustrations/iconpark/a20-281.svgother17.7 KB
engine/assets/illustrations/iconpark/a20-282.svgother12.5 KB
engine/assets/illustrations/iconpark/a20-283.svgother13.1 KB
engine/assets/illustrations/iconpark/a21-295.svgother10.4 KB
engine/assets/illustrations/iconpark/a21-296.svgother21.2 KB
engine/assets/illustrations/iconpark/a21-297.svgother8.3 KB
engine/assets/illustrations/iconpark/a21-298.svgother17.5 KB
engine/assets/illustrations/iconpark/a22-327.svgother10.6 KB
engine/assets/illustrations/iconpark/a22-328.svgother12.4 KB
engine/assets/illustrations/iconpark/a22-329.svgother5.4 KB
engine/assets/illustrations/iconpark/a22-330.svgother10.5 KB
engine/assets/illustrations/iconpark/a3-19.svgother8.0 KB
engine/assets/illustrations/iconpark/a3-20.svgother8.4 KB
engine/assets/illustrations/iconpark/a3-21.svgother10.1 KB
engine/assets/illustrations/iconpark/a3-22.svgother10.4 KB
engine/assets/illustrations/iconpark/a4-31.svgother2.7 KB
engine/assets/illustrations/iconpark/a4-32.svgother1.7 KB
engine/assets/illustrations/iconpark/a4-33.svgother1.7 KB
engine/assets/illustrations/iconpark/a4-34.svgother1.5 KB
engine/assets/illustrations/iconpark/a5-46.svgother21.5 KB
engine/assets/illustrations/iconpark/a5-47.svgother15.0 KB
engine/assets/illustrations/iconpark/a5-48.svgother11.8 KB
engine/assets/illustrations/iconpark/a5-49.svgother19.8 KB
engine/assets/illustrations/iconpark/a6-52.svgother15.5 KB
engine/assets/illustrations/iconpark/a6-53.svgother2.9 KB
engine/assets/illustrations/iconpark/a6-54.svgother3.6 KB
engine/assets/illustrations/iconpark/a6-55.svgother4.1 KB
engine/assets/illustrations/iconpark/a7-67.svgother6.0 KB
engine/assets/illustrations/iconpark/a7-68.svgother14.1 KB
engine/assets/illustrations/iconpark/a7-71.svgother10.8 KB
engine/assets/illustrations/iconpark/a7-72.svgother21.6 KB
engine/assets/illustrations/iconpark/a8-87.svgother3.3 KB
engine/assets/illustrations/iconpark/a8-88.svgother2.6 KB
engine/assets/illustrations/iconpark/a8-89.svgother2.6 KB
engine/assets/illustrations/iconpark/a8-90.svgother2.5 KB
engine/assets/illustrations/iconpark/a9-101.svgother4.7 KB
engine/assets/illustrations/iconpark/a9-102.svgother5.3 KB
engine/assets/illustrations/iconpark/a9-103.svgother5.2 KB
engine/assets/illustrations/iconpark/a9-104.svgother8.9 KB
engine/assets/illustrations/iconpark/catalog.jsonconfig19.7 KB
engine/cine/audio/sfx/README.mdmarkdown404 B
engine/cine/audio/sfx/key-1.wavbinary14.7 KB
engine/cine/audio/sfx/key-2.wavbinary14.7 KB
engine/cine/audio/sfx/key-3.wavbinary14.7 KB
engine/cine/audio/sfx/key-4.wavbinary14.7 KB
engine/cine/audio/sfx/key-5.wavbinary14.7 KB
engine/cine/audio/sfx/key-6.wavbinary14.7 KB
engine/cine/audio/sfx/key-7.wavbinary14.7 KB
engine/cine/audio/sfx/key-8.wavbinary14.7 KB
engine/cine/audio/sfx/key-space.wavbinary14.7 KB
engine/cine/audio/timeline.jsonconfig38.4 KB
engine/cine/audio/tools/bed.pyscript37.0 KB
engine/cine/audio/tools/score.pyscript93.0 KB
engine/cine/engine/core.jsscript4.4 KB
engine/cine/engine/glsl.jsscript2.6 KB
engine/cine/engine/narr.jsscript2.7 KB
engine/cine/engine/post.jsscript7.4 KB
engine/cine/engine/scenes/bars.jsscript4.8 KB
engine/cine/engine/scenes/clock.jsscript8.2 KB
engine/cine/engine/scenes/liquid.jsscript4.1 KB
engine/cine/engine/scenes/particles.jsscript9.5 KB
engine/cine/engine/scenes/showroom.jsscript5.0 KB
engine/cine/engine/scenes/tunnel.jsscript4.3 KB
engine/cine/engine/ui.jsscript9.2 KB
engine/cine/engine/util.jsscript2.8 KB
engine/cine/index.htmlother1.4 KB
engine/cine/tools/browser.pyscript802 B
engine/cine/tools/clips.pyscript3.1 KB
engine/cine/tools/deliver.shexecutablescript1.3 KB
engine/cine/tools/finish.pyscript9.3 KB
engine/cine/tools/loopbed.pyscript2.3 KB
engine/cine/tools/queue.shexecutablescript1.7 KB
engine/cine/tools/record.pyscript2.8 KB
engine/cine/tools/retail.pyscript1.8 KB
engine/cine/tools/stills.pyscript2.4 KB
engine/primitives/cards.jsscript13.5 KB
engine/primitives/floaties.jsscript2.5 KB
engine/primitives/loop.jsscript8.2 KB
engine/primitives/mascot.jsscript6.8 KB
engine/primitives/mindmap.jsscript6.7 KB
engine/primitives/morph.jsscript9.2 KB
engine/primitives/motion.jsscript22.5 KB
engine/primitives/portrait.jsscript4.9 KB
engine/primitives/practice.jsscript8.6 KB
engine/primitives/sandbox.jsscript7.4 KB
engine/primitives/scribble.jsscript6.7 KB
engine/primitives/sketch.jsscript23.1 KB
engine/primitives/story.jsscript21.9 KB
engine/primitives/systemmap.jsscript11.4 KB
engine/primitives/terminal.jsscript8.5 KB
engine/primitives/timeline.jsscript7.1 KB
engine/primitives/typer.jsscript9.9 KB
engine/runtime/dom.jsscript4.1 KB
engine/runtime/ease.jsscript2.1 KB
engine/runtime/hosts/player.jsscript11.4 KB
engine/runtime/iconify.jsscript3.1 KB
engine/runtime/lesson.jsscript25.6 KB
engine/runtime/overlays.jsscript13.6 KB
engine/runtime/sketch.jsscript60.8 KB
engine/runtime/spring.jsscript2.8 KB
engine/runtime/stage.jsscript6.6 KB
engine/runtime/theme.jsscript6.5 KB
engine/runtime/typing.jsscript4.4 KB
engine/schemas/brief.schema.jsonconfig2.8 KB
engine/schemas/concepts.schema.jsonconfig3.8 KB
engine/schemas/facts.schema.jsonconfig2.4 KB
engine/schemas/lesson.schema.jsonconfig7.0 KB
engine/schemas/sources.schema.jsonconfig1.8 KB
engine/scripts/check.pyscript13.7 KB
engine/scripts/check_scenes.pyscript3.7 KB
engine/scripts/course_page.pyscript24.5 KB
engine/scripts/emoji.pyscript2.5 KB
engine/scripts/export_cues.pyscript975 B
engine/scripts/facts_js.pyscript1.6 KB
engine/scripts/fetch_images.pyscript4.6 KB
engine/scripts/fx_render.pyscript7.8 KB
engine/scripts/hf_host.pyscript4.8 KB
engine/scripts/icons.pyscript1.7 KB
engine/scripts/illus.pyscript852 B
engine/scripts/ledger.pyscript1.1 KB
engine/scripts/make_lesson.pyscript11.5 KB
engine/scripts/mark_live.pyscript1.0 KB
engine/scripts/mix.pyscript4.4 KB
engine/scripts/new_series.pyscript5.1 KB
engine/scripts/noto_emoji.pyscript3.2 KB
engine/scripts/outline.pyscript4.4 KB
engine/scripts/publish_lesson.pyscript6.3 KB
engine/scripts/rec_scan.pyscript1.2 KB
engine/scripts/render_queue.shexecutablescript770 B
engine/scripts/review_page.pyscript6.9 KB
engine/scripts/serve_range.pyscript1.4 KB
engine/scripts/sketch_publish_files.pyscript2.1 KB
engine/scripts/speed.pyscript1.8 KB
engine/scripts/stills.pyscript2.2 KB
engine/scripts/term_cut.pyscript1.1 KB
engine/scripts/term_frames.pyscript7.8 KB

engine/cine/tools/finish.py

View on GitHub
#!/usr/bin/env python3
"""讲解课出片:读镜头表里的段落与音效点 → 生成背景乐和音效(cine/audio/tools/bed.py)→ 混音(旁白压低背景乐)
→ 拼上冷开场画面 → 成片。

用法(用装了 numpy、scipy、playwright 的 Python 跑,见 references/10-cine.md「环境」):
  finish.py <课号> [--port 8964] [--skip-bed]
输出:lessons/<课号>/build/final_mix.wav、lessons/<课号>/build/lesson<课号>.mp4
"""
import json
import subprocess
import sys
import wave
from pathlib import Path

import numpy as np
from scipy import signal

ROOT = Path(__file__).resolve().parent.parent.parent          # 系列目录(cine/ 和 lessons/ 的上一级)
CINE = ROOT / "cine"
SR = 48000


def arg(name, default):
    return sys.argv[sys.argv.index(name) + 1] if name in sys.argv else default


def read_wav(p):
    with wave.open(str(p), "rb") as w:
        sr, ch, n = w.getframerate(), w.getnchannels(), w.getnframes()
        x = np.frombuffer(w.readframes(n), dtype=np.int16).astype(np.float64).reshape(-1, ch) / 32768.0
    if sr != SR:
        x = signal.resample_poly(x, SR, sr, axis=0)
    return x if ch == 2 else np.repeat(x, 2, axis=1)


def write_wav(p, x):
    y = np.clip(np.round(x * 32767.0), -32768, 32767).astype(np.int16)
    with wave.open(str(p), "wb") as w:
        w.setnchannels(2); w.setsampwidth(2); w.setframerate(SR); w.writeframes(y.tobytes())


def film_info(lesson, port):
    from playwright.sync_api import sync_playwright
    from browser import launch
    with sync_playwright() as p:
        b = launch(p)
        pg = b.new_page(viewport={"width": 1920, "height": 1080})
        pg.goto(f"http://127.0.0.1:{port}/cine/index.html?lesson={lesson}&capture")
        pg.wait_for_function("window.__film && window.__film.ready", timeout=180000)
        info = pg.evaluate("({from: __film.from, cold: __film.cold, coldSrc: __film.coldSrc, duration: __film.duration, sections: __film.sections, sfx: __film.sfx, clips: __film.clips || [], music: __film.music || []})")
        b.close()
    return info


def envelope(x, att=0.04, rel=0.4):
    """旁白的平滑包络(0..1),用来压低背景乐。"""
    a = np.abs(x.mean(axis=1))
    win = int(0.05 * SR)
    rms = np.sqrt(np.convolve(a * a, np.ones(win) / win, mode="same"))
    on = (rms > 10 ** (-42 / 20)).astype(np.float64)
    ka, kr = np.exp(-1 / (att * SR)), np.exp(-1 / (rel * SR))
    # 一阶跟随:起得快、落得慢(用 lfilter 分两段近似:先按释放平滑,再取与起音平滑的最大值)
    up = signal.lfilter([1 - ka], [1, -ka], on)
    down = signal.lfilter([1 - kr], [1, -kr], on)
    return np.clip(np.maximum(up, down), 0, 1)


def limiter(x, ceiling=10 ** (-1.5 / 20), look=0.003):   # 留 1.5 dB 余量,AAC 编码后不过 0 dBFS
    """前瞻峰值限幅:起音即时、释放 50 ms。"""
    from scipy.ndimage import maximum_filter1d
    peak = np.max(np.abs(x), axis=1)
    n = int(look * SR)
    target = np.minimum(1.0, ceiling / np.maximum(maximum_filter1d(peak, size=2 * n + 1), 1e-9))
    k = np.exp(-1 / (0.05 * SR))
    g = np.minimum(signal.lfilter([1 - k], [1, -k], target - 1) + 1, target)
    return x * g[:, None]


def main():
    lesson = sys.argv[1]
    port = arg("--port", "8964")
    L = ROOT / "lessons" / lesson
    B = L / "build"
    info = film_info(lesson, port)
    cold, dur, src = float(info["cold"]), float(info["duration"]), info.get("coldSrc")
    total = dur + 0.6
    lj = {"duration": round(total, 3), "bpm": 100, "key": "F minor", "chords": ["Fm", "Db", "Ab", "Eb"],
          "sections": [{"t": round(s["t"], 3), "t_to": round(min(s["t_to"], total), 3), "level": s["level"], "name": s.get("name", "")} for s in info["sections"]],
          "cues": [{k: (round(v, 3) if isinstance(v, float) else v) for k, v in c.items()} for c in info["sfx"]]}
    if src:   # 片头拼现成片段:配乐也从同一段原声里截
        lj["cold_open"] = {"from_wav": str(ROOT / src["wav"]), "src_t0": src["t0"], "src_t1": src["t0"] + cold, "at": 0.0}
    (B / "lesson.json").write_text(json.dumps(lj, ensure_ascii=False, indent=1), encoding="utf-8")
    print(f"lesson.json:{len(lj['sections'])} 段,{len(lj['cues'])} 个音效点,时长 {total:.2f}s")
    if "--skip-bed" not in sys.argv:
        subprocess.run([sys.executable, str(CINE / "audio/tools/bed.py"), str(B / "lesson.json"), str(B)], check=True)
    n = int(round(total * SR))
    fit = lambda x: np.pad(x, ((0, max(0, n - len(x))), (0, 0)))[:n]
    bed, sfx = fit(read_wav(B / "bed.wav")), fit(read_wav(B / "sfx.wav"))
    narr = np.zeros((n, 2))
    nv = read_wav(B / "narration.wav")
    i0 = int(round(cold * SR))
    narr[i0:i0 + len(nv)] = nv[: n - i0]
    env = envelope(narr)
    duck = 1.0 - 0.55 * env                      # 说话时背景乐约 −7 dB
    if src:
        duck[: int(round((cold + 0.25) * SR))] = 1.0   # 拼接的冷开场原样
    # 案例片段的原声:full = 原样放(这段旁白应当是空的、背景乐 level 0);duck = 压在旁白下面;mute = 不要
    clipa = np.zeros((n, 2))
    for c in info.get("clips", []):
        mode = c.get("audio", "duck")
        if mode == "mute":
            continue
        cpath = L / "assets" / "clips" / f"{c['id']}.mp4"
        tmp = B / f"_clip_{c['id']}.wav"
        r = subprocess.run(["ffmpeg", "-y", "-loglevel", "error", "-i", str(cpath), "-vn", "-ac", "2", "-ar", str(SR), str(tmp)])
        if r.returncode or not tmp.exists():
            continue
        a = read_wav(tmp); tmp.unlink()
        k = int(0.12 * SR)
        if len(a) > 2 * k:
            ramp = np.linspace(0, 1, k)[:, None]; a[:k] *= ramp; a[-k:] *= ramp[::-1]
        g = 10 ** (c.get("gain", -2.0 if mode == "full" else -15.0) / 20)
        j0 = int(round(c["at"] * SR)); j1 = min(n, j0 + len(a))
        if j1 > j0:
            clipa[j0:j1] += a[: j1 - j0] * g
    # 整段配乐插入(例如导学开场的高光快剪用曲库里的一首):{src 绝对路径, from 源内起点, at, dur, gain dB, fade_in, fade_out};有旁白时同样被压低
    for m in info.get("music", []):
        tmp = B / "_music.wav"
        subprocess.run(["ffmpeg", "-y", "-loglevel", "error", "-ss", f"{float(m.get('from', 0)):.3f}", "-t", f"{float(m['dur']):.3f}", "-i", str(m["src"]),
                        "-vn", "-ac", "2", "-ar", str(SR), str(tmp)], check=True)
        a = read_wav(tmp); tmp.unlink()
        ki, ko = int(float(m.get("fade_in", 0.03)) * SR), int(float(m.get("fade_out", 1.2)) * SR)
        if ki: a[:ki] *= np.linspace(0, 1, ki)[:, None]
        if ko and len(a) > ko: a[-ko:] *= np.linspace(1, 0, ko)[:, None]
        j0 = int(round(float(m["at"]) * SR)); j1 = min(n, j0 + len(a))
        if j1 > j0:
            if m.get("gain_curve"):     # 分段音量:[[片中秒, dB], …] 线性插值,比如冷开场满音量、旁白段压低
                pts = np.array(m["gain_curve"], dtype=np.float64)
                tt = np.arange(j0, j1) / SR
                g = 10 ** (np.interp(tt, pts[:, 0], pts[:, 1]) / 20)
            else:
                g = np.full(j1 - j0, 10 ** (float(m.get("gain", -4.0)) / 20))
            clipa[j0:j1] += a[: j1 - j0] * (g * duck[j0:j1])[:, None]
    mix = narr * 1.0 + bed * duck[:, None] + sfx * 0.9 + clipa
    # 响度:按有旁白的部分对齐到约 −16 dBFS RMS
    speech = env > 0.5
    rms = np.sqrt(np.mean(mix[speech] ** 2)) if speech.any() else np.sqrt(np.mean(mix ** 2))
    mix *= 10 ** (-16 / 20) / max(rms, 1e-9)
    mix = limiter(mix)
    write_wav(B / "final_mix.wav", mix)
    print(f"混音 → {B / 'final_mix.wav'}  峰值 {20 * np.log10(np.max(np.abs(mix)) + 1e-9):.1f} dBFS")
    if "--audio-only" in sys.argv:
        return
    # 画面:有 COLD_SRC 时先拼那段现成画面,再接本课渲染;然后把案例片段逐段叠到各自的框里
    fps = 60
    out = B / f"lesson{lesson}.mp4"
    ins, fc = [], []
    if src:
        a0, na = round(src["t0"] * fps), round(cold * fps)
        ins += ["-i", str(ROOT / src["video"]), "-i", str(B / "picture.mp4")]
        fc.append(f"[0:v]trim=start_frame={a0}:end_frame={a0 + na},setpts=PTS-STARTPTS[ca];[1:v]setpts=PTS-STARTPTS[cb];[ca][cb]concat=n=2:v=1:a=0[base]")
        k0 = 2
    else:
        ins += ["-i", str(B / "picture.mp4")]
        fc.append("[0:v]setpts=PTS-STARTPTS[base]")
        k0 = 1
    last = "base"
    for i, c in enumerate(info.get("clips", [])):
        ins += ["-i", str(L / "assets" / "clips" / f"{c['id']}.mp4")]
        k, at, d = k0 + i, float(c["at"]), float(c["dur"])
        fd = float(c.get("fade", 0.15))
        fades = f",fade=t=in:st={at:.4f}:d={fd:.3f}:alpha=1,fade=t=out:st={at + d - fd:.4f}:d={fd:.3f}:alpha=1" if fd > 0 else ""
        fc.append(f"[{k}:v]setpts=PTS-STARTPTS+{at:.4f}/TB,format=yuva420p{fades}[c{i}]")
        fc.append(f"[{last}][c{i}]overlay={int(c['x'])}:{int(c['y'])}:enable='between(t,{at:.4f},{at + d:.4f})':eof_action=pass[v{i}]")
        last = f"v{i}"
    ins += ["-i", str(B / "final_mix.wav")]
    subprocess.run(["ffmpeg", "-y", "-loglevel", "error", *ins, "-filter_complex", ";".join(fc), "-map", f"[{last}]", "-map", f"{len(ins) // 2 - 1}:a",
                    "-c:v", "libx264", "-preset", "slow", "-crf", "20", "-pix_fmt", "yuv420p", "-r", str(fps), "-c:a", "aac", "-b:a", "192k", "-shortest", "-movflags", "+faststart", str(out)], check=True)
    print(f"成片 → {out}")


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