commercial-creator

commercial-creator

Enables AI agents to produce video commercials from product descriptions via a multi-stage pipeline with human-in-the-loop approval gates and explicit spend authorization.

Category
访问服务器

README

Commercial Creator

An agentic pipeline that turns a product description into a finished video commercial: creative brief → concepts → script → adversarially-reviewed shot list → styled storyboard keyframes → VO-timed animatic → Seedance 2.0 video generation (with storyboard-composed multi-shot windows) → QC judging with corrective regeneration → assembly → music + expressive VO mix → final cut with themed overlays. A FastAPI server drives it; a single-file web UI and an MCP connector (for Claude Code and other agents) sit on top.

Built with a human-in-the-loop by design: the brief, the shot list and the animatic are approval gates, and video generation never spends money without an explicit approval step — in the UI and in the MCP tools alike.

What it produces

30–60s commercials/trailers at draft (480–720p) or final (1080p) tier, with:

  • multi-agent planning: intake strategist, creative director (3 concepts, beat-scripted VO at ~2.3 words/s), a shot room where a cinematographer critic and an editor critic attack the draft shot list in parallel before the director revises it
  • storyboard keyframes (Gemini nano-banana via fal.ai) locked to a style recipe, with product reference images for identity
  • an audio-first animatic: VO takes are generated and measured first, the timeline stretches to fit, and the shot plan reconciles the locked timeline onto Seedance's 4–15s generation windows (scale / trim / split / multi-shot collapse / storyboard-composed windows)
  • Seedance 2.0 generation via fal.ai with per-route handling (t2v / i2v / reference-composed r2v / last-frame chaining), transient retries, a billing fail-fast, and cancellable queue polling
  • a 6-dimension vision QC judge that stages corrective regens (never auto-spends) and a self-improvement loop that distills recurring failures into durable prompt rules (per-project lessons + global house rules)
  • ElevenLabs v3 expressive VO (audio tags per beat kind, per-brand voice casting by an agent) + generated music bed, sidechain-ducked under the VO
  • Remotion-rendered overlays: theme-palette lower thirds and end cards, with a presentation setting (cinematic / balanced / informational) chosen at intake or recommended by the brief agent

Typical draft-tier cost: $10–20 per 30s spot (Seedance dominates; LLM/images/VO are cents). See docs/ for the research that shaped the pipeline.

See it in action

Five finished spots produced end-to-end by this pipeline — each was one product description in, one video out (every brand fictional). Uploaded as demos on The Bearded AI Guy:

🎬 PocketBrew — coffee commercial (45s, ~$17)

The pipeline's first complete spot: theme-styled lower thirds and end card, ElevenLabs music bed ducked under the VO. Every shot generated per-keyframe (image-to-video) from the styled storyboard.

<p> <a href="https://youtu.be/zSaz230ygl4"><img src="assets/pocketbrew_a.jpg" width="49%" alt="PocketBrew — cabin scene with themed lower third"></a> <a href="https://youtu.be/zSaz230ygl4"><img src="assets/pocketbrew_b.jpg" width="49%" alt="PocketBrew — product beat with 3-minute timer"></a> </p>

🛸 ScoutFly — FOMO drone commercial (31s, ~$15)

The QC loop on camera: the vision judge failed 4 of 6 draft clips (garbled text in the blueprint theme), staged corrective regenerations with its feedback spliced into the prompts, and every fix passed. That failure pattern then became a permanent theme rule — the self-improvement loop's origin story.

<p> <a href="https://youtu.be/ddMKuNCeo-Y"><img src="assets/scoutfly_a.jpg" width="49%" alt="ScoutFly — blueprint-theme flight path"></a> <a href="https://youtu.be/ddMKuNCeo-Y"><img src="assets/scoutfly_b.jpg" width="49%" alt="ScoutFly — the drone with a caller's face on its screen"></a> </p>

TIMEPIECE — 60s streaming-series trailer (~$27)

A prestige drama trailer for a show that doesn't exist: custom cinematic theme, tick-synced cuts, a custom-prompted orchestral score, and a measured animatic that landed the 60s target exactly.

<p> <a href="https://youtu.be/irapcuaeudw"><img src="assets/timepiece_a.jpg" width="49%" alt="TIMEPIECE — cliff beneath three moons"></a> <a href="https://youtu.be/irapcuaeudw"><img src="assets/timepiece_b.jpg" width="49%" alt="TIMEPIECE — the proof beat close-up"></a> </p>

☁️ SKYSILVER — action-comedy trailer (31s, ~$14)

The storyboard-composed route at work: two of its montages are SINGLE Seedance generations following a numbered storyboard grid (multiple hard cuts per call, scene-detection validated), roughly halving the cost of per-shot generation. The adversarial shot room made 14 revisions before a dollar was spent — including a new VO-synced cutaway.

<p> <a href="https://youtu.be/neDwwKh56Pw"><img src="assets/skysilver_a.jpg" width="49%" alt="SKYSILVER — brass airship in the cloud sea"></a> <a href="https://youtu.be/neDwwKh56Pw"><img src="assets/skysilver_b.jpg" width="49%" alt="SKYSILVER — Captain Silver's wink"></a> </p>

Wear Your Sparkles — beauty commercial (33s, ~$17)

The hardest photoreal test (macro glitter, skin, eyes): the judge ran 7 corrective regenerations against glitter-physics hallucinations and distilled two durable lessons about macro realism that now ride every prompt in the project.

<p> <a href="https://youtu.be/s1I4wbIcFQk"><img src="assets/wys_a.jpg" width="49%" alt="Wear Your Sparkles — applicator catching light on the lid"></a> <a href="https://youtu.be/s1I4wbIcFQk"><img src="assets/wys_b.jpg" width="49%" alt="Wear Your Sparkles — glitter eye macro with product"></a> </p>

Requirements

  • Python 3.12 (pydub/audioop compatibility)
  • ffmpeg + ffprobe on PATH
  • Node.js 18+ (only for the final overlay render via Remotion; every other stage works without it)
  • API keys:
    • FAL_KEYfal.ai (Seedance video + nano-banana images)
    • ANTHROPIC_API_KEY — planning/judging agents
    • ELEVENLABS_API_KEY — VO + music (optional; the pipeline degrades to silent scratch timing without it)

Setup

python -m venv .venv
.venv/Scripts/activate            # Windows; source .venv/bin/activate elsewhere
pip install -r requirements.txt

cp .env.example .env              # fill in your keys

uvicorn commercial_server:app --port 8700
# open http://127.0.0.1:8700  (the web UI)

Health check: GET /api/v1/health reports missing binaries/keys.

Google Drive / synced-folder warning: if this folder lives on a synced drive, set REMOTION_BUILD_DIR to a local path (e.g. C:/remotion-build/projects) — npm install fails on synced filesystems, and renders stage off-drive then copy back. Non-synced installs can set REMOTION_WORK_MODE=project.

The pipeline

intake → brief* → script → shots* → refs → storyboard → animatic* → generate† → assemble → audio → variants
         (*human approval gates)                                    (†explicit spend approval)

Every stage is a job with live logs (SSE to the UI), and artifacts are versioned append-only — editing an upstream artifact marks everything downstream stale rather than deleting it.

Claude Code / MCP connector

mcp_server.py exposes the pipeline as typed MCP tools so an agent can drive it end-to-end:

pip install "mcp[cli]"
claude mcp add commercial-creator -- python /absolute/path/to/mcp_server.py

Then, in Claude Code: "Create a 30-second commercial for <product>" — the agent walks the stages with run_step, honors the approval gates via approve_artifact, and cannot generate video in one step: stage_video_batch returns the dollar estimate, and only the separate approve_video_jobs call spends. Point the connector at a non-default server with COMMERCIAL_CREATOR_URL.

Field notes baked into the code (the expensive lessons)

  • Seedance 2.0 has no seed input — reproducibility lives in reference images + verbatim prompts. Consistency comes from style-recipe keyframes, reference binding (@Image1…) and single-generation multi-shot windows.
  • The likeness gate: the provider rejects detectable photoreal human faces in reference-to-video reference images and video refs (facial fragments — a macro eye — count). The same images pass as image-to-video start frames. Stylized/animated character sheets pass, and carry identity across composed multi-shot generations remarkably well. The planner routes around all of this automatically via a per-shot face_prominent flag and a per-project visual_mode (photoreal | stylized).
  • Storyboard-composed windows: a numbered grid of keyframes (≤3×3, black borders, number badges) as @Image1 + timed Shot N blocks reliably yields one generation with native hard cuts — ~1.2s/shot floor, 6–7 shots per 10s is the readable ceiling. Cut counts are validated by scene detection after download.
  • Output-side "sensitive content" flags are noisy — one identical retry is automatic and usually passes. Input-side likeness rejections are deterministic — never retried, rerouted instead.
  • ElevenLabs v3 does not support previous_text/next_text, and its stability tiers map to floats (0.5 = natural). The voice is the quality lever: conversational-tagged voices respond to [excited]-style audio tags; narration voices ignore them.
  • Assembly policy: never concat stream-copied and re-encoded segments; uniform per-segment encode trimmed to edit duration, 4-frame crossfades on take-chained joins.

📖 Full illustrated walkthrough — installation to finished commercial, with screenshots of every panel (also published as a Medium article). docs/seedance-commercial-workflow-best-practices.md is the full research playbook; docs/seedance-commercial-app-implementation-plan.md is the original architecture spec.

Costs & safety rails

  • Per-project budget cap: jobs estimate before running; the queue refuses to start work that would blow the cap (402) counting in-flight estimates.
  • All video generation jobs are created needs_approval and survive server restarts without auto-running.
  • The QC judge stages corrective regens with feedback spliced into the prompt — approval is still explicit, and after two failed fixes it escalates to a human instead of burning more money.

Repository layout

commercial_server.py     FastAPI app (port 8700): REST + SSE + static UI
commercial/              the pipeline package
  agents/                LLM agents (intake, director, breakdown+shot room,
                         reference, judge, continuation) — Claude via tool-forced
                         structured output
  adapters.py            Seedance capability descriptors + fal queue client
  shot_plan.py           timing contract: animatic timeline -> generation rows
  compiler.py            deterministic prompt compiler (inspectable pre-spend)
  storyboard_sheet.py    numbered grid compositor for composed windows
  keyframes.py/animatic.py/assembly.py/audio_vo.py/audio_final.py/music.py
  overlay.py/themes.py   Remotion overlay render + theme palettes
  jobs.py/store.py       approval-gated job queue + single-writer JSON store
  lessons.py             self-improvement: QC failures -> durable prompt rules
static/commercial.html   the whole UI (no build step)
mcp_server.py            MCP connector for Claude Code
remotion_template/       Remotion project (CommercialFinal composition)

License

MIT — see LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选