cd /news/ai-tools/i-built-a-pipeline-that-turns-a-topi… · home topics ai-tools article
[ARTICLE · art-135342] src=dev.to ↗ pub= topic=ai-tools verified=true sentiment=↑ positive

I built a pipeline that turns a topic into a 20-30 minute documentary

A developer built AI Video Factory, an MIT-licensed Python pipeline that turns a single topic into a complete 20-30 minute documentary, handling script research and writing, per-scene visuals, local TTS narration, music, karaoke captions, FFmpeg assembly, QC, thumbnails, and YouTube metadata. The pipeline validates every cited URL with a real HTTP check, writes scripts in timed beats to hold target runtime, and prefers real stock footage over AI-generated visuals for long-form coherence. It runs against any OpenAI-compatible endpoint with local TTS and no cloud dependency.

by read1 min views2 publishedSep 20, 2026

I've been working on AI Video Factory, an MIT-licensed Python pipeline that turns a topic into a complete 20-30 minute documentary: researched script, per-scene visuals, local TTS narration, music bed, karaoke captions, FFmpeg assembly, QC, thumbnail, and YouTube metadata.

You give it a topic. It researches the topic, writes a script with citations, pulls per-scene visuals from Pexels/Pixabay/NASA, narrates it with local TTS, lays down a music bed, burns in karaoke captions, assembles everything in FFmpeg, runs a QC gate, and outputs a thumbnail plus YouTube metadata. Seven presets: business autopsy, history reconstruction, science doc, horror anthology, and more.

1. LLM-written scripts invent citations that look completely legit. The first scripts came back with references that sounded real but pointed nowhere. Now every cited URL gets a real HTTP check against a 200 response. Anything that fails the check gets cut or rewritten.

2. A "25 minute" video kept coming out at 14 minutes. Runtime drift is a real problem with generated scripts. Scripts are now written in timed beats, and underweight beats get extended at roughly 150 wpm until the target runtime holds.

3. Real stock footage beats AI visuals for most scenes. This one honestly surprised me. AI-generated visuals look impressive frame by frame but feel off across a 20-minute runtime. The pipeline prefers real footage, with local still generation and procedural fallbacks when nothing fits.

Scripting runs against any OpenAI-compatible endpoint (LM Studio, llama-server), TTS is local, and nothing cloud is required. Roadmap includes Whisper-based caption alignment, more music profiles, optional Veo/Sora providers, and multilingual narration.

The repo is here: https://github.com/summitsingh/ai-video-factory I genuinely don't know if anyone besides me wants this. Tell me what you'd throw at it first.

── more in #ai-tools 4 stories · sorted by recency
── more on @ai video factory 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/i-built-a-pipeline-t…] indexed:0 read:1min 2026-09-20 ·