diff --git a/README.md b/README.md index 8042755..d77211b 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,15 @@ # Reddit Video Maker Bot πŸŽ₯ -All done WITHOUT video editing or asset compiling. Just pure ✨programming magic✨. +![Logo Screenshot](./assets/redditVideoMaker.png) + +> **Automate viral Reddit video creation with zero video editing skills required!** + +[![Python](https://img.shields.io/badge/Python-3.10%2B-blue.svg)](https://www.python.org/) +[![License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE) +[![Discord](https://img.shields.io/discord/980117851434864690?color=7289DA&label=Discord&logo=discord&logoColor=white)](https://discord.gg/qfQSx45xCV) +[![Documentation](https://img.shields.io/badge/Documentation-Available-brightgreen)](https://reddit-video-maker-bot.netlify.app/) + +All done WITHOUT video editing or asset compiling. Just pure ✨**programming magic**✨. Created by Lewis Menelaws & [TMRRW](https://tmrrwinc.ca) @@ -10,133 +19,439 @@ Created by Lewis Menelaws & [TMRRW](https://tmrrwinc.ca) - -## Video Explainer - -[![lewisthumbnail](https://user-images.githubusercontent.com/6053155/173631669-1d1b14ad-c478-4010-b57d-d79592a789f2.png) -](https://www.youtube.com/watch?v=3gjcY_00U1w) - -## Motivation πŸ€” - -These videos on TikTok, YouTube and Instagram get MILLIONS of views across all platforms and require very little effort. -The only original thing being done is the editing and gathering of all materials... - -... but what if we can automate that process? πŸ€” - -## Disclaimers 🚨 - -- **At the moment**, this repository won't attempt to upload this content through this bot. It will give you a file that - 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 πŸ‘©β€πŸ’» - -1. Clone this repository: - ```sh - git clone https://github.com/elebumm/RedditVideoMakerBot.git - cd RedditVideoMakerBot - ``` - -2. Create and activate a virtual environment: - - On **Windows**: - ```sh - python -m venv ./venv - .\venv\Scripts\activate - ``` - - On **macOS and Linux**: - ```sh - python3 -m venv ./venv - source ./venv/bin/activate - ``` - -3. Install the required dependencies: - ```sh - pip install -r requirements.txt - ``` - -4. Install Playwright and its dependencies: - ```sh - python -m playwright install - python -m playwright install-deps - ``` - ---- - -**EXPERIMENTAL!!!!** +## 🌟 Features + +### 🎬 **Video Creation** +- **Automated Reddit scraping** - Pull hot posts from any subreddit +- **Text-to-speech generation** - Convert Reddit posts and comments to natural speech +- **Dynamic video assembly** - Combine background footage with Reddit content +- **Custom thumbnails** - Auto-generate eye-catching thumbnails +- **Multiple output formats** - Create videos optimized for different platforms + +### πŸŽ™οΈ **Text-to-Speech Providers** +- **TikTok TTS** - 50+ voices including Disney characters, multiple languages +- **AWS Polly** - Premium neural voices with natural intonation +- **Google Translate** - Free multilingual TTS +- **Streamlabs Polly** - Streamer-friendly voice options +- **ElevenLabs** - AI-powered ultra-realistic voices +- **System TTS** - Use your operating system's built-in voices + +### 🎨 **Customization Options** +- **Background videos** - Minecraft, GTA, nature scenes, or add your own +- **Background music** - Add ambient music to enhance viewer experience +- **Voice settings** - Random voice selection or consistent narrator +- **Visual effects** - Opacity, transitions, and comment styling +- **Content filtering** - NSFW filtering and content moderation +- **Story mode** - Include the full Reddit post text + +### πŸ–₯️ **User Interface** +- **Web-based GUI** - Easy-to-use browser interface at `localhost:4000` +- **Command-line interface** - Full control via terminal +- **Settings management** - Centralized configuration system +- **Background manager** - Add/remove background videos easily + +### πŸ”§ **Advanced Features** +- **Duplicate detection** - Prevents creating videos from already processed posts +- **Multi-language support** - Create videos in various languages +- **Batch processing** - Generate multiple videos automatically +- **Custom Reddit threads** - Target specific posts by ID +- **Light/Dark mode** - Theme support for better user experience + +## 🎯 Demo & Examples + +### Video Explainer +[![Tutorial Video](https://user-images.githubusercontent.com/6053155/173631669-1d1b14ad-c478-4010-b57d-d79592a789f2.png)](https://www.youtube.com/watch?v=3gjcY_00U1w) + +### Sample Output +https://user-images.githubusercontent.com/66544866/173453972-6526e4e6-c6ef-41c5-ab40-5d275e724e7c.mp4 - - 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 +## πŸš€ Quick Start + +### Prerequisites +- **Python 3.10 or 3.11** (Required) +- **FFmpeg** (Auto-installed) +- **Reddit API Access** (Free) + +### Installation + +#### 🐍 **Method 1: Standard Installation** +```bash +# Clone the repository +git clone https://github.com/elebumm/RedditVideoMakerBot.git +cd RedditVideoMakerBot + +# Install dependencies +pip install -r requirements.txt + +# Install Playwright browsers +python -m playwright install +python -m playwright install-deps +``` + +#### πŸ”₯ **Method 2: Auto-Installer (Linux/macOS)** *Experimental!!!* +```bash +bash <(curl -sL https://raw.githubusercontent.com/elebumm/RedditVideoMakerBot/master/install.sh) +``` + +### First Run +1. **Start the bot:** + ```bash + python main.py + ``` + +2. **Reddit API Setup:** + - Visit [Reddit Apps](https://www.reddit.com/prefs/apps) + - Create a new "script" application + - Use any redirect URL (e.g., `https://jasoncameron.dev`) + - The bot will guide you through the configuration + +3. **Configure settings:** + - Follow the interactive prompts + - Or use the web GUI at `http://localhost:4000` + +4. **Generate your first video!** πŸŽ‰ + +## πŸŽ›οΈ Configuration + +### Web Interface + + + +Launch the GUI for easy configuration: +```bash +python GUI.py +``` +Navigate to `http://localhost:4000` to access: +- **Settings Panel** - Configure all bot options +- **Background Manager** - Add/remove background videos +- **Video Dashboard** - View generated content + +### Command Line +Edit `config.toml` directly or delete specific lines to reconfigure: +```toml +[reddit] +[reddit.thread] +subreddit = "AskReddit" +post_id = "" # Leave empty for random posts +max_comment_length = 500 + +[settings] +times_to_run = 1 +opacity = 0.9 +transition = 0.2 +``` + +## 🎡 Text-to-Speech Configuration + +### TikTok TTS (Default) +```toml +[settings.tts] +voice_choice = "tiktok" +tiktok_voice = "en_us_001" # Female voice +tiktok_sessionid = "your_session_id" # Required +``` + +**Available voices:** +- **Disney**: Ghost Face, Chewbacca, C3PO, Stitch, Stormtrooper +- **English**: Multiple male/female variants +- **International**: French, German, Spanish, Japanese, Korean, and more + +### AWS Polly +```toml +[settings.tts] +voice_choice = "awspolly" +aws_polly_voice = "Joanna" # Neural voice +``` + +### ElevenLabs (Premium) +```toml +[settings.tts] +voice_choice = "elevenlabs" +elevenlabs_api_key = "your_api_key" +elevenlabs_voice_name = "Rachel" +``` + +## 🎬 Background Customization + +### Add Custom Backgrounds +1. **Via Web Interface:** + - Go to `http://localhost:4000/backgrounds` + - Click "Add background video" + - Provide YouTube URL and details + +2. **Via JSON Configuration:** + ```json + { + "my_background": [ + "https://youtube.com/watch?v=VIDEO_ID", + "background.mp4", + "Creator Name", + "center" + ] + } + ``` + +### Built-in Backgrounds +- **Minecraft gameplay** - Classic parkour and building +- **GTA V gameplay** - Driving and action sequences +- **Nature scenes** - Relaxing landscapes and timelapses +- **Abstract animations** - Colorful motion graphics + +## πŸ› οΈ Advanced Usage + +### Batch Processing +```bash +# Generate 5 videos from r/AskReddit +python main.py --times 5 --subreddit AskReddit +``` + +### Target Specific Posts +```bash +# Create video from specific Reddit post +python main.py --post-id abc123xyz +``` + +### Story Mode +Enable story mode to include the full Reddit post text: +```toml +[settings] +storymode = true +storymodemethod = 0 # 0 = full post, 1 = sentence by sentence +``` + +## πŸ”Š Audio Features + +### Background Music +- **Automatic audio extraction** from background videos +- **Volume control** - Adjust music vs. speech balance +- **Audio synchronization** - Perfect timing with visual content + +### Voice Settings +- **Random voice selection** - Different voice per video +- **Consistent narrator** - Same voice throughout +- **Silence duration** - Control pauses between comments +- **Voice translation** - Multi-language support + +## πŸ“ Project Structure + +``` +RedditVideoMakerBot/ +β”œβ”€β”€ main.py # Main application entry point +β”œβ”€β”€ GUI.py # Web interface server +β”œβ”€β”€ config.toml # Configuration file +β”œβ”€β”€ requirements.txt # Python dependencies +β”œβ”€β”€ TTS/ # Text-to-speech engines +β”‚ β”œβ”€β”€ TikTok.py # TikTok TTS implementation +β”‚ β”œβ”€β”€ aws_polly.py # AWS Polly integration +β”‚ β”œβ”€β”€ elevenlabs.py # ElevenLabs API +β”‚ └── ... +β”œβ”€β”€ video_creation/ # Video generation modules +β”‚ β”œβ”€β”€ final_video.py # Video assembly +β”‚ β”œβ”€β”€ background.py # Background processing +β”‚ └── voices.py # Voice management +β”œβ”€β”€ reddit/ # Reddit API integration +β”œβ”€β”€ utils/ # Utility functions +β”œβ”€β”€ assets/ # Static assets +└── results/ # Generated videos +``` + +## 🀝 Contributing + +We welcome contributions! See our [Contributing Guide](CONTRIBUTING.md) for details. + +### Development Setup +```bash +# Fork and clone the repository +git clone https://github.com/your-username/RedditVideoMakerBot.git + +# Create a virtual environment +python -m venv venv +source venv/bin/activate # On Windows: venv\Scripts\activate + +# Install dependencies +pip install -r requirements.txt + +# Install development dependencies +pip install -r requirements-dev.txt # If available + +# Run tests +python -m pytest +``` +### Current Roadmap ---- +- [ ] Creating better documentation and adding a command line interface. +- [x] Allowing the user to choose background music for their videos. +- [x] Allowing users to choose a reddit thread instead of being randomized. +- [x] Allowing users to choose a background that is picked instead of the Minecraft one. +- [x] Allowing users to choose between any subreddit. +- [x] Allowing users to change voice. +- [x] Checks if a video has already been created +- [x] Light and Dark modes +- [x] NSFW post filter -5. Run the bot: - ```sh - python main.py - ``` +## πŸ“Š Performance & Optimization + +### System Requirements +- **CPU**: Multi-core recommended for faster processing +- **RAM**: 4GB minimum, 8GB recommended +- **Storage**: 2GB free space for temporary files +- **Network**: Stable internet for Reddit API and TTS services + +### Performance Tips +- **Use SSD storage** for faster video rendering +- **Close unnecessary applications** during processing +- **Batch process** multiple videos for efficiency +- **Configure video quality** based on target platform + +## πŸ› Troubleshooting + +### Common Issues + +**Python Version Error:** +```bash +# Ensure you're using Python 3.10 or 3.11 +python --version +``` + +**TikTok TTS Issues:** +- Ensure `tiktok_sessionid` is properly configured +- Check the [documentation](https://reddit-video-maker-bot.netlify.app/) for session ID extraction + +**FFmpeg Not Found:** +```bash +# The bot will attempt to install FFmpeg automatically +# If this fails, install manually based on your OS +``` + +**Reddit API Errors:** +- Verify your Reddit app credentials +- Check API rate limits +- Ensure subreddit exists and is accessible + +### Getting Help +- πŸ“š **Documentation**: [reddit-video-maker-bot.netlify.app](https://reddit-video-maker-bot.netlify.app/) +- πŸ’¬ **Discord**: [Join our community](https://discord.gg/qfQSx45xCV) +- 🐞 **Issues**: [GitHub Issues](https://github.com/elebumm/RedditVideoMakerBot/issues) + +## 🎨 Customization Examples + +### Create Gaming Content +```toml +[reddit.thread] +subreddit = "gaming" +post_id = "" + +[settings] +background_choice = "minecraft-parkour" +opacity = 0.8 +``` -6. Visit [the Reddit Apps page](https://www.reddit.com/prefs/apps), and set up an app that is a "script". Paste any URL in the redirect URL field, for example: `https://jasoncameron.dev`. +### Educational Content +```toml +[reddit.thread] +subreddit = "todayilearned" -7. The bot will prompt you to fill in your details to connect to the Reddit API and configure the bot to your liking. +[settings.tts] +voice_choice = "awspolly" +aws_polly_voice = "Matthew" # Professional male voice +``` -8. Enjoy 😎 +### Storytelling Videos +```toml +[reddit.thread] +subreddit = "nosleep" -9. If you need to reconfigure the bot, simply open the `config.toml` file and delete the lines that need to be changed. On the next run of the bot, it will help you reconfigure those options. +[settings] +storymode = true +background_choice = "dark-ambiance" +``` -(Note: If you encounter any errors installing or running the bot, try using `python3` or `pip3` instead of `python` or `pip`.) +## πŸ“ˆ Analytics & Monitoring -For a more detailed guide about the bot, please refer to the [documentation](https://reddit-video-maker-bot.netlify.app/). +### Video Output Tracking +- **Generated video count** - Track your content creation +- **Processing time** - Monitor performance metrics +- **File sizes** - Optimize for different platforms +- **Error logging** - Debug issues efficiently -## Video +### Quality Metrics +- **Audio quality** - Ensure clear speech +- **Video resolution** - Optimize for target platforms +- **Render speed** - Track processing efficiency -https://user-images.githubusercontent.com/66544866/173453972-6526e4e6-c6ef-41c5-ab40-5d275e724e7c.mp4 +## πŸ”’ Privacy & Legal -## Contributing & Ways to improve πŸ“ˆ +### Data Handling +- **Local processing** - All video generation happens on your machine +- **No data collection** - The bot doesn't store or transmit your content +- **Reddit API compliance** - Respects Reddit's terms of service +- **Rate limiting** - Prevents API abuse -In its current state, this bot does exactly what it needs to do. However, improvements can always be made! +### Content Guidelines +- **Manual upload** - You control what gets published +- **Content filtering** - Built-in NSFW detection +- **Fair use** - Respect intellectual property rights +- **Platform guidelines** - Follow TikTok, YouTube, Instagram rules + +## 🌍 Community + +### Discord Server +Join our community for: +- **Technical support** - Get help with setup and configuration +- **Feature requests** - Suggest new improvements +- **Showcase** - Share your generated content +- **Collaboration** - Connect with other creators -I have tried to simplify the code so anyone can read it and start contributing at any skill level. Don't be shy :) contribute! +### Contributing Guidelines +- **Code style** - Follow PEP 8 for Python code +- **Testing** - Include tests for new features +- **Documentation** - Update docs for any changes +- **Issue tracking** - Use GitHub Issues for bugs and features + +## πŸ“„ License + +This project is licensed under the GNU General Public License License - see the [LICENSE](LICENSE) file for details. -- [ ] Creating better documentation and adding a command line interface. -- [x] Allowing the user to choose background music for their videos. -- [x] Allowing users to choose a reddit thread instead of being randomized. -- [x] Allowing users to choose a background that is picked instead of the Minecraft one. -- [x] Allowing users to choose between any subreddit. -- [x] Allowing users to change voice. -- [x] Checks if a video has already been created -- [x] Light and Dark modes -- [x] NSFW post filter +### Third-Party Licenses +- **Roboto Fonts** - [Apache License V2](https://www.apache.org/licenses/LICENSE-2.0) +- **Dependencies** - See individual package licenses in `requirements.txt` -Please read our [contributing guidelines](CONTRIBUTING.md) for more detailed information. +## πŸ™ Acknowledgments + +### Developers and Maintainers -### For any questions or support join the [Discord](https://discord.gg/qfQSx45xCV) server +- **Elebumm (Lewis)** - Founder and Lead Developer ([Github](https://github.com/elebumm)) +- **Jason Cameron** - Maintainer and Core Contributor ([Github](https://github.com/JasonLovesDoggo)) +- **OpenSourceSimon** - Feature Development ([Github](https://github.com/OpenSourceSimon)) +- **CallumIO** - UI/UX Improvements ([Github](https://github.com/CallumIO)) +- **Verq** - Performance Optimization ([Github](https://github.com/CordlessCoder)) +- **LukaHietala** - Feature implementations ([Github](https://github.com/LukaHietala)) +- **Freebiell** - Bug fixes and improvements ([Github](https://github.com/FreebieII)) +- **Aman Raza** - Code optimization ([Github](https://github.com/electro199)) +- **Cyteon** - Documentation improvements ([Github](https://github.com/cyteon)) -## Developers and maintainers. +### Motivation πŸ€” -Elebumm (Lewis#6305) - https://github.com/elebumm (Founder) +These videos on TikTok, YouTube and Instagram get **MILLIONS** of views across all platforms and require very little effort. The only original thing being done is the editing and gathering of all materials... -Jason Cameron - https://github.com/JasonLovesDoggo (Maintainer) +**...but what if we can automate that process?** πŸ€” -Simon (OpenSourceSimon) - https://github.com/OpenSourceSimon +### Disclaimers 🚨 -CallumIO (c.#6837) - https://github.com/CallumIO +- **Manual Upload Required** - This bot generates video files that you must upload manually to avoid community guideline issues +- **API Compliance** - Respects Reddit's API terms and rate limits +- **Educational Purpose** - Designed for learning and legitimate content creation -Verq (Verq#2338) - https://github.com/CordlessCoder +--- -LukaHietala (Pix.#0001) - https://github.com/LukaHietala +
-Freebiell (Freebie#3263) - https://github.com/FreebieII +**Made with ❀️** -Aman Raza (electro199#8130) - https://github.com/electro199 +[⭐ Star on GitHub](https://github.com/elebumm/RedditVideoMakerBot) β€’ [πŸ› Report Issues](https://github.com/elebumm/RedditVideoMakerBot/issues) β€’ [πŸ’¬ Join Discord](https://discord.gg/qfQSx45xCV) -Cyteon (cyteon) - https://github.com/cyteon +
-## LICENSE -[Roboto Fonts](https://fonts.google.com/specimen/Roboto/about) are licensed under [Apache License V2](https://www.apache.org/licenses/LICENSE-2.0) diff --git a/assets/redditVideoMaker.png b/assets/redditVideoMaker.png new file mode 100644 index 0000000..f1fe93e Binary files /dev/null and b/assets/redditVideoMaker.png differ