gifbook-GifBook: 从视频和字幕文件生成 gif 动画!

gifbook-GifBook: 从视频和字幕文件生成 gif 动画!

Python 多媒体处理

访问GitHub主页

共29Star

详细介绍

Gif Book

Create sequenced Gifs from video clips and subtitles.

Prerequisites

Make sure that you have ImageMagick and GhostScript installed:

$ brew install ImageMagick
$ brew install gs

Installation

$ pip install gifbook

Using gifbook as a command line tool

$ gifbook Night.Of.The.Living.Dead.1968.mkv Night.Of.The.Living.Dead.1968.srt --compression 50 --resize 30

More options are available, you can check them out by typing:

$ gifbook --help

Using gifbook as a module

from gb import GifBook

gb = GifBook('Night.Of.The.Living.Dead.1968.720p.mkv', '~/Desktop/gifs/')

gb.set_subtitles(
    "Night.Of.The.Living.Dead.1968.720p.srt",
)

gb.generate(resize=0.5, compression=30)

Demo Gifs

License

License under GNU GPL

GNU GPL LOGO