Communitygithub.com

社交广告构建器

从视频片段和一个简单的JSON镜头列表组装出完整的竖版社交视频广告。输出9:16主版本用于Reels、Stories和TikTok,以及4:5信息流裁剪版本,包含品牌色菜品标签、品牌字幕、硬切、匹配调色、干净的音频设计、安全的响度以及结尾卡。仅使用免费的ffmpeg。

社交广告构建器 是什么?

该技能为AI智能体提供了一种自动化构建竖版社交视频广告的能力,专为短视频平台(如Instagram Reels、TikTok)优化。它基于一个简单的JSON镜头列表,调用免费的ffmpeg将多个视频片段合成最终成品,无需任何付费工具。该技能的核心优势在于通过大量迭代测试和盲审优化了所有默认参数,确保输出效果达到专业水准。它自动添加硬切、品牌色标签、帧0品牌字幕、4%变焦、轻度锐化和暖色调色、仅环境音(无AI音乐)、-14 LUFS安全响度、以及4:5安全区域的文字布局。智能体只需要提供符合格式的镜头列表JSON文件,即可快速生成多个AB测试变体,每个变体只修改一个元素以便分析效果差异。该技能特别适合餐饮、食品、电商等需要快速制作大量广告素材的营销场景。

兼容平台~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(免费)。每一个默认设置都经过评分迭代循环和盲审AB测试的验证:

  • 硬切。 每次切换时都会闪过黑场。
  • 品牌色实心药丸形状上的菜品标签。 在杂乱的食物画面上,细小的文字难以阅读。
  • 第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像素)。在标签中使用 \n 可以实现两行文字。标签和结尾卡文字会自动缩小以适应帧宽。
  • 文字中可以包含引号、冒号、逗号和 %。表情符号在标签字体中无法渲染,请勿使用。
  • 如果片段短于请求的 dur,构建器会使用现有部分并打印一条提示。请注意这些提示:过早结束的钩子会在最后一帧上冻结。

来自获胜广告的节奏规则(参见广告拆解基准测试)

  • 时长: 无言语的食物蒙太奇最佳时长为 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.

相关技能