Automated content creation platform. Post 5x a day on Instagram, YouTube, TikTok, LinkedIn, and X.
The content this tool creates IS the marketing for the tool. The AI avatar talks about how ContentReel automates content creation ā so every video is a living demo that funnels viewers into subscribers.
Built on the original content_creation pipeline by cangeorgecode.
Script ā HeyGen Avatar Video ā B-Rolls ā Captions ā Multi-Platform Export
ā
AI Script Generator (with hooks + CTAs)
The pipeline has 4 stages:
- Script Generation (optional) ā AI writes conversion-optimized scripts with hooks and CTAs
- HeyGen Avatar ā AI avatar delivers your script (costs HeyGen credits)
- B-Rolls ā Random b-rolls fill the middle 77% of the video
- Captions ā Animated word-by-word captions via PyCaps
- Multi-Platform (optional) ā Export to YouTube (16:9), LinkedIn (1:1), X (16:9)
- HeyGen API Key ā Required for avatar video generation. Sign up here
- OpenAI API Key ā Required for AI script generation (can also use Anthropic)
- B-Roll Footage ā Put
.mp4clips in thebrolls/folder
python3 -m venv venv source venv/bin/activate pip install -r requirements.txt pip install openai anthropic # for AI script generation mkdir -p brolls media output swipe_files
HEYGEN_API_KEY='your_key_here' OPENAI_API_KEY='your_key_here' SAAS_NAME='ContentReel'
# Generate 5 scripts and process them all at once python factory3.py --generate 5 # Generate 10 scripts with curiosity hooks python factory3.py --generate 10 --hook curiosity --niche "content marketing" # Use Anthropic instead of OpenAI python factory3.py --generate 5 --provider anthropic
python factory3.py swipe_files/demo_contentreel.json
After generating your captioned video:
# Create all platform variants python platform_formatter.py output/your_video_captioned.mp4 --all # Or specific platforms python platform_formatter.py output/your_video_captioned.mp4 --platforms youtube,linkedin,x
# Check what's been done and what failed python factory3.py --status # Retry any failed scripts python factory3.py swipe_files/scripts.json --retry # Reset a specific script to reprocess it python factory3.py --reset 5 # Setup check (creates folders, verifies b-rolls) python factory3.py --setup
The script generator creates conversion-optimized scripts using AI. It understands the SaaS product and writes scripts that drive signups.
# See all available templates python script_generator.py --info # Generate scripts with specific styles python script_generator.py --count 10 --hook curiosity --body story --cta hard python script_generator.py --count 5 --provider anthropic --niche "video marketing"
| Style | Description | Example |
|---|---|---|
problem |
Pain point hook | "You're spending 4 hours editing one video. Stop." |
curiosity |
Curiosity gap | "What if you could post 5x a day and never touch a camera?" |
result |
Results-driven | "I grew my audience 300% posting 5x a day." |
comparison |
Before/after | "$500/video production vs $0.05 with AI." |
direct |
Direct address | "You. The one who keeps saying 'I'll start next week.'" |
| Structure | Best For |
|---|---|
problem-solution |
Cold audience pain point ā solution |
story |
Relatable before/after narrative |
feature-spotlight |
Deep dive on one feature |
comparison |
Value demonstration |
[
{
"id": 1,
"script": "Your video script here... (110-220 words)",
"niche": "content automation",
"hook_style": "problem",
"body_style": "problem-solution",
"hook": "First attention-grabbing sentence",
"cta": "Final call-to-action sentence"
}
]The factory tracks every script's progress in .pipeline_state.json. If something fails:
- HeyGen credits are NOT wasted ā the pipeline won't re-generate an avatar video that already exists
- Resume where you left off ā re-run the same command and it skips completed steps
- Retry failures ā
python factory3.py scripts.json --retry
"new" ā Not started
"heygen_done" ā Avatar video downloaded (SAVED ā won't regenerate)
"broll_done" ā B-rolls added
"completed" ā All steps done, captioned video ready
"failed" ā Something went wrong at a specific step
Default voice is Chloe - Lifelike (HeyGen voice). You can override:
python factory3.py scripts.json --voice 6e4d89218fa24eb3b3fe4faa16a15895
Available voices are in voices.json (collected from the HeyGen API).
content_creation/
āāā factory3.py # Main pipeline orchestrator
āāā script_generator.py # AI script generation with hooks
āāā platform_formatter.py # Multi-platform export tool
āāā pipeline_state.py # State manager for resume/skip
āāā heygen6.py # HeyGen API integration
āāā broll2.py # B-roll overlay system
āāā pycaps2.py # Caption rendering
āāā templates/centered/ # PyCaps caption styling
āāā brolls/ # Your b-roll .mp4 clips
āāā media/ # Downloaded HeyGen videos
āāā output/ # Finished videos
āāā swipe_files/ # Script queue JSON files
- AI Script Generator with hook system
- Pipeline resilience (resume/skip/retry)
- Multi-platform export (YT, LinkedIn, X)
- ElevenLabs voice integration
- Custom avatar upload
- Self-serving SaaS with 2 subscription tiers
- Web dashboard
- Stripe billing integration
- Batch processing dashboard
Original MIT License. Free to use and modify.