|
|
5 days ago | |
|---|---|---|
| .github | 2 years ago | |
| GUI | 2 years ago | |
| TTS | 5 days ago | |
| assets | 2 years ago | |
| fonts | 3 years ago | |
| 4 weeks ago | ||
| scheduler | 5 days ago | |
| threads | 5 days ago | |
| uploaders | 5 days ago | |
| utils | 5 days ago | |
| video_creation | 5 days ago | |
| .dockerignore | 5 months ago | |
| .gitattributes | 4 years ago | |
| .gitignore | 5 days ago | |
| .pylintrc | 4 years ago | |
| .python-version | 5 months ago | |
| CODE_OF_CONDUCT.md | 4 years ago | |
| CONTRIBUTING.md | 4 years ago | |
| Dockerfile | 2 years ago | |
| GUI.py | 2 years ago | |
| LICENSE | 4 years ago | |
| PLAN.md | 5 days ago | |
| README.md | 5 days ago | |
| build.sh | 4 years ago | |
| install.sh | 4 years ago | |
| main.py | 5 days ago | |
| ptt.py | 4 years ago | |
| requirements.txt | 5 days ago | |
| run.bat | 3 years ago | |
| run.sh | 4 years ago | |
README.md
🇻🇳 Threads Video Maker Bot - Phiên Bản Việt Nam 🎥
Tạo video tự động từ nội dung Threads (Meta) và đăng lên TikTok, YouTube, Facebook.
Được phát triển dựa trên nền tảng Reddit Video Maker Bot, tối ưu hóa cho thị trường Việt Nam.
Tính Năng Chính ✨
- 📱 Threads Integration: Lấy nội dung tự động từ Threads (Meta) thay vì Reddit
- 🎙️ TTS Tiếng Việt: Hỗ trợ đọc tiếng Việt qua Google Translate TTS, OpenAI, và nhiều engine khác
- 📤 Auto-Upload: Tự động đăng video lên TikTok, YouTube, Facebook
- ⏰ Lên Lịch Tự Động: Cron-based scheduling với múi giờ Việt Nam
- 🎬 Video Chất Lượng: Background gaming, nhạc nền lofi, subtitle overlay
- 🔄 Pipeline Hoàn Chỉnh: Từ lấy nội dung → TTS → Screenshot → Video → Upload
Cài Đặt 🛠️
Yêu Cầu
- Python 3.10, 3.11 hoặc 3.12
- FFmpeg
- Tài khoản Threads Developer (Meta)
Bước 1: Clone và cài đặt
git clone https://github.com/thaitien280401-stack/RedditVideoMakerBot.git
cd RedditVideoMakerBot
pip install -r requirements.txt
Bước 2: Cấu hình
Chạy lần đầu để tạo file config.toml:
python main.py
Hoặc copy từ template:
cp utils/.config.template.toml config.toml
Bước 3: Điền thông tin API
Chỉnh sửa config.toml:
[threads.creds]
access_token = "YOUR_THREADS_ACCESS_TOKEN"
user_id = "YOUR_THREADS_USER_ID"
[settings.tts]
voice_choice = "googletranslate" # Hỗ trợ tiếng Việt tốt nhất
Sử Dụng 🚀
Chế độ Manual (Mặc định)
python main.py
Chế độ Auto (Tạo + Upload)
python main.py --mode auto
Chế độ Scheduled (Lên lịch tự động)
python main.py --mode scheduled
Legacy Reddit Mode
python main.py --reddit
Cấu Hình Upload 📤
YouTube
[uploaders.youtube]
enabled = true
client_id = "YOUR_GOOGLE_CLIENT_ID"
client_secret = "YOUR_GOOGLE_CLIENT_SECRET"
refresh_token = "YOUR_GOOGLE_REFRESH_TOKEN"
TikTok
[uploaders.tiktok]
enabled = true
client_key = "YOUR_TIKTOK_CLIENT_KEY"
client_secret = "YOUR_TIKTOK_CLIENT_SECRET"
refresh_token = "YOUR_TIKTOK_REFRESH_TOKEN"
[uploaders.facebook]
enabled = true
page_id = "YOUR_FACEBOOK_PAGE_ID"
access_token = "YOUR_FACEBOOK_PAGE_ACCESS_TOKEN"
Cấu Hình Scheduler ⏰
[scheduler]
enabled = true
cron = "0 8,14,20 * * *" # Chạy lúc 8h, 14h, 20h hàng ngày
timezone = "Asia/Ho_Chi_Minh"
max_videos_per_day = 4
Kiến Trúc Hệ Thống 🏗️
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Threads API │────▶│ Video Engine │────▶│ Upload Manager │
│ (Meta Graph) │ │ TTS + FFmpeg │ │ YT/TT/FB APIs │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │ │
▼ ▼ ▼
threads/ video_creation/ uploaders/
threads_client.py threads_screenshot.py youtube_uploader.py
voices.py tiktok_uploader.py
final_video.py facebook_uploader.py
upload_manager.py
│
▼
scheduler/
pipeline.py (APScheduler)
you will then have to upload manually. This is for the sake of avoiding any sort of community guideline issues.
Requirements
- Python 3.10
- Playwright (this should install automatically in installation)
Installation 👩💻
-
Clone this repository:
git clone https://github.com/elebumm/RedditVideoMakerBot.git cd RedditVideoMakerBot -
Create and activate a virtual environment:
- On Windows:
python -m venv ./venv .\venv\Scripts\activate - On macOS and Linux:
python3 -m venv ./venv source ./venv/bin/activate
- On Windows:
-
Install the required dependencies:
pip install -r requirements.txt -
Install Playwright and its dependencies:
python -m playwright install python -m playwright install-deps
EXPERIMENTAL!!!!
- On macOS and Linux (Debian, Arch, Fedora, CentOS, and based on those), you can run an installation script that will automatically install steps 1 to 3. (requires bash)
bash <(curl -sL https://raw.githubusercontent.com/elebumm/RedditVideoMakerBot/master/install.sh)- This can also be used to update the installation
-
Run the bot:
python main.py -
Visit the Reddit Apps page, and set up an app that is a "script". Paste any URL in the redirect URL field, for example:
https://jasoncameron.dev. -
The bot will prompt you to fill in your details to connect to the Reddit API and configure the bot to your liking.
-
Enjoy 😎
-
If you need to reconfigure the bot, simply open the
config.tomlfile and delete the lines that need to be changed. On the next run of the bot, it will help you reconfigure those options.
(Note: If you encounter any errors installing or running the bot, try using python3 or pip3 instead of python or pip.)
For a more detailed guide about the bot, please refer to the documentation.
Video
Contributing & Ways to improve 📈
In its current state, this bot does exactly what it needs to do. However, improvements can always be made!
I have tried to simplify the code so anyone can read it and start contributing at any skill level. Don't be shy :) contribute!
- Creating better documentation and adding a command line interface.
- Allowing the user to choose background music for their videos.
- Allowing users to choose a reddit thread instead of being randomized.
- Allowing users to choose a background that is picked instead of the Minecraft one.
- Allowing users to choose between any subreddit.
- Allowing users to change voice.
- Checks if a video has already been created
- Light and Dark modes
- NSFW post filter
Please read our contributing guidelines for more detailed information.
For any questions or support join the Discord server
Developers and maintainers.
Elebumm (Lewis#6305) - https://github.com/elebumm (Founder)
Jason Cameron - https://github.com/JasonLovesDoggo (Maintainer)
Simon (OpenSourceSimon) - https://github.com/OpenSourceSimon
CallumIO (c.#6837) - https://github.com/CallumIO
Verq (Verq#2338) - https://github.com/CordlessCoder
LukaHietala (Pix.#0001) - https://github.com/LukaHietala
Freebiell (Freebie#3263) - https://github.com/FreebieII
Aman Raza (electro199#8130) - https://github.com/electro199
Cyteon (cyteon) - https://github.com/cyteon
LICENSE
Roboto Fonts are licensed under Apache License V2