ersinkoc/AI-Video-Factory
Media & DesignTurn a topic into a finished multilingual YouTube video using Claude agents, paid media APIs and Remotion rendering.
What it does
AI Video Factory runs a staged pipeline that turns a single topic into a multilingual YouTube episode. Claude agents handle style, story, script, casting, concept art and review; paid media providers generate voice, images and clips; Remotion renders the final cut. A web Studio exposes every stage so a human can approve the script and the character drawings before spending on media generation.
The pipeline is resumable and idempotent, saving after each sub-step. It offers four motion modes—vector (code-animated SVG puppets), still (Ken Burns motion), mixed and animated (AI video clips)—and includes a quality gate that blind-reviews drawings, scores recognisability and redraws failures. Style packs fix colours, drawing rules and textures, and a character bank lets approved characters be reused across episodes.
Quick start
Requirements: Node.js 24+, pnpm 11, FFmpeg (optional if the Remotion-bundled copy suffices), and either a signed-in Claude Code install or ANTHROPIC_API_KEY. Keys for fal, Gemini or ElevenLabs are optional; providers without a key are disabled.
git clone https://github.com/ersinkoc/AI-Video-Factory.git
cd AI-Video-Factory
pnpm install
cp .env.example .env # fill in the keys you have
pnpm ys providers # check which providers are active
pnpm ys render-demo # local Remotion render test, no API calls
Then start the Studio and create an episode:
pnpm studio # http://localhost:3100
In the Studio, click New episode, enter a topic and choose language, length, motion mode, style pack, voice, budget and subtitle options. Edit and approve the script, then approve or redraw the characters. Production then runs automatically, ending with the video, an .srt subtitle file, a publishing package with title, description, tags and thumbnail, and optionally a vertical 9:16 Short.
The CLI supports the same pipeline, for example:
pnpm ys episode new --topic "Ottoman coffeehouse bans" --lang en --minutes 3 --motion vector --budget 5
pnpm ys episode run <id>
Configuration and cost control
Keys and switches live in .env; see the README configuration table for FAL_KEY, GEMINI_API_KEY, ELEVENLABS_API_KEY, ANTHROPIC_API_KEY and per-tier model variables. Paid calls go through one media gateway that ranks providers by quality and price, caches by content hash and falls back on failure. An estimate is shown before spending, and a per-episode budget cap applies to paid image, voice and video APIs; Claude agent calls are tracked separately and are not counted toward the cap.
By default assets go to .data/assets, the cost ledger to .data/ledger.jsonl and videos to .data/episodes. Postgres 18, Redis 8 and RustFS (S3) can be used instead via pnpm infra:up and db:migrate. Optional Manim 0.22 and LaTeX add formula and graph boards in vector episodes.
Constraints
- Remotion is free for individuals, non-profits and for-profit companies with up to 3 employees; larger companies need a Remotion company licence.
- Generated media is subject to each provider's terms (fal, Google, ElevenLabs), and reference images keep their Wikimedia licences.
- GPU rendering is the default (
YS_RENDER_GL=angle, about 40% faster and needed for 3D figures); machines without a GPU should useswangle, and a crashed GPU render is retried once with software GL. - The Studio checks for a newer GitHub release every 6 hours; disable with
YS_UPDATE_CHECK=0.
HotRepo's take
The project appeared on the HotRepo new-project list for TypeScript on 2026-11-03, reporting 49 stars gained in the roughly 24-hour window from 2026-11-02T10:45:27Z to 2026-11-03T10:45:31Z, when the snapshot recorded 159 stars and 22 forks. Our sampled star count moved from 100 on 2026-11-02T02:45Z to 159 at the end of the ranking window, a steady rise rather than a single spike. No best GitHub daily rank is recorded, so this is a new-project observation, not evidence of broad adoption. The README's emphasis on resumable stages, a per-episode budget cap, content-hash caching and an explicit quality gate for generated drawings distinguishes it from a thin wrapper around media APIs; the main practical questions for adopters are provider spend and the extra Remotion licence for larger teams.
Written by AI from the project's README, updated . The project's own docs are the source of truth.