A GIF caption generator mimicing the iFunny caption style, popular on Discord, Reddit, and similar pits of the internet.
This project is a complete rewrite and extension of kubinka0505's iFunny-Captions project (archived).
- caption GIFs, videos and images
- options to configure fonts, emoji styles, colors, etc.
- support for Discord emotes (in
<:floraSmug:1112288234488201307>
format) - optimizations for smaller filesizes (also configurable)
- supports both local and online files
- extra support for popular GIF hosting sites (Tenor, Giphy, etc.)
- option for transparent GIF captions
For advanced users:
git clone https://github.com/Gilgames32/caption-redux.git
cd caption-redux
pip install -r requirements. txt
You must have FFmpeg. Gifsicle is highly recommended but optional. Pngcrush is negligible but also supported.
Important
These packages must be added to the PATH for them to work.
Dummy guide soon.
Run main.py
. Optionally you can use arguments, see -h
.
-i <image link>
path or direct URL to the image-t <caption text>
the caption text-a
: preserve GIF transparency (uses the legacy method, a bit slower)-g
: force GIF output (even if the input was a video or a static image)
Configuration guide (config.json
):
safe_mode
: if enabled, captioning of local files will be disabledloglevel
: for devstext
font
: path to the fontfont_size
: font sizewrap_width
: maximum amount of columns per lineline_spacing
: spacing between linespadding
: padding of the text inside the captionminimum_line_width
: minimum line width
color
background
: the color of the backgroundtext
: the color of the text
emoji_style
: the style of the emojis, supported styles aretwitter
,google
,facebook
andapple
optimization
pngcrush
enabled
: if enabled and Pngcrush is installed, the result will be compressed
gifsicle
enabled
: if enabled and Gifsicle is installed, the result will be compressedcompression
: compression scale (bigger means more compression artifacts)colors
: number of colors (2-256)fps
: maximum framerate (if the input is lower than this, the original framerate will be used)
video
enabled
: if enabled, the result will be compressedfps
: maximum framerate (if the input is lower than this, the original framerate will be used)bitrate
: the bitrate of the output videoheight
: the height of the output video (excluding the caption)
easier install
This project focuses on extended functionality, faster generation and cleaner code compared to it's alternatives (such as esmBot, the now archived repository or the official iFunny generator).
Contributions, pull requests, reviews, suggestions, issues and whatnot are welcome!