An Android tool to compresses your GIFs into lightweight MP4 video using fast, hardware-accelerated encoders. Supports cropping, rotation, GIF concatenation and much more.
⠀
Looking for a complete and powerful video transcoder? Take a look at our Transcoder.
Need support, consulting, or have any other business-related question? Feel free to get in touch.
Like the project, make profit from it, or simply want to thank back? Please consider sponsoring me!
An Android tool to compress GIF files into the MP4 format, using hardware-accelerated Android codecs available on the device. Works on API 18+.
implementation 'com.otaliastudios.gif:compressor:1.0.0'
⠀
⠀
If you like the project, make profit from it, or simply want to thank back, please consider sponsoring me through the GitHub Sponsors program! You can have your company logo here, get private support hours or simply help me push this forward.
Feel free to contact me for support, consulting or any other business-related question.
Please read the official website for setup instructions and documentation. You might also be interested in our changelog. Using GIFCompressor in the most basic form is pretty simple:
GIFCompressor.into(filePath)
.addDataSource(context, uri) // or...
.addDataSource(context, filePath) // or...
.addDataSource(context, fileDescriptor) // or...
.addDataSource(dataSource)
.setListener(new GIFListener() {
public void onGIFCompressionProgress(double progress) {}
public void onGIFCompressionCompleted() {}
public void onGIFCompressionCanceled() {}
public void onGIFCompressionFailed(@NonNull Throwable exception) {}
}).compress()
Take a look at the demo app for a complete example.