Automate the creation of brainrot clips, simply by providing a video topic to talk about.
OBSOLETE
Check out the instructions for running locally here.
Go to Backend/backgrounds folder and replace the .mp4 files.
You can obtain your TikTok session ID by logging into TikTok in your browser and copying the value of the sessionid cookie.
Make sure you set your path to the ImageMagick binary correctly in the .env file, it should look something like this:
IMAGEMAGICK_BINARY="C:\\Program Files\\ImageMagick-7.1.0-Q16\\magick.exe"Don't forget to use double backslashes (\\) in the path, instead of one.
If you're having trouble installing playsound, you can try installing it using the following command:
pip install -U wheel
pip install -U playsoundNote you can generate subtitles locally instead of using ASSEMBLY API KEY (if you have generated sentences with TTS), check file video.py, function "generate_subtitles"
If you were not able to find your solution, please ask in the discord or create a new issue, so that the community can help you.
If you like and enjoy Openbrainrot😂, and would like to donate to help grow the yt channel you can buy me a coffee ☕
Do whatever you want 😂
See LICENSE file for more information.
Openbrainrot😂 is a fork of MoneyPrinter originally made by FujiwaraChoki
wget https://download.imagemagick.org/ImageMagick/download/ImageMagick.tar.gz
tar -xvzf ImageMagick.tar.gz
cd ImageMagick-7.0.11-14/
./configure
sudo make
sudo make install
IMAGEMAGICK_BINARY="/usr/local/bin/magick"
I tried installing it on raspberry pi zero W (32 bit) but didn't work. The installation is overall SLOW. OpenCV takes 10h to install and imagemagick takes a lot of time to compile. I suggest to use pi4 or pi5 (64 bit)
sudo apt-get install imagemagick
sudo apt install -y ffmpeg
- now edit .env file
IMAGEMAGICK_BINARY="/usr/bin/convert"
Good luck for raspberry pi install.
Openbrainrot now includes functionality to automatically upload generated videos to YouTube.
To use this feature, you need to:
- Create a project inside your Google Cloud Platform -> GCP.
- Obtain
client_secret.jsonfrom the project and add it to the Backend/ directory. - Enable the YouTube v3 API in your project -> GCP-API-Library
- Create an
OAuth consent screenand add yourself (the account of your YouTube channel) to the testers. - Enable the following scopes in the
OAuth consent screenfor your project:
'https://www.googleapis.com/auth/youtube'
'https://www.googleapis.com/auth/youtube.upload'
'https://www.googleapis.com/auth/youtubepartner'
- Add to authorized urls in Youtube data API V3
http://localhost:8080/
http://localhost:8080/oauth2callback
After this, you can generate the videos and you will be prompted to authenticate yourself.
The authentication process creates and stores a main.py-oauth2.json file inside the Backend/ directory. Keep this file to maintain authentication, or delete it to re-authenticate (for example, with a different account).
Videos are uploaded as private by default. For a completely automated workflow, change the privacyStatus in main.py to your desired setting ("public", "private", or "unlisted").
For videos that have been locked as private due to upload via an unverified API service, you will not be able to appeal. You’ll need to re-upload the video via a verified API service or via the YouTube app/site. The unverified API service can also apply for an API audit. So make sure to verify your API, see OAuth App Verification Help Center for more information.
I added a script that allows you to create shorts using memes scraped from reddit.
In order to run this you will need a reddit account. After you get the API key associated to your account, the first time that you run the script, you'll be asked to insert your client_id and client_secret (the other fields you can enter 'agent' as agent and leave blan user and password, they are not important). After you insert your api key details the script will create a token.pickle (it's important that you run the script inside /Backend folder so that the token pickle will be created inside it).
python reddit_meme_uploader.py
The script will download memes from reddit and combine them with a random video selected from folder reddit_scraper/meme_bg. By default the variable UPLOAD_TO_YOUTUBE is set to False. Configure Youtube Automation (follow my tutorial on yt) and then set it to True to automatically upload on youtube.
🎥 Watch the video tutorial series on my YouTube channel.
Check out the detailed instructions to get the REDDIT API KEY here.
- create service file
sudo nano /etc/systemd/system/brainrot.service
Now paste content of file brainrot.service
- Now enable the service:
sudo systemctl enable brainrot.service
- reload deamon
sudo systemctl daemon-reload
- start/restart/stop/status service
sudo systemctl [start/restart/stop/status] brainrot.service
- check output
journalctl -f -u ai.service
start fake output display
export DISPLAY=:1
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
Xvfb :1 -screen 0 1024x768x16 &
connect with putty + xming. see https://www.youtube.com/watch?v=-oanqpf0xak
Open google-chrome script using the following command:
nano /opt/google/chrome/google-chrome
exec -a "$0" "$HERE/chrome" "$@" --no-sandbox --window-size=500,500
wget https://mirrors.kernel.org/ubuntu/pool/main/libf/libffi/libffi6_3.2.1-8_amd64.deb
sudo apt install ./libffi6_3.2.1-8_amd64.deb
- install chrome
sudo apt-get install libxss1 libappindicator1 libindicator7
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome*.deb
- install Xvfb
sudo apt-get install -y xvfb
sudo apt-get -y install xorg xvfb gtk2-engines-pixbuf
sudo apt-get -y install dbus-x11 xfonts-base xfonts-100dpi xfonts-75dpi xfonts-cyrillic xfonts-scalable