Skip to content

nvemuri4649/BrainrotGenerator

Repository files navigation

BrainrotGenerator

BrainrotGenerator is a pipeline designed to automatically generate "brain rot" style videos from Reddit stories, ready to post on social media platforms like TikTok, Instagram, and YouTube Shorts.

Features

  • Scrapes or imports Reddit stories from selected subreddits or user submissions
  • Converts stories into engaging video formats with visuals, subtitles, and audio
  • Dynamic video duration - automatically adjusts video length based on when the last comment finishes
  • YouTube gameplay backgrounds - automatically downloads and processes YouTube videos as background gameplay
  • Adds effects, memes, and other elements typical of "brain rot" content
  • Outputs videos optimized for social media sharing

Key Improvements

  • No more static time limits: Videos now extend to exactly when the last comment cuts off
  • Efficient processing: Optimized to parse speech marks only once
  • Clean architecture: Consolidated video generation logic into reusable functions

Use Cases

  • Content creators looking to automate the production of viral meme videos
  • Social media managers seeking to boost engagement with trending formats
  • Anyone interested in transforming Reddit stories into entertaining short-form videos

Getting Started

  1. Clone this repository
  2. Install dependencies (see below)
  3. Run the pipeline to generate your first video

Requirements

  • Python 3.8+
  • FFmpeg
  • yt-dlp (for YouTube video downloading)
  • AWS credentials (for TTS)
  • Reddit API credentials

Quick Start

Basic Usage

from reddit_video_bot import generate_complete_video

# Generate a video with automatic duration
result = generate_complete_video(
    subreddit_name="AITAH",
    voice_id="Joanna",
    output_filename="my_video.mp4"
)

print(f"Video duration: {result['duration']:.2f} seconds")

Advanced Usage

from reddit_video_bot import generate_reddit_video, create_video_with_subtitles

# Generate audio and subtitles first
result = generate_reddit_video("TIFU", "Matthew")

# Create video with custom settings
create_video_with_subtitles(
    audio_file=result["audio_file"],
    ass_content=result["ass_content"],
    duration=result["duration"],
    output_filename="custom_video.mp4"
)

Video with YouTube Gameplay Background

from reddit_video_bot import generate_complete_video_with_background

# Generate video with Minecraft gameplay background
result = generate_complete_video_with_background(
    subreddit_name="AITAH",
    voice_id="Joanna",
    output_filename="minecraft_aitah_video.mp4",
    youtube_url="https://www.youtube.com/watch?v=example",
    start_time=30,  # Start at 30 seconds into the video
    download_duration=60  # Download 60 seconds of gameplay
)

print(f"Video generated: {result['output_file']}")
print(f"Background used: {result['background_used']}")

Roadmap

  • Reddit story scraper
  • Text-to-speech integration
  • Dynamic video duration
  • YouTube gameplay background integration
  • Video template system
  • Automated meme/effect overlay
  • Social media export presets

Disclaimer

This project is for educational and entertainment purposes. Please respect Reddit's API terms and the rights of content creators when using this tool.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages