Self-Hosted AI Video Generation Pipeline: Automated Content Creation with MoneyPrinterTurbo
MoneyPrinterTurbo enables fully automated short-form video creation from simple text prompts. By supplying a subject or keyword, the system generates complete video scripts, sources royalty-free footage, creates synchronizde subtitles, and mixes background audio into a production-ready HD video.
Core Capabilities
The application employs a modular Model-View-Controller design, offering both RESTful API endpoints and an intuitive web interface. Key functionalities include:
- Automated Script Generation: AI-powered narrative creation with optional manual override
- Flexible Aspect Ratios: Native support for 9:16 vertical (1080×1920) and 16:9 horizontal (1920×1080) formats
- Batch Processing: Generate multiple variations simultaneously for selection
- Granular Control: Configurable clip duration and transition timing
- Multilingual Support: Chinese and English content generation
- Audio Synthesis: Integration with multiple TTS providers
- Subtitle Customization: Adjustable typography, positioning, color schemes, and stroke effects
- Audio Management: Randomized or specified background tracks with volume control
- Asset Sourcing: High-definition, copyright-free video libraries
- LLM Flexibility: Compatible with OpenAI, Moonshot, Azure, Qwen, Google Gemini, Ollama, and GPT4Free
System Requirements
Minimum specifications:
- CPU: 4+ cores
- RAM: 8GB+
- GPU: Optional (CPU rendering supported)
- OS: Windows 10+ or macOS 11.0+
Avoid installation paths containing non-ASCII characters to prevent path resolution errors.
Deployment Methods
Containerized Deployment (Recommended)
Prerequisites: Docker Desktop installed and running. For Windows, ensure WSL2 backend is enabled.
# Clone repository
git clone https://github.com/harry0703/MoneyPrinterTurbo.git
cd MoneyPrinterTurbo
# Launch services
docker compose up --build
Access points:
- Web UI: http://localhost:8501
- API Documentation: http://localhost:8080/docs or http://localhost:8080/redoc
Manual Installation
Create an isolated Python environment:
git clone https://github.com/harry0703/MoneyPrinterTurbo.git
cd MoneyPrinterTurbo
# Using conda
conda create -n video-generator python=3.10
conda activate video-generator
pip install -r requirements.txt
ImageMagick Installation (required for subtitle rendering):
Windows:
- Download static binary from ImageMagick archives
- Install to default location (avoid custom paths with spaces)
- Update
config.tomlwith installation path
macOS:
brew install imagemagick
Linux (Ubuntu/Debian):
sudo apt-get update && sudo apt-get install imagemagick
Linux (RHEL/CentOS):
sudo yum install ImageMagick
Launching Services:
Web Interface:
# Windows
conda activate video-generator
.\webui.bat
# Unix/Linux/macOS
conda activate video-generator
chmod +x webui.sh && ./webui.sh
API Server:
python main.py
Configuration
Duplicate config.example.toml to config.toml and configure:
LLM Provider Setup:
- OpenAI: Set
llm_provider = "openai"and provide valid API key - Free Alternative: Use
g4f(GPT4Free) for zero-cost access with reduced reliability - Moonshot: Configure with API key from platform regitsration (includes free credits)
- Qwen: Alibaba Cloud integration available
Free GPT-3.5 Setup: Deploy local proxy container:
docker run -d -p 3040:3040 missuo/freegpt35
Then configure:
llm_provider = "openai"
openai_api_key = "sk-dummy-key"
openai_base_url = "http://localhost:3040/v1/"
openai_model_name = "gpt-3.5-turbo"
Media Processing
Voice Synthesis: Multiple TTS engines supported. Refer to voice catalog for available options.
Subtitle Generation: Two provider modes available:
edge: Fast processing, low resource usage, variable accuracywhisper: Higher accuracy, requires ~3GB model download, computationally intensive
Configure via subtitle_provider in settings. Leave empty to disable subtitles.
Asset Management:
- Background music: Store files in
resource/songs/ - Custom fonts: Place in
resource/fonts/
Troubleshooting
AttributeError: 'str' object has no attribute 'choices'
Indicates LLM response parsing failure. Typically network-related. Verify VPN connection or configure proxy settings in openai_base_url.
RuntimeError: No ffmpeg exe could be found Download FFmpeg static builds and specify path:
[app]
ffmpeg_path = "C:\\ffmpeg\\bin\\ffmpeg.exe"
Network Errors (Audio/Video Download) Connectivity issues with external services. Enable global VPN tunneling for regions with restricted access.
ImageMagick Policy Restrictions
Modify /etc/ImageMagick-X/policy.xml entries containing pattern="@", changing rights="none" to rights="read|write".
OSError: [Errno 24] Too many open files Increase system limits:
ulimit -n 10240
PIL Attribute Error (ANTIALIAS) Pillow 10.x compatibility issue. Downgrade to stable version:
pip uninstall Pillow
pip install Pillow==9.5.0