效果(AI Wala Kapil Studio)
一個片段,多種效果,一條指令。時間可以秒數指定,或透過語音觸發(例如 "@views"、"@कमाई+0.2";英文單詞也能對應 Whisper 的天城文拼寫,例如 link ↔ लिंक)。
執行
python3 ~/.claude/skills/awk-effects/scripts/effects.py --list # 列出所有效果及其屬性
python3 ~/.claude/skills/awk-effects/scripts/effects.py VIDEO.mp4 --spec fx.json --preview 3.2 # 快速預覽單一影格
python3 ~/.claude/skills/awk-effects/scripts/effects.py VIDEO.mp4 --spec fx.json -o VIDEO_fx.mp4
fx.json:
[
{"fx": "title-behind", "t": 0.0, "dur": 2.6, "props": {"text": "FREE|CLASS"}},
{"fx": "orbit-text", "t": 2.6, "dur": 4.0, "props": {"images": ["~/Pictures/a.png", "~/Pictures/b.png", "~/Pictures/c.png"], "size": 0.25}},
{"fx": "clone", "t": 6.9, "dur": 1.6, "props": {"count": 2, "lag": 0.4}},
{"fx": "edit-timeline", "t": 8.6, "dur": 3.0, "props": {"title": "🎬 影片就是這樣誕生的", "y": 0.6}},
{"fx": "photo-3d", "t": 12.0, "dur": 3.0, "props": {"photo": "~/Pictures/creator.png", "label": "你也是創作者 ✨"}},
{"fx": "map-flyto", "t": 15.0, "dur": 3.0, "props": {"image": "~/maps/india.png", "x": 0.27, "y": 0.6, "label": "Mumbai"}},
{"fx": "transition", "t": "@फटाफट", "dur": 0.4, "props": {"kind": "zoom-punch"}},
{"fx": "checklist", "t": 5.4, "dur": 3.0, "props": {"title": "待辦事項", "items": ["打開個人簡介連結", "填寫表單", "提交"], "every": 0.6}},
{"fx": "iphone-ui", "t": "@DM", "dur": 2.2, "props": {"app": "Instagram", "title": "aiwalakapil", "body": "新訊息", "icon": "📩"}},
{"fx": "spotlight", "t": 10.8, "dur": 2.0, "props": {"label": "說明欄中的連結", "glitter": true}},
{"fx": "glass-widgets", "t": 13.0, "dur": 3.0, "props": {"items": [{"icon": "🔥", "title": "觀看次數", "value": "4.2L"}]}},
{"fx": "money-counter", "t": 16.2, "dur": 2.4, "props": {"to": 50000, "label": "課程價值"}},
{"fx": "chart", "t": 18.8, "dur": 2.6, "props": {"title": "註冊人數", "bars": [{"label": "第1天", "value": 58}, {"label": "第2天", "value": 111}]}},
{"fx": "news-cut", "t": 21.5, "dur": 2.0, "props": {"headline": "免費 AI 課程開始了!"}},
{"fx": "freeze-callout","t": 24.0, "dur": 1.6, "props": {"name": "KAPIL", "sub": "AI Wala Kapil"}}
]
運作原理
tools/awkvision(Apple Vision,裝置端處理)為每部影片產生一次人物遮罩與臉部追蹤資料,並快取為VIDEO.matte.mp4與VIDEO.faces.json;首次執行時會編譯 Swift 工具,處理 60 fps 4K 來源的影片約需每 25 秒 1 分鐘(可使用--fast-matte加速)。- Remotion 渲染透明的背景圖層(人物下方)與前景圖層;ffmpeg 進行疊加:影片 → 背景 → 人物去背 → 前景。
- 聚光燈、環繞文字、玻璃小工具、頭後文字與凍結畫面標註會自動跟隨人物的臉部移動。
clone分身效果由 ffmpeg 利用遮罩合成:人物的複製體在時間上偏移,並排顯示(--preview預覽時不會顯示)。photo-3d會使用 Apple Vision 從任何照片中切割出主體,並將其移動以產生深度感。map-flyto使用任意地圖圖像(x/y 為圖像中的比例);請使用高解析度地圖,小圖像在縮放時會顯得模糊。- 屬性中的本地圖像路徑(
images、image、photo)會自動複製到工作室中。
給 Claude 的工作流程
- 轉錄或閱讀腳本,挑選 4-8 個時刻(前 2 秒的鉤子、數字、清單、行動呼籲)。不要連續堆疊效果,每個效果間隔 1-3 秒,留些喘息空間。
- 在完整渲染前,務必先對幾個關鍵時刻使用
--preview T並檢視結果。 - 片段中的順序:自動剪輯 → 自動縮放 → 效果 → 字幕 → 音效 → 音訊母帶(縮放和轉場會重新繪製影片,因此字幕在其後處理)。
- 頭後文字會自動調整大小以貼合頭部上方空間;頭髮會覆蓋最後一行文字的下半部分(這就是它的風格)。每行短單詞(≤ 8 個字母)閱讀效果最佳。
- 對於已內嵌文字方塊的影片,請將效果放在空白區域,或使用全螢幕時刻(新聞剪輯、photo-3d、凍結畫面標註、聚光燈),避免元素互相干擾。
- 玻璃卡片採用色調而非模糊效果,以便在任何畫面上都能清晰閱讀。