Communitygithub.com

x-rush/video-forge

多通道 AI 视频生成 + 配音合成引擎(fal.ai 队列:Wan 3.0 / Seedance 2.0+2.5 / MiniMax H3 / Gemini Omni Flash;TTS 用 ElevenLabs 英文 + 火山豆包中文;ffmpeg 合成)。当用户要求生成视频、文生视频、图生视频、视频编辑、配音、TTS、口播、短视频、BGM 混音,或提到 视频、视频配乐、视频号、抖音视频、短片、video clip、voiceover 时使用——即使没有说"生成"。需要 FAL_KEY(fal.ai);可选 ELEVENLABS_API_KEY(英文配音)/ VOLC_TTS_API_KEY(中文配音,豆包 seed-tts V3);REPLICATE_API_TOKEN 通道已脚手架化。零依赖,Node ≥ 18(合成与时长校验需要 ffmpeg/ffprobe)。模型路由、端点、参数枚举与定价集中在一个 JSON 注册表——加模型=改配置,不改代码。

video-forge 是什么?

video-forge is a Gemini CLI agent skill that 多通道 AI 视频生成 + 配音合成引擎(fal.ai 队列:Wan 3.0 / Seedance 2.0+2.5 / MiniMax H3 / Gemini Omni Flash;TTS 用 ElevenLabs 英文 + 火山豆包中文;ffmpeg 合成)。当用户要求生成视频、文生视频、图生视频、视频编辑、配音、TTS、口播、短视频、BGM 混音,或提到 视频、视频配乐、视频号、抖音视频、短片、video clip、voiceover 时使用——即使没有说"生成"。需要 FAL_KEY(fal.ai);可选 ELEVENLABS_API_KEY(英文配音)/ VOLC_TTS_API_KEY(中文配音,豆包 seed-tts V3);REPLICATE_API_TOKEN 通道已脚手架化。零依赖,Node ≥ 18(合成与时长校验需要 ffmpeg/ffprobe)。模型路由、端点、参数枚举与定价集中在一个 JSON 注册表——加模型=改配置,不改代码。.

兼容平台~Claude Code~Codex CLI~Cursor✓Gemini CLI
npx skills add x-rush/video-forge

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

video-forge — Multi-Channel Video Generation + Voiceover Synthesis Engine

Generates AI videos via the fal.ai queue API, synthesizes voiceover videos with TTS + ffmpeg—no-dependency Node CLI, sibling of image-forge / music-forge. Model routing, endpoints, parameter enums, and pricing are centralized in a JSON registry—add a model = change config, not code.

Key configuration: FAL_KEY (fal.ai, required for video). Optional voiceover: ELEVENLABS_API_KEY (English) or Volc VOLC_TTS_API_KEY (Chinese, 豆包 seed-tts V3). Voiceover language split: Chinese → volc channel, English → elevenlabs channel. Replicate channel is scaffolded (REPLICATE_API_TOKEN). Keys are never written to any file, commit, document, or log.

Single entry point: the host project creates a thin wrapper that forwards parameters to this skill's scripts/—never duplicates the implementation.

Upon activation the system provides the Base directory (hereafter <skill>):

  • <skill>/scripts/gen-video.js — video CLI (submit → poll → download → validate → accounting)
  • <skill>/scripts/gen-tts.js — voiceover CLI (ElevenLabs / Volc, character accounting + balance check)
  • <skill>/scripts/assemble.js — ffmpeg assembly (video + voiceover + BGM ducking)
  • <skill>/scripts/inspect.js — pre-delivery review (ffprobe summary + uniform frame extraction)
  • <skill>/scripts/gen-srt.js — speech recognition subtitle generation (whisper bilingual Chinese/English, data URI direct injection, no storage needed)
  • <skill>/scripts/budget.js — spending report + dual-axis monthly budget (video USD / TTS characters)
  • <skill>/providers/ — channel implementations (fal queue, replicate scaffold, 2× TTS)
  • <skill>/models.json — registry: models, endpoints, enums, prices, TTS config
  • <skill>/reference/ — endpoint contracts, prompting guide, quality matrix, and lessons learned

Quick Start

GEN=<skill>/scripts/gen-video.js

# Cheapest text-to-video (wan-3.0 480p 5s ≈ $0.25, silent—post-dubbed)
node $GEN --model wan30 --prompt "Rainy neon street at night, slow motion" --resolution 480p --duration 5

# Image-to-video first choice (H3 turbo promo $0.015/s → 6s ≈ $0.09)
node $GEN --model h3-max-turbo --image first-frame.png --prompt "Camera slowly pushes in"

# Native audio track (Gemini Omni Flash 1.1, 360p $0.03/s)
node $GEN --model omni-flash-11 --prompt "Sunrise at sea, sound of waves"

# Voiceover (ElevenLabs free tier) → BGM ducking assembly
node <skill>/scripts/gen-tts.js --text "Welcome to our show." --out vo.mp3
node <skill>/scripts/assemble.js --video video.mp4 --voiceover vo.mp3 --bgm bgm.mp3 --duck

# Spending / Budget
node <skill>/scripts/budget.js --check

Every successful generation appends to scripts/gen-log.jsonl (shared ledger, gitignored; video lines have est_usd, TTS lines have chars).

Workflow

  1. Budget check: Before the first generation of each session, run budget.js --check. A single video costs $0.09-3, an order of magnitude more expensive than image generation.
  2. Confirm intent (skip if user already specified): ① Visual content and aspect ratio (16:9/9:16) ② Duration ③ Whether native audio/voiceover is needed ④ Target platform.
  3. Model selection (selection criteria, calibrated 2026-10-10): Text-to-video & video editing → wan30; Image-to-video → h3-max-turbo (i2v first choice, best value); High-quality narrative → seedance20/seedance25 (expensive, confirm before use); With native audio → omni-flash-11 (360p $0.03/s); 2K/4K → h3. Silent models get voiceover via gen-tts + assemble.
  4. Prompt and parameters: Follow reference/prompting.md — five-layer prompt structure, per-model do/don't, parameter cheat sheet (seed / audio toggle / resolution tier cost strategy).
  5. Single generation → validation (ffprobe duration/resolution/audio track) → deliver, let user confirm before iterating. Each iteration = one submission + one feedback, no chained regenerations.
  6. Assembly: Default discards original audio track; --clip-volume retains native audio (used when mixing omni/sound-model with voiceover); --srt burns subtitles (standard for talking-head content). Before delivery, use inspect.js for frame extraction review; per-model quality benchmarks are in reference/quality-matrix.md.
  7. Extended endpoints: --use <name> invokes registry extra_endpoints (h3-max's extend/relight/recast/lipsync, seedance's draft/mini/fast tiers, omni's reference/edit, full directory in endpoints.md)—input slots are strictly validated to prevent accidental charges.
  8. Voiceover language split: Chinese voiceover → --channel volc (豆包 seed-tts, _uranus_bigtts voice family, with --clone for voice cloning); English voiceover → --channel elevenlabs (free tier can only use own generated voices).

Key Rules

Read reference/lessons.md — Status markers: [live] tested, [docs] documentation verified:

  • ⚠️ fal queue submissions do not validate the body: a submission with complete fields will definitely produce output and incur charges; only missing required fields or illegal enums cause worker rejection (no charge). Never send 'probe requests' to queue endpoints—unless you confirm the parameters are invalid, and you must have an 'immediate cancel' safety net.
  • H3 promotional price (40% off) expires 2026-10-15, after which the registry price must be updated.
  • omni-flash (v1) is token-billed (input text/audio/video is also billed), making budget estimation difficult—prefer omni-flash-11.
  • Video editing (--video-input) and H3-max's editing endpoints are still in docs status—test with small clips first.
  • All 8 model enums have been tested and backfilled in the registry (2026-10-10); long-tail parameters go through --advanced-json.
  • ASR uses fal-ai/whisper (bilingual Chinese/English, data URI direct injection, no storage/upload needed); audio >8MB is first split with ffmpeg.
  • ElevenLabs free tier API blocks library voices (402) — before dubbing, use --list-voices to select category=generated custom voices.
  • Content compliance: usage of real people's likeness, copyrighted materials, or trademarks requires authorization; platform AI generation labeling obligations rest with the user—self-check before submission.
  • Budget dual-axis independent: fal is billed in USD, TTS in characters; overspend exits with code 2, same semantics as image/music-forge.

Registry & Extensibility

models.json holds video models (endpoint / image_endpoint / edit_endpoint / enums / prices) and TTS configuration. Adding a model: read the fal model page → add one JSON entry → run a smoke test generation → backfill tested enums. Adding a channel: replicate the contract from providers/fal-video.js, implement generate(), register in providers.

Boundaries

  • For content production only—do not integrate keys or channel calls into delivered production code.
  • Commercial release must respect each model vendor's commercial licensing terms; intermediary/aggregated channel output rights may differ from official subscriptions.
  • Platform compliance for AI-generated video (marking AI-generated content) is the responsibility of the user.
  • Music/BGM generation belongs to music-forge (installed separately); cover images belong to image-forge.

相关技能