Communitygithub.com

x-rush/video-forge

Multi-channel AI video generation + voiceover synthesis engine (fal.ai queue: Wan 3.0 / Seedance 2.0+2.5 / MiniMax H3 / Gemini Omni Flash; TTS via ElevenLabs for English + Volc for Chinese; ffmpeg assembly). Use when users ask to generate videos, text-to-video, image-to-video, video editing, dubbing, TTS, voiceovers, short clips, BGM mixing, or mention 视频, video soundtrack, video accounts (视频号), Douyin, short films, video clip, voiceover—even without explicitly saying 'generate'.

What is video-forge?

This AI skill acts as a powerful, multi-channel video generation and voiceover synthesis engine for developers working with AI agents or CLI tools. It integrates fal.ai’s queue API to generate videos from text or images using models like Wan 3.0, Seedance 2.0/2.5, MiniMax H3, and Gemini Omni Flash. It supports English TTS via ElevenLabs and Chinese TTS via Volc (豆包 seed-tts V3), then assembles final videos with ffmpeg—including optional BGM ducking and subtitle burning. A centralized JSON registry holds all model endpoints, parameters, and pricing, meaning adding a new model only requires configuration changes, not code changes. The skill provides zero-dependency Node scripts for video generation, TTS, assembly, inspection, subtitle generation, and budget tracking. It enforces strict separation of concerns: never writes API keys to files, commits, or logs, and leaves integration to the host project via thin wrappers. Developers benefit from production-grade workflows with budget checks, quality inspections, and detailed reference documentation for prompting, cost optimization, and model selection.

Works with~Claude Code~Codex CLI~Cursor✓Gemini CLI
npx skills add x-rush/video-forge

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

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.

Related Skills