{"slug": "i-built-a-pipeline-that-turns-a-topic-into-a-20-30-minute-documentary", "title": "I built a pipeline that turns a topic into a 20-30 minute documentary", "summary": "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.", "body_md": "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.\n\nYou 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.\n\n**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.\n\n**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.\n\n**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.\n\nScripting 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.\n\nThe repo is here: [https://github.com/summitsingh/ai-video-factory](https://github.com/summitsingh/ai-video-factory)\n\nI genuinely don't know if anyone besides me wants this. Tell me what you'd throw at it first.", "url": "https://wpnews.pro/news/i-built-a-pipeline-that-turns-a-topic-into-a-20-30-minute-documentary", "canonical_source": "https://dev.to/summitsingh/i-built-a-pipeline-that-turns-a-topic-into-a-20-30-minute-documentary-bfp", "published_at": "2026-09-20 19:59:40+00:00", "updated_at": "2026-09-20 20:24:35.004651+00:00", "lang": "en", "topics": ["ai-tools", "generative-ai", "large-language-models", "ai-products", "developer-tools"], "entities": ["AI Video Factory", "GitHub", "Pexels", "Pixabay", "NASA", "FFmpeg", "Whisper", "Veo"], "alternates": {"html": "https://wpnews.pro/news/i-built-a-pipeline-that-turns-a-topic-into-a-20-30-minute-documentary", "markdown": "https://wpnews.pro/news/i-built-a-pipeline-that-turns-a-topic-into-a-20-30-minute-documentary.md", "text": "https://wpnews.pro/news/i-built-a-pipeline-that-turns-a-topic-into-a-20-30-minute-documentary.txt", "jsonld": "https://wpnews.pro/news/i-built-a-pipeline-that-turns-a-topic-into-a-20-30-minute-documentary.jsonld"}}