Skip to content

A modern web application that transforms regular text into Gen Alpha-style content with synchronized video, audio, and subtitles.

License

Notifications You must be signed in to change notification settings

SzponerZoli/brainrot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitAds Sponsored

Sponsored by GitAds

Gen Alpha Content Generator

A modern web application that transforms regular text into Gen Alpha-style content with synchronized video, audio, and subtitles.

Features

  • 🎯 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

Prerequisites

# 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

Installation

  1. Clone the repository:
git clone https://github.com/SzponerZoli/brainrot.git
cd brainrot
  1. Create and activate virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Set up environment variables:
cp .env.example .env
# Edit .env with your API keys
  1. Add background video:
# Place your background video in:
static/background_video.mp4

Usage

  1. Start the server:
python main.py
  1. Open in browser:
http://localhost:5000
  1. Generate content:
    • Enter your text
    • Click "Generate Text"
    • Edit the generated text if needed
    • Select video resolution and voice
    • Click "Create Video"

Technical Details

Video Processing Pipeline

  1. Text Generation

    • Input text processed by Gemini AI
    • Optimized for Gen Alpha style and tone
  2. Audio Generation

    • Text converted to speech using OpenAI's TTS
    • Multiple voice options with different characteristics
  3. Subtitle Creation

    • Audio transcribed using Whisper API
    • Chunked into readable segments
    • Synchronized with audio timing
  4. Video Assembly

    • Background video cropping and scaling
    • Audio overlay
    • Subtitle burning with customizable styling
    • Final encoding with quality optimization

File Structure

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

Contributing

  1. Fork the repository
  2. Commit your changes:
git commit -am 'Add some feature'
  1. Push to the branch:
git push
  1. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • OpenAI for TTS and Whisper APIs
  • Google for Gemini AI
  • FFmpeg for video processing
  • Flask for web framework

About

A modern web application that transforms regular text into Gen Alpha-style content with synchronized video, audio, and subtitles.

Resources

License

Stars

Watchers

Forks

Packages

No packages published