MoneyPrinterTurbo 💸
English | 简体中文
Simply provide a topic or keyword for a video, and it will automatically generate the video copy, video materials, video subtitles, and video background music before synthesizing a high-definition short video.
WebUI
API Interface
Special Thanks 🙏
Due to the deployment and usage of this project, there is a certain threshold for some beginner users. We would like to express our special thanks to
RecCloud (AI-Powered Multimedia Service Platform) for providing a free AI Video Generator
service based on this
project. It allows for online use without deployment, which is very convenient.
- Chinese version: https://reccloud.cn
- English version: https://reccloud.com
Thanks for Sponsorship 🙏
Thanks to Picwish https://picwish.com for supporting and sponsoring this project, enabling continuous updates and maintenance.
Picwish focuses on the image processing field, providing a rich set of image processing tools that extremely simplify complex operations, truly making image processing easier.
Features 🎯
- Complete MVC architecture, clearly structured code, easy to maintain, supports both
API
andWeb interface
- Supports AI-generated video copy, as well as customized copy
- Supports various high-definition video sizes
- Portrait 9:16,
1080x1920
- Landscape 16:9,
1920x1080
- Portrait 9:16,
- Supports batch video generation, allowing the creation of multiple videos at once, then selecting the most satisfactory one
- Supports setting the duration of video clips, facilitating adjustments to material switching frequency
- Supports video copy in both Chinese and English
- Supports multiple voice synthesis, with real-time preview of effects
- Supports subtitle generation, with adjustable
font
,position
,color
,size
, and also supportssubtitle outlining
- Supports background music, either random or specified music files, with adjustable
background music volume
- Video material sources are high-definition and royalty-free, and you can also use your own local materials
- Supports integration with various models such as OpenAI, Moonshot, Azure, gpt4free, one-api, Qwen, Google Gemini, Ollama, DeepSeek, ERNIE, Pollinations and more
Future Plans 📅
- GPT-SoVITS dubbing support
- Optimize voice synthesis using large models for more natural and emotionally rich voice output
- Add video transition effects for a smoother viewing experience
- Add more video material sources, improve the matching between video materials and script
- Add video length options: short, medium, long
- Support more voice synthesis providers, such as OpenAI TTS
- Automate upload to YouTube platform
Video Demos 📺
Portrait 9:16
▶️ How to Add Fun to Your Life | ▶️ What is the Meaning of Life |
---|---|
Landscape 16:9
▶️ What is the Meaning of Life | ▶️ Why Exercise |
---|---|
System Requirements 📦
- Recommended minimum 4 CPU cores or more, 4G of memory or more, GPU is not required
- Windows 10 or MacOS 11.0, and their later versions
Quick Start 🚀
Run in Google Colab
Want to try MoneyPrinterTurbo without setting up a local environment? Run it directly in Google Colab!
Windows
Google Drive (v1.2.6): https://drive.google.com/file/d/1HsbzfT7XunkrCrHw5ncUjFX8XX4zAuUh/view?usp=sharing
After downloading, it is recommended to double-click update.bat
first to update to the latest code, then double-click start.bat
to launch
After launching, the browser will open automatically (if it opens blank, it is recommended to use Chrome or Edge)
Other Systems
One-click startup packages have not been created yet. See the Installation & Deployment section below. It is recommended to use docker for deployment, which is more convenient.
Installation & Deployment 📥
Prerequisites
① Clone the Project
git clone https://github.com/harry0703/MoneyPrinterTurbo.git
② Modify the Configuration File
- Copy the
config.example.toml
file and rename it toconfig.toml
- Follow the instructions in the
config.toml
file to configurepexels_api_keys
andllm_provider
, and according to the llm_provider's service provider, set up the corresponding API Key
Docker Deployment 🐳
① Launch the Docker Container
If you haven't installed Docker, please install it first https://www.docker.com/products/docker-desktop/ If you are using a Windows system, please refer to Microsoft's documentation:
- https://learn.microsoft.com/en-us/windows/wsl/install
- https://learn.microsoft.com/en-us/windows/wsl/tutorials/wsl-containers
cd MoneyPrinterTurbo
docker-compose up
Note:The latest version of docker will automatically install docker compose in the form of a plug-in, and the start command is adjusted to
docker compose up
② Access the Web Interface
Open your browser and visit http://0.0.0.0:8501
③ Access the API Interface
Open your browser and visit http://0.0.0.0:8080/docs Or http://0.0.0.0:8080/redoc
Manual Deployment 📦
① Create a Python Virtual Environment
It is recommended to create a Python virtual environment using conda
git clone https://github.com/harry0703/MoneyPrinterTurbo.git
cd MoneyPrinterTurbo
conda create -n MoneyPrinterTurbo python=3.11
conda activate MoneyPrinterTurbo
pip install -r requirements.txt
② Install ImageMagick
Windows:
- Download https://imagemagick.org/script/download.php Choose the Windows version, make sure to select the static library version, such as ImageMagick-7.1.1-32-Q16-x64-static.exe
- Install the downloaded ImageMagick, do not change the installation path
- Modify the
config.toml
configuration file, setimagemagick_path
to your actual installation path
MacOS:
brew install imagemagick
Ubuntu
sudo apt-get install imagemagick
CentOS
sudo yum install ImageMagick
③ Launch the Web Interface 🌐
Note that you need to execute the following commands in the root directory
of the MoneyPrinterTurbo project
Windows
webui.bat
MacOS or Linux
sh webui.sh
After launching, the browser will open automatically
④ Launch the API Service 🚀
python main.py
After launching, you can view the API documentation
at http://127.0.0.1:8080/docs and directly test the interface
online for a quick experience.
Voice Synthesis 🗣
A list of all supported voices can be viewed here: Voice List
2024-04-16 v1.1.2 Added 9 new Azure voice synthesis voices that require API KEY configuration. These voices sound more realistic.
Subtitle Generation 📜
Currently, there are 2 ways to generate subtitles:
- edge: Faster generation speed, better performance, no specific requirements for computer configuration, but the quality may be unstable
- whisper: Slower generation speed, poorer performance, specific requirements for computer configuration, but more reliable quality
You can switch between them by modifying the subtitle_provider
in the config.toml
configuration file
It is recommended to use edge
mode, and switch to whisper
mode if the quality of the subtitles generated is not
satisfactory.
Note:
- In whisper mode, you need to download a model file from HuggingFace, about 3GB in size, please ensure good internet connectivity
- If left blank, it means no subtitles will be generated.
Since HuggingFace is not accessible in China, you can use the following methods to download the
whisper-large-v3
model file
Download links:
- Baidu Netdisk: https://pan.baidu.com/s/11h3Q6tsDtjQKTjUu3sc5cA?pwd=xjs9
- Quark Netdisk: https://pan.quark.cn/s/3ee3d991d64b
After downloading the model, extract it and place the entire directory in .\MoneyPrinterTurbo\models
,
The final file path should look like this: .\MoneyPrinterTurbo\models\whisper-large-v3
MoneyPrinterTurbo
├─models
│ └─whisper-large-v3
│ config.json
│ model.bin
│ preprocessor_config.json
│ tokenizer.json
│ vocabulary.json
Background Music 🎵
Background music for videos is located in the project's resource/songs
directory.
The current project includes some default music from YouTube videos. If there are copyright issues, please delete them.
Subtitle Fonts 🅰
Fonts for rendering video subtitles are located in the project's resource/fonts
directory, and you can also add your
own fonts.
Common Questions 🤔
❓RuntimeError: No ffmpeg exe could be found
Normally, ffmpeg will be automatically downloaded and detected. However, if your environment has issues preventing automatic downloads, you may encounter the following error:
RuntimeError: No ffmpeg exe could be found.
Install ffmpeg on your system, or set the IMAGEIO_FFMPEG_EXE environment variable.
In this case, you can download ffmpeg from https://www.gyan.dev/ffmpeg/builds/, unzip it, and set ffmpeg_path
to your
actual installation path.
[app]
# Please set according to your actual path, note that Windows path separators are \\
ffmpeg_path = "C:\\Users\\harry\\Downloads\\ffmpeg.exe"
❓ImageMagick is not installed on your computer
- Follow the
example configuration
provideddownload address
to install https://imagemagick.org/archive/binaries/ImageMagick-7.1.1-30-Q16-x64-static.exe, using the static library - Do not install in a path with Chinese characters to avoid unpredictable issues
For Linux systems, you can manually install it, refer to https://cn.linux-console.net/?p=16978
Thanks to @wangwenqiao666 for their research and exploration
❓ImageMagick's security policy prevents operations related to temporary file @/tmp/tmpur5hyyto.txt
You can find these policies in ImageMagick's configuration file policy.xml.
This file is usually located in /etc/ImageMagick-X
/ or a similar location in the ImageMagick installation directory.
Modify the entry containing pattern="@"
, change rights="none"
to rights="read|write"
to allow read and write operations on files.
❓OSError: [Errno 24] Too many open files
This issue is caused by the system's limit on the number of open files. You can solve it by modifying the system's file open limit.
Check the current limit:
ulimit -n
If it's too low, you can increase it, for example:
ulimit -n 10240
❓Whisper model download failed, with the following error
LocalEntryNotfoundEror: Cannot find an appropriate cached snapshotfolderfor the specified revision on the local disk and outgoing trafic has been disabled. To enablerepo look-ups and downloads online, pass 'local files only=False' as input.
or
An error occured while synchronizing the model Systran/faster-whisper-large-v3 from the Hugging Face Hub: An error happened while trying to locate the files on the Hub and we cannot find the appropriate snapshot folder for the specified revision on the local disk. Please check your internet connection and try again. Trying to load the model directly from the local cache, if it exists.
Solution: Click to see how to manually download the model from netdisk
Feedback & Suggestions 📢
- You can submit an issue or a pull request.
License 📝
Click to view the LICENSE
file