Skip to main content

A python package and CLI to turn videos into GIFs and vice-versa.

Project description

FIG (Format Interchange Graphics)

A FOSS python package and CLI to turn videos into GIFs and vice-versa.

Usage

You can use FIG's built-in CLI to convert videos to GIFs through the Command-Line.

Usage: fig FILENAME [OPTIONS]

Options:
  -q, --quality INTEGER RANGE     Quality of the gif (applies jpeg lossy
                                  compression to the gif, 100 - no
                                  compression, 0 - shitloads of compression)
                                  [default: 100; 0<=x<=100]
  -o, --output TEXT               Output filename
  -w, --width INTEGER RANGE       Width of the gif
                                  [1<=x]
  -so, --shit-optimize            Optimize the gif but change it to 256 colors
                                  (requires gifsicle)
  -kw, --keep-width               Keep the width of the gif
  -t, --caption TEXT              Text to add to the gif
  -ts, --text-style [top|bottom|caption]
                                  Style of text to add to the gif
  -g2v, --gif2video               Convert a gif to video (other options are
                                  ignored)
  --help                          Display all options for the CLI

  -v, --version                   Display the version of FIG

Or you could use FIG as a Python package

import figconverter

figconverter.video2gif("myvideo.mp4")  # Convert video to GIF
figconverter.gif2video("myvideo.gif")  # Convert GIF to video

Installation

pip install fig-converter

in order to use the -so option (or shit_optimize if you're using the package) you'll need to install gifsicle:

While running the installation, on MacOS the setup will automatically install gifsicle using Brew.

On Linux you will need to install gifsicle using apt-get as follows:

sudo apt-get install gifsicle

On Windows you will need to download and install the correct port of the library for your OS.

About Us

We are a duo of independent university students and professional programmers who love contributing to the world of FOSS. Our goal is to improve our skills as developers and to make the world a better place by replacing shitty online GIF conversion tools with FOSS.

Credits

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fig-converter-1.0b0.tar.gz (7.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page