Python tool for making meme top videos. It gets you through a bunch of steps and at the end you'll get a final top video with your own intro and outro and images queried from Yandex Images.
It makes a video from images and background music using ffmpeg. There are two types of images: number images and competitor images (like in most of the meme tops). Number images are generated using imagemagick and competitor images are downloaded from Yandex Images. The whole top is technically a slideshow with cringy looking transitions.
- python 3.8+
- ffmpeg 4.3+
- imagemagick
- Comic Sans MS font
First, make a copy of this template file:
$ cp .env-template .envOpen the .env file and fill in the fields.
Then install the required packages:
python-dotenvrequests
On Ubuntu
$ sudo apt install ffmpeg
$ sudo apt install imagemagickNote: make sure your ffmpeg version is above 4.3 by typing ffmpeg -version. If it's not install a newer version using ppa or snap
On Ubuntu
-
Download the
Comic Sans MSfont .ttf file from anywhere -
Copy the .ttf file to
~/.fonts/directory. If the directory doesn't exist create it withmkdir ~/.fonts
Instructions for other distros may be different
Run the main script:
$ python3 main.pyYou will be presented with several options:
-
Render images with numbers: "Number 1", "Number 2" etc.
-
Query competitor images from Yandex Images. You can either do this automatically by choosing the corresponding option in terminal or manually using js script in the
./scripts/directory -
Download images queried on the previous step
-
Render top video (if the length of the top is greater than a certain amount the video will be split into multiple parts)
-
Combine music into one track. But before that step you'll need to copy all your music into
./out/music/directory -
Make intro and outro. This step is manual. You can either make intro and outro videos using other software or use
image_to_video.pyscript to make videos from images -
Render final video (intro + top video(s) + outro)
MIT
