Communitygithub.com

Raibit-AI/social-ad-builder

將影片片段與簡易 JSON 鏡頭列表組合成完成的直式社交廣告影片。輸出適用於 Reels、Stories 與 TikTok 的 9:16 主影片,以及 4:5 的動態消息版本,包含品牌色標籤、片頭品牌文字、硬切、調色、音效設計、安全音量與結尾卡。僅需免費的 ffmpeg。

social-ad-builder 是什麼?

這個 AI 技能能將食物或產品的影片片段,根據一個簡單的 JSON 鏡頭列表,自動組合成專業的社交媒體廣告。它專為 Reels、Stories 和 TikTok 等直式平台設計,並額外輸出一個適合動態消息的 4:5 版本。整個流程完全依賴免費的 ffmpeg,無需其他昂貴軟體。技能背後的設計是基於大量的迭代測試和盲測 A/B 審查,確保了最佳實踐,例如使用硬切而非淡出、在品牌色藥丸形狀背景上顯示菜名以提高可讀性、在影片第一幀就顯示品牌名稱(因為許多用戶靜音觀看)、對每個食物鏡頭添加 4% 的縮放衝擊、進行輕微銳化和暖色調色以統一不同來源的素材、添加環境音和滋滋聲、並將音量限制在 -14 LUFS 以確保手機揚聲器不失真。使用者只需提供一個包含輸出檔名、品牌顏色、品牌標語、環境音檔以及一系列鏡頭(每個鏡頭指定檔案、起始時間、持續時間和可選標籤)的 JSON 檔案,即可輕鬆生成多個廣告變體進行 A/B 測試。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Raibit-AI/food-ad-kit/tree/HEAD/plugins/food-ad-kit/skills/social-ad-builder

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

社交廣告建置器

scripts/build_ad.py 將鏡頭列表轉換為兩個完成的檔案。它只需要 ffmpeg 和 ffprobe(免費)。每個預設值都經過反覆迭代評分和盲測 A/B 審查而確定:

  • 硬切。 淡入淡出會在每個剪輯點造成黑畫面閃爍。
  • 在品牌色藥丸形狀背景上顯示菜名標籤。 在雜亂的食物畫面上使用細字體會難以閱讀。
  • 在幀 0 顯示品牌標語。 大多數人會靜音觀看。
  • 每個食物鏡頭出現時加入 4% 的縮放衝擊。
  • 輕微銳化加上一個暖色調色, 讓 AI 生成的片段和手機拍攝的畫面看起來像出自同一台攝影機。
  • 不從影片片段中擷取任何音訊, 因為 AI 影片模型會加入自己的音樂。如果你有實際的環境音,可以加入,並在食物鏡頭下加上輕柔的滋滋聲。
  • 音量設定在 -14 LUFS 並加上限制器, 確保真實峰值低於 0 dB,並且在手機喇叭上不會失真。
  • 將文字放在 4:5 的安全區域內(在 1920 高度下約為 y=390),這樣一個主影片可以乾淨地裁切成動態消息版本。

鏡頭列表

{
 "out": "out/my-ad",
 "brand_color": "#A3192B",
 "brand_line": "您的餐廳 · 您的城市",
 "ambience": "room-recording.mov",
 "shots": [
  {"file": "clips/noodle-lift.mp4", "start": 3.0, "dur": 2.0, "label": "擔擔麵"},
  {"file": "clips/mapo.mp4", "start": 0.8, "dur": 1.5, "label": "麻婆豆腐"},
  {"file": "clips/mapo-scoop.mp4", "start": 3.3, "dur": 1.5},
  {"file": "clips/dining-room.mp4", "start": 0, "dur": 1.0, "label": "您的餐廳", "subline": "您的城市", "food": false}
 ],
 "endcard": {"bg": "#F3ECE0", "logo": "logo.png", "dur": 2.0,
  "lines": [{"text": "您的城市", "size": 58, "color": "#8B1E1E"},
            {"text": "預訂外帶或預約桌位", "size": 56},
            {"text": "yoursite.com", "size": 84, "color": "#8B1E1E", "bold": true}]}
}

執行 python3 scripts/build_ad.py shotlist.json。它會產出 out/my-ad-9x16.mp4 和 out/my-ad-4x5.mp4。

鏡頭欄位:

  • start 和 dur 是以秒為單位,指定在原始片段內的時間點。
  • "food": false 會關閉該鏡頭的縮放衝擊和滋滋聲(用於餐廳環境的鏡頭)。
  • "keep_label": true 可讓標籤在兩個鏡頭之間延續,而無需重新顯示動畫。
  • "subline" 會在標籤下方添加一行較小的文字。
  • "label_size" 設定標籤大小(預設為 78 px)。在標籤中加入 \n 可換行。標籤和結尾卡的文字行會自動縮小以符合畫面的寬度。
  • 文字中可以包含引號、冒號、逗號和 %。表情符號無法在標籤字型中顯示,請不要使用。
  • 如果片段長度小於要求的 dur,建置器會使用現有的長度並印出提示訊息。請注意這些提示:如果鉤子(hook)鏡頭提前結束,它會定格在其最後一幀。

來自獲勝廣告的節奏規則(參見廣告分析基準)

  • 長度: 無對白食物蒙太奇的最佳長度為 12-20 秒。有對白或故事的廣告則更長。
  • 鏡頭長度: 大約每 1.8 秒 一個剪輯,第一個剪輯約在 2 秒時。鏡頭長度以 0.5 秒為間隔,能讓任何 120 BPM 的音樂在剪輯點上對齊。
  • 順序: 以有手部入鏡的動作畫面開場。讓食物鏡頭連續不中斷。任何空景鏡頭(如餐廳環境)保持在約 1 秒,放在結尾附近。
  • 結尾: 使用最好的食物鏡頭,或一張帶有簡單行動呼籲文字的卡片。
  • 音樂: 在上傳時於平台自己的授權音樂庫中加入音樂。不要內嵌你沒有使用權的歌曲。

製作 A/B 測試變體

每個變體只改變一個元素(鉤子鏡頭、鉤子文字、長度或菜色組合),這樣才能解釋勝出的原因。複製鏡頭列表,編輯一個欄位,然後再次建置。

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

Raibit-AI/ad-teardown

Breaks a video ad down the way a creative director would. It measures length, cut speed and first cut; pulls frame strips of the first 3 seconds and of the whole ad; transcribes the speech; tags the hook, format, people, text, offer and ending; and scores it against benchmarks from winning food ads. Use when the user asks to analyze, break down, tear down, critique or compare a video ad, Reel or TikTok, especially for a restaurant or food brand.

Raibit-AI/blind-ad-review

Improves a video ad through repeated blind A/B reviews. Two versions are shown as contact sheets to a fresh reviewer who doesn't know which is newer, and both are scored against benchmarks from winning food ads. The next version changes only what reviewers agree on, and the loop continues until the gains stop. Use when the user wants to improve, iterate, critique or A/B test an ad or Reel before spending money, or asks "which version is better".

Raibit-AI/food-shot-director

Directs AI image-to-video food shots for restaurant ads (chopsticks lifting noodles, a spoon scooping, sauce poured, a piece lifted to the lens). It gives the prompt formula, which foods animate well and which morph, and a keep-or-reject checklist so the dish still looks like the real menu item. Works with any image-to-video model (Kling, Veo, Seedance, LTX, Runway). Use when the user wants to animate a food photo, make food B-roll or a hand-in-frame food shot, or turn menu photos into video...

Raibit-AI/winning-ad-finder

Finds video ads that are probably working for restaurants and food brands, using the free Meta Ad Library, and builds a short "swipe file" of likely winners to study. Use when the user asks to find winning ads, research competitors' Facebook or Instagram ads, see what ads restaurants are running, or build ad inspiration for a food business.

相關技能