Skip to content

LeonidPilyugin/FFmemepeg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FFmemepeg

Shitpost FFmpeg-powered command line tool

Requirements

FFmemepeg requires FFmpeg, bc and Impact font.

Examples

Example assets can be found in example/ directory.

./ffmemepeg -t "TOP TEXT" -b "BOTTOM TEXT" -i example/osaka.png

FFmemepeg can also manipulate GIFes and videos.

./ffmemepeg -t "TOP TEXT" -b "BOTTOM TEXT" -i example/konata.gif

Usage

Print help message using -h option.

$ ./ffmemepeg -h
ffmemepeg [OPTION]... -i INPUT

Options:
    -t, --top               Top text
    -b, --bot               Bottom text
    -o, --output            Output path
    -i, --input             Input path
    -M, --top-margin        Top margin
    -m, --bottom-margin     Bottom margin
    -f, --font              Font
    -S, --top-scale         Top text fontsize scale
    -s, --bottom-scale      Bottom text fontsize scale
    -h, --help              Display this help and exit
    -d, --debug             Show debug info

The text, putting on image is splitted on two blocks: top text and bottom text. To add line to top block, use -t option.

./ffmemepeg -i example/osaka.png -t "TOP TEXT" -f Impact

Several lines of text can be added.

./ffmemepeg -i example/osaka.png -t "TOP TOP TEXT" -t "BOTTOM TOP TEXT" -f Impact

For bottom text, use -b option.

./ffmemepeg -i example/osaka.png -t "TOP TEXT" -b "BOTTOM TEXT" -f Impact

Top and bottom blocks have their own font sizes and margins.

./ffmemepeg -i example/osaka.png -t "TOP TOP TEXT" -t "BOTTOM TOP TEXT" -b "TOP BOTTOM TEXT" -b "BOTTOM BOTTOM TEXT" -f Impact

Font size can be changed using -S option for top block and -s for bottom. The font of whole block will be changed. The argument of size option is a reliative increase ratio: passing -S 1.2 and -s 0.7 options means increasing top block font size by 20% and decreasing bottom block font size by 30%

./ffmemepeg -i example/osaka.png -t "TOP TOP TEXT" -t "BOTTOM TOP TEXT" -b "TOP BOTTOM TEXT" -b "BOTTOM BOTTOM TEXT" -S 1.2 -s 0.7 -f Impact

Blocks also have margins. They can be changed using -M and -m options. Their size is measured reliative to image height. The default margins are 0.05 for both top and bottom blocks.

./ffmemepeg -i example/osaka.png -t "TOP TOP TEXT" -t "BOTTOM TOP TEXT" -b "TOP BOTTOM TEXT" -b "BOTTOM BOTTOM TEXT" -M 0 -m 0.2 -f Impact

The output file can be provided with -o option. The default output filename is out with input file extention.

About

Shitpost FFmpeg-powered command line tool

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages