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.
- 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
- 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
- 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
- Clone this repository
- Install dependencies (see below)
- Run the pipeline to generate your first video
- Python 3.8+
- FFmpeg
- yt-dlp (for YouTube video downloading)
- AWS credentials (for TTS)
- Reddit API credentials
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")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"
)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']}")- 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
This project is for educational and entertainment purposes. Please respect Reddit's API terms and the rights of content creators when using this tool.