A modern web application that transforms regular text into Gen Alpha-style content with synchronized video, audio, and subtitles.
-
🎯 AI-Powered Text Generation
- Converts standard text into Gen Alpha-style content
- Uses Google's Gemini AI for natural language processing
- Maintains original language and context while adding modern flair
-
🎨 Dynamic Video Creation
- Creates vertical format videos (9:16 aspect ratio)
- Supports multiple resolutions:
- 1080p (1080x1920)
- 900p (900x1600)
- 720p (720x1280)
- Professional video encoding with H264
-
🗣️ Advanced Text-to-Speech
- OpenAI's TTS technology
- Multiple voice options:
- Alloy (Balanced)
- Echo (Male)
- Fable (British)
- Onyx (Deep Male)
- Nova (Female)
- Shimmer (Clear Female)
-
📝 Automatic Subtitle Generation
- Uses OpenAI Whisper for precise audio transcription
- Synchronized SRT subtitle generation
- Smart text chunking for optimal readability
-
🎨 Modern UI/UX
- Responsive design
- Real-time progress tracking and live log viewing (WIP)
- Background video support
# Required Python version
Python 3.8+
# Required system packages
ffmpeg
# Required API keys
OPENAI_API_KEY=your_openai_api_key
GEMINI_API_KEY=your_gemini_api_key
- Clone the repository:
git clone https://github.com/SzponerZoli/brainrot.git
cd brainrot
- Create and activate virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Set up environment variables:
cp .env.example .env
# Edit .env with your API keys
- Add background video:
# Place your background video in:
static/background_video.mp4
- Start the server:
python main.py
- Open in browser:
http://localhost:5000
- Generate content:
- Enter your text
- Click "Generate Text"
- Edit the generated text if needed
- Select video resolution and voice
- Click "Create Video"
-
Text Generation
- Input text processed by Gemini AI
- Optimized for Gen Alpha style and tone
-
Audio Generation
- Text converted to speech using OpenAI's TTS
- Multiple voice options with different characteristics
-
Subtitle Creation
- Audio transcribed using Whisper API
- Chunked into readable segments
- Synchronized with audio timing
-
Video Assembly
- Background video cropping and scaling
- Audio overlay
- Subtitle burning with customizable styling
- Final encoding with quality optimization
brainrot/
├── main.py # Main application file
├── templates/ # HTML templates
│ └── index.html # Main UI template
├── static/ # Static assets
│ ├── styles/ # CSS files
│ └── background_video.mp4
└── temp_files/ # Temporary processing directory
- Fork the repository
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI for TTS and Whisper APIs
- Google for Gemini AI
- FFmpeg for video processing
- Flask for web framework