Ffmpeg Auto Assemble logo

Ffmpeg Auto Assemble

Community
xianyu110
ffmpeg-auto-assemble

ffmpeg 自动拼接成片:一条命令把 storyboard.json(商品图/视频片段 + 口播稿)渲染成带配音、字幕花字、转场、BGM 自动闪避、响度标准化的 9:16 MP4,纯本地运行。Use when the user wants to assemble/edit/render a product video, 自动剪辑, 一键成片, 拼接视频, 图片转视频, Ken Burns, add BGM/subtitles/voice-over with ffmpeg, or batch-produce short videos without an editor.

Overview

Publisherxianyu110
Repositoryecommerce-video-skills
Skill nameffmpeg-auto-assemble
Stars
110
Forks
16
Bundled files
5
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 5 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by xianyu110 on GitHub. Read the source before you install it.

Installation

Install the Ffmpeg Auto Assemble AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/xianyu110/ecommerce-video-skills/tree/main/skills/ffmpeg-auto-assemble
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/xianyu110/ecommerce-video-skills.git /tmp/ecommerce-video-skills
mkdir -p .claude/skills
cp -r /tmp/ecommerce-video-skills/skills/ffmpeg-auto-assemble .claude/skills/ffmpeg-auto-assemble
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Ffmpeg Auto Assemble in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Ffmpeg Auto Assemble on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Ffmpeg Auto Assemble is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

ffmpeg 自动拼接成片 · Auto-assemble with ffmpeg

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 商品卡/结尾卡)

输入 Inputs

  • storyboard.json(可由 selling-point-storyboard 生成),素材路径相对于该文件
  • 环境:Python 3.9+,pip install pillow numpy edge-tts,ffmpeg(含 libass),CJK 字体

快速开始 Quick start

bash
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                           # 用你有版权的音乐

storyboard 字段 Fields

字段说明
顶层 voice / rate / pitchedge-tts 音色、语速(如 +10%)、音调
顶层 bgm"auto"(内置合成,免版权)/ 音乐文件路径 / null
顶层 tag全程左上角贴纸(品牌/型号/「演示」)
image 或 video (+start)素材;视频从 start 秒截取本镜时长
line配音文本;镜头时长 = 配音 + 0.15s 前导 + pad
sub字幕(默认同 line);"" 表示本镜不出字幕;**高亮**、`
title / cta花字 / 行动号召按钮
motionzoom_in zoom_out pan_left pan_right pan_up pan_down punch static
fitauto(比例接近则裁满,否则模糊填充)/ cover / blur
transition进入下一镜的 xfade 名:fade slideleft slideup smoothleft circleopen wipeleft …
min / duration / pad最短时长 / 固定时长 / 句后留白(秒)

步骤 Steps

  1. 检查素材都存在、比例合适(商品图 ≥ 1000px);缺结尾卡就用 make_cards.py 生成: python scripts/make_cards.py --image main.png --name "商品名" --points "卖点一|卖点二|卖点三" -o assets/end-card.png
  2. 先 --tts none 跑一遍看画面节奏,再正式渲染。
  3. 渲染后抽帧检查:ffmpeg -ss 3 -i out/video.mp4 -frames:v 1 check.png
  4. 交给 platform-spec-export 导出各平台版本;用 cover-title-ab 做封面。

流水线细节 How it works

  • Ken Burns:逐帧 scale(eval=frame)+crop,比 zoompan 抖动小;punch = 0.35 秒快速推近(钩子专用)。
  • 转场:每镜多渲染半个转场长度,xfade 居中在镜头分界,配音起点不被转场吃掉。
  • 混音:配音按镜头起点放置;BGM 默认 -20 dB,有人声时再压 10 dB(平滑闪避);先压缩/限幅再两遍 loudnorm 到约 -14 LUFS、TP -1.5 dB。
  • 字幕:用真实配音时长生成 build/timing.json → make_subs.py → libass 烧录,同时导出 .srt。

检查清单 Checklist

  • 成片时长、分辨率、帧率正确(ffprobe out/video.mp4)
  • 抽 3 帧:字幕不压商品、不进底部 UI 区
  • 听一遍:配音清楚、BGM 不抢、开头无爆音
  • BGM 有商用授权(auto 合成音乐可放心用)
  • 素材(图片/视频/字体)有使用授权

常见问题与修复 Failure fixes

问题修复
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 版本,未复制其代码。

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Ffmpeg Auto Assemble AI skill do?

ffmpeg 自动拼接成片:一条命令把 storyboard.json(商品图/视频片段 + 口播稿)渲染成带配音、字幕花字、转场、BGM 自动闪避、响度标准化的 9:16 MP4,纯本地运行。Use when the user wants to assemble/edit/render a product video, 自动剪辑, 一键成片, 拼接视频, 图片转视频, Ken Burns, add BGM/subtitles/voice-over with ffmpeg, or batch-produce short videos without an editor.

Why use Ffmpeg Auto Assemble on TypingMind?

Because you install it once and use it with any model. Ffmpeg Auto Assemble is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Ffmpeg Auto Assemble in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/xianyu110/ecommerce-video-skills/tree/main/skills/ffmpeg-auto-assemble. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Ffmpeg Auto Assemble?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Ffmpeg Auto Assemble?

As many as you like. As long as a model supports skills, you can use Ffmpeg Auto Assemble with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Ffmpeg Auto Assemble AI skill free?

Yes. It is published on GitHub by xianyu110 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇