This project is a bot that automatically downloads popular meme videos and gifs from Reddit, merges them with sound effects, and uploads them as YouTube Shorts. π
- Fetches popular meme content in mp4 and gif format from Reddit.
- Merges videos/gifs with random sound effects.
- Automatically uploads to YouTube Shorts.
- Tracks uploaded memes to avoid duplicates.
- Waits and retries automatically if YouTube upload limit is reached.
- Easily add your own sound effects.
- Python 3.8+
ffmpeg
(for video/gif processing)- Required Python packages (listed in
requirements.txt
)
- Clone or download the project.
- Install dependencies:
pip install -r requirements.txt
- Get your Reddit API keys and add them to a
.env
file:REDDIT_CLIENT_ID=xxx REDDIT_CLIENT_SECRET=xxx REDDIT_USER_AGENT=xxx
- Get Google Cloud OAuth2 client credentials for the YouTube API and place them in the
secrets/
folder:client_secrets.json
andtoken.json
(created on first run) are required.
- Make sure
ffmpeg
is installed:For Linux:# For Windows, download from https://ffmpeg.org/download.html and add to PATH
sudo apt install ffmpeg
python main.py
- The script runs in an infinite loop, finding and uploading a new meme each cycle. π
- If the upload limit is reached, it waits and retries automatically. β±οΈ
- You can use
tmux
,screen
, ornohup
to run in the background:nohup python main.py > output.log 2>&1 &
memes/
: Downloaded meme filessounds/
: Sound effects (add your own if you like)secrets/
: API credentialsused_memes.txt
: Used meme IDs (prevents re-upload)src/
: All source code and helper modules
- Only downloads mp4 and gif files hosted on Reddit.
- Files are not deleted if upload limit is reached; they are deleted after a successful upload.
- You can add your own sound effects to the
sounds/
folder. π΅
MIT