TumblGIFifier

About

TumblGIFifier is a Java program that automatically creates GIFs from videos sized to Tumblr's liking. Tumblr has a maximum GIF size of 2.0 MB, and TumblGIFifier will automatically resize it as close as it can to that threshold. You can also have it create a GIF with no maximum size, or change the maximum size to something else on a per-GIF basis.

TumblGIFifier allows you to cut the framerate of the input video in half. This gives the GIF more of a GIF feel and allows you to fit a larger physical size inside the two megabytes maximum file size. You could also leave the framerate at full to capture the full smoothness of an action scene if necessary.

TumblGIFifier supports overlaying text on the GIF in a white-text-black-border meme style. It uses the font Open Sans Semibold as the font for this. You can change the size of the text overlay or leave it as the default.

TumblGIFifier can read practically any video file, because it uses FFmpeg as a backend.

You don't have to crop the video file time-wise beforehand, because TumblGIFifier comes with sliders that allow you to change the start and end times of the GIF.

The current release of TumblGIFifier is 0.7.2. All releases will be marked as "pre-releases" until version 1.0.0, when TumblGIFifier is production-ready. At this moment it is not. TumblGIFifier is still in its early stages of development, the UI is a bit clunky, and there WILL be undiscovered bugs.

Downloading and Running

TumblGIFifier is hosted at Github, at https://github.com/thebombzen/TumblGIFifier.

To download the most recent version of the program, go to the releases page. Download the most recent release, which should be at the top. There will be several downloads - download the JAR file, not the zips containing the source code.

TumblGIFifier comes as an executable JAR file. You need to have at least Java 1.7 to run it. If you don't have java installed, download it here and install it.

  • To execute the JAR file on Windows, doubleclicking it should work as long as you have Java installed. However, some archive programs might try to open it as an archive. If so, open it with the Java Platform (and you should probably set the Java Platform as the default for opening JAR files anyway).
  • To execute the JAR file on a Mac, you need to open it with JAR Launcher. If you try to open it using the default way you might accidentally unzip it and barf a bunch of files all over your desktop. Try not to do that.
  • To execute the JAR file on Linux, you really don't need me to finish this sentence.

Issues

TumblGIFifier has a freenode IRC channel at #tumblgififier. You can get help there. If you find a bug, you can open a ticket on its Github Bug Tracker. If you want to submit a patch, you can submit a Pull Request for me to review (as the maintainer).

Feel free to submit other pull requests or issues, not just ones pertaining to bugs or fixing bugs.

Tips and Tricks

  • If you want to cut the framerate in quarter instead of in half, you can create a GIF with no maximum GIF size but with half the framerate. Then, you can feed that GIF back into TumblGIFifier and cut the framerate in half again. TumblGIFifier supports practically any video input format, including GIF image.
  • The sliders have 1/4 second precision. If you have difficulty dragging a slider to get exactly what you need, you can nudge it to the left or the right by 1/4 second by using the left or right arrow keys, as long as the slider is selected.
  • GIFs with very little action, as in, GIFs with a perfectly still background (not a pan/zoom, must be perfectly still) are much better candidates as they will have drastically smaller file sizes, which allows the physical size to be much bigger while remaining under the maximum size. GIFs with lots of action are worse candidates and on average will be significantly smaller.
  • TumblGIFifier will try to warn you if it thinks the GIF will be less than 300 pixels wide before you convert. This is just a guess. It will tend to give false positives for relative still GIFs and false negatives for relatively action-filled GIFs. The only way to tell would be to actually create the GIF. You can also feel free to ignore this warning.
  • TumblGIFifier uses a binary search to get the GIF to be the right size. In order to save time on this search, it uses an initial guess. For GIFs that are fairly still, it will tend to underestimate how big it can be. If the GIF is still enough it's possible that the original video size will be enough. In this case, TumblGIFifier will keep guessing for longer than it should and eventually settle upon a GIF that's extremely close to the max size. If this happens, try creating the GIF without the maximum size in order to see if you'll actually get something under two megabytes. (This is essentially a bug that I have to fix. You will have to use this workaround until I fix it. Expect a fix sometime in the future.)

Compilation From Source

First, you need to clone the repository with

$ git clone https://github.com/thebombzen/TumblGIFifier
The first time you clone this repository, you also need to grab xz-java. To do this, navigate to the directory to which you cloed TumblGIFifier and run:
$ git submodule init && git submodule update
This will pull in the XZ Java submodule. Then, to compile, run:
$ ant
To clean the build, run:
$ ant clean
Note that you have to clean the build if you make a change and then want to recompile.

Dependencies and Legal

TumblGIFifier is copyright Leo Izen, (thebombzen) 2015-2017, and is licensed under the MIT License. This means in basic terms that you can do practically anything with it except change the license. Included within the program is the Java Port of the XZ Utils, which are licensed under the public domain.

TumblGIFifier is based of FFmpeg. If the program finds ffmpeg, ffprobe, and ffplay in your path, it will use those. If not, it will download a pre-built binary from here and use that as long there isn't any FFmpeg in the path. TumblGIFifier will also download the Open Sans Semibold font (from here) and use it for the purpose of overlaying text. Open Sans is copyright Google and Steve Matteson, and licensed under the Apache License 2.0.