v1.0.0 Stable

Print
Viral Videos
While You Sleep.

An end-to-end autonomous pipeline that transforms Reddit stories into professionally edited short-form videos with zero manual intervention.

Reddit LLM Video Render

Stop Editing.
Start Building.

Creating short-form content manually takes hours. Searching for stories, recording voiceovers, syncing subtitles word-by-word, and rendering videos is a repetitive nightmare.

❌ Manual story scraping
❌ Expensive voiceover artists
❌ Tedious subtitle timing
❌ Heavy video rendering tools
❌ Forgetful daily uploads
The Solution

A Fully Automated Factory

ViralContent Factory connects 5 AI services, TTS engines, and a programmable video compositor into one seamless workflow.

Reddit Scraping
AI Enhancement
Edge TTS Audio
Word Syncing
Video Render
Auto Upload

System Architecture

Main Pipeline Orchestrator (main_pipeline.py)

Manages execution, handles batching, and prevents system sleep.

Phase 1

Scraping & AI LLM processing for hooks and SEO. Checks 30+ subreddits.

Phase 2

Audio synthesis via Edge-TTS & word-level timestamp extraction.

Phase 3

MoviePy video compositing with dynamic 3-word animated subtitles.

LLM Router

Automatic failover between Groq, Gemini, Cerebras, HF, and OpenRouter.

Cleanup System

Batch management, removing temporary files, email alerts when 7+ ready.

Uploader

Automated YouTube and Instagram modules.

Core Features

Smart AI Routing

Never hit a rate limit. Automatically falls back between 5 LLM providers if quotas are exhausted.

Perfect Subtitle Sync

Mathematically accurate word-level alignment with configurable offset mapping.

30+ Sources

Scrapes top engaging stories seamlessly.

Batch Delivery

Runs quietly in the background and sends an email when 7 videos are ready.

Zero Sleep

Built-in OS sleep prevention ensures long renders finish.

Auto Cleanup

No storage bloat. Temp files are deleted instantly.

Multi-Provider Resiliency

The built-in LLM router prevents your pipeline from crashing due to API limits. It automatically uses cheap fast models for basic tasks and strong models for creative hooks.

Groq (Llama 3)
Google Gemini
Cerebras
OpenRouter
HuggingFace

By The Numbers

0
Success Rate %
0
Subreddits
0
LLM Providers
1080p
Resolution

Installation

Clone Repository

git clone https://github.com/indiser/ViralContent-Factory.git

Install Python Dependencies

pip install -r requirements.txt

Install System Dependencies

You need FFmpeg, ImageMagick, and Deno (for yt-dlp).

winget install Gyan.FFmpeg
winget install ImageMagick.ImageMagick
winget install DenoLand.Deno

Configure .env File

GROQ_API_KEY=your_key_here
EMAIL_USER=your_email@gmail.com
EMAIL_APP_PASS=your_app_password

Developer Friendly

ViralContent-Factory
📄 main_pipeline.py # Orchestrator & Sleep Prevention
🔍 phase1.py # Scraper & AI logic
🎙️ phase2.py # TTS & Timestamps
🎥 phase3.py # Video Render & Subtitles
🤖 llm_router.py # 5-provider fallback logic
📤 yt_automation.py # YouTube upload script
⚙️ run_factory.bat # Task scheduler entry point

The Autonomous Workflow

03:00 AM

Phase 1: Content Acquisition

Task Scheduler triggers the factory. Scraper randomly selects from 30+ subreddits, filters out bad posts, and finds the perfect 150-word story.

03:00:15 AM

AI Enhancement & Routing

LLM Router connects to Groq. Generates a viral hook, detects gender, assigns voice, and creates 5 SEO tags. A/B testing ranks the best title.

03:00:45 AM

Phase 2: Audio Synthesis

Edge TTS generates high-quality neural narration. System extracts mathematically precise word-level timestamps with a -0.3s sync offset.

03:01:30 AM

Phase 3: Video Compositor

MoviePy composites random 4K gameplay footage in 9:16 vertical format. Dynamic 3-word animated subtitles pop on screen using ImageMagick.

03:06:20 AM

Batch Alert & Cleanup

3 videos are completed. The system deletes temporary audio/json files. Checks if 7 videos are ready. Sends a Gmail alert.

Future Roadmap

Completed

✔️ Multi-provider LLM router
✔️ Batch video management
✔️ Word-level subtitle sync
✔️ Automated cleanup

In Progress

🔄 YouTube upload automation
🔄 Instagram Reels automation

Planned

📅 TikTok automation
📅 GPU-accelerated rendering
📅 Analytics dashboard

Ready to build a media empire?

Star the repository, fork the code, and start generating your first batch of viral videos today.

Star on GitHub