Assembles product videos from a storyboard.json: renders images/video clips with edge-tts voiceover, Ken Burns motion, xfade transitions, ASS subtitles, BGM ducking, and loudnorm normalization to a 9:16 MP4. Runs entirely locally.
Ships in ecommerce-video-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
storyboard.json → 配音(edge-tts)→ 每镜 Ken Burns / 视频裁切 → xfade 转场 → ASS 字幕花字 → BGM 闪避混音 → 两遍 loudnorm(-14 LUFS)→ out/video.mp4 + .srt。
Part of ecommerce-video-skills · 脚本都在本目录
scripts/:assemble.py(主程序)·tts_edge.py·make_subs.py·make_bgm.py(免版权合成 BGM)·make_cards.py(PIL 商品卡/结尾卡)
storyboard.json(可由 selling-point-storyboard 生成),素材路径相对于该文件pip install pillow numpy edge-tts,ffmpeg(含 libass),CJK 字体pip install pillow numpy edge-tts
python scripts/assemble.py examples/aura-bottle/storyboard.json -o out/aura.mp4 # 仓库自带示例,约 30 秒渲染完
python scripts/assemble.py storyboard.json --tts none -o out/preview.mp4 # 离线预览(无配音,按字数估时)
python scripts/assemble.py storyboard.json --size 1080x1080 -o out/main-1x1.mp4 # 主图视频 1:1
python scripts/assemble.py storyboard.json --bgm music.mp3 # 用你有版权的音乐
| 字段 | 说明 |
|---|---|
顶层 voice / rate / pitch | edge-tts 音色、语速(如 +10%)、音调 |
顶层 bgm | "auto"(内置合成,免版权)/ 音乐文件路径 / null |
顶层 tag | 全程左上角贴纸(品牌/型号/「演示」) |
image 或 video (+start) | 素材;视频从 start 秒截取本镜时长 |
line | 配音文本;镜头时长 = 配音 + 0.15s 前导 + pad |
sub | 字幕(默认同 line);"" 表示本镜不出字幕;**高亮**、` |
title / cta | 花字 / 行动号召按钮 |
motion | zoom_in zoom_out pan_left pan_right pan_up pan_down punch static |
fit | auto(比例接近则裁满,否则模糊填充)/ cover / blur |
transition | 进入下一镜的 xfade 名:fade slideleft slideup smoothleft circleopen wipeleft … |
min / duration / pad | 最短时长 / 固定时长 / 句后留白(秒) |
make_cards.py 生成:
python scripts/make_cards.py --image main.png --name "商品名" --points "卖点一|卖点二|卖点三" -o assets/end-card.png--tts none 跑一遍看画面节奏,再正式渲染。ffmpeg -ss 3 -i out/video.mp4 -frames:v 1 check.pngplatform-spec-export 导出各平台版本;用 cover-title-ab 做封面。scale(eval=frame)+crop,比 zoompan 抖动小;punch = 0.35 秒快速推近(钩子专用)。build/timing.json → make_subs.py → libass 烧录,同时导出 .srt。ffprobe out/video.mp4)auto 合成音乐可放心用)| 问题 | 修复 |
|---|---|
ffmpeg failed | 看脚本打印的 stderr 末尾;常见是路径错误或 ffmpeg 缺 libass/libx264 |
| 画面边缘糊 | 素材分辨率太低;换 ≥1080px 图片或减小 motion 幅度(改 static) |
| 商品被裁掉 | 该镜设 "fit": "blur" |
| 转场处声音被切 | 不会发生(配音按镜头起点对齐);若自定义了 duration 过短,加长即可 |
| 渲染慢 | 预设已用 veryfast 中间文件;最终编码可把 -preset medium 改为 fast |
| 想要 1:1 / 16:9 | --size 1080x1080 / --size 1920x1080,字幕字号自动按比例 |
参考与致谢:思路受 MoneyPrinterTurbo(MIT)「脚本→配音→字幕→合成」流水线启发,本实现为独立编写的纯 ffmpeg 版本,未复制其代码。
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
video-assembly, ffmpeg-pipeline, product-video, auto-editing, ken-burns, tts
/ecommerce-video-skills:ffmpeg-auto-assemblefrom ecommerce-video-skills
npx claudepluginhub xianyu110/ecommerce-video-skills --plugin ecommerce-video-skills13 skills in this plugin
/ai-voiceover-edge-ttsAI 口播配音:用免费的 edge-tts(微软 Edge 在线语音)为带货短视频逐句生成配音,自动去首尾静音、统计每句时长、缓存复用,可选音色/语速/音调,并给出口播稿改写规则。Use when the user needs a voice-over, 配音, 口播, 旁白, TTS, text-to-speech, AI 主播声音, or wants to turn a script into audio for 抖音 / TikTok / 视频号 videos./cover-title-ab封面与标题 A/B:为带货短视频生成多套封面(自动挑选清晰帧或用干净素材图 + 不同标题与版式)和多组标题/文案,导出 3:4 / 9:16 封面文件和对比图,并给出 A/B 测试方法与记录表。Use when the user wants a video cover, 封面, 首图, thumbnail, 标题, 文案, title variants, A/B test covers for 抖音 / 视频号 / 小红书 / TikTok, or wants to improve click-through rate./hook-3s-script3 秒钩子脚本:为电商短视频写前 3 秒开场(台词 + 画面 + 花字),按痛点/反差/结果先行/提问/数字/场景代入等钩子类型一次给出多版,并做合规自检。Use when the user asks for a hook, 开头, 黄金 3 秒, 前三秒, opening line, scroll-stopper, 完播率, or wants to rewrite a weak opening for 抖音 / TikTok Shop / 视频号 / Reels./image-to-video-shots主图转视频:把一张或几张商品主图/白底图/场景图,写成可直接喂给图生视频模型的镜头提示词(运镜、主体动作、光线、时长、负面约束),并保证商品不变形。Use when the user has product images and wants a product video, 主图视频, 图生视频, image-to-video, animate a product photo, or 让主图动起来 — with any image-to-video model (Seedance / 可灵 Kling / Veo / Runway / Hailuo / Wan …) or a local Ken Burns fallback./live-stream-clips直播切片:从电商直播录屏中找出高光片段(按时间戳 / 按字幕关键词 / 按停顿自动提议),批量导出 9:16 竖屏切片,自动模糊填充横屏画面、烧录标题与字幕、响度标准化,并给切片写标题与开头钩子。Use when the user has a livestream recording and wants 直播切片, 切片, highlights, clips, 高光片段, repurpose a live stream into short videos for 抖音 / 视频号 / TikTok./multilingual-dubbing多语言本地化配音:把中文带货视频本地化为英语、日语、韩语、东南亚语(印尼/泰/越/马来/菲律宾)、西语等版本——本地化改写口播(不是直译)、选对 edge-tts 音色、生成对应字幕与花字,并用同一份 storyboard 一键渲染多语言成片。Use when the user wants dubbing, 多语言, 本地化, 翻译配音, 出海, localize a product video for TikTok Shop US/UK/SEA, English voice-over, or multiple language versions of one video.Other plugins' skills for the same job