• Stars
    star
    123
  • Rank 290,145 (Top 6 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created about 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An Android tool to compresses your GIFs into lightweight MP4 video using fast, hardware-accelerated encoders. Supports cropping, rotation, GIF concatenation and much more.

Build Status Release Issues

β €

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!

GIFCompressor

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'
  • Fast compression to lightweight MP4 (AVC)
  • Hardware accelerated
  • Multithreaded
  • Convenient, fluent API
  • Concatenate multiple GIF files [docs]
  • Choose output size, with automatic cropping [docs]
  • Choose output rotation [docs]
  • Choose output speed [docs]
  • Choose output frame rate [docs]
  • Override frames timestamp, e.g. to slow down the middle part of the video [docs]
  • Error handling [docs]
  • Configurable strategies [docs]

β €

β €

Support

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.

Setup

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.

More Repositories

1

CameraView

πŸ“Έ A well documented, high-level Android interface that makes capturing pictures and videos easy, addressing all of the common issues and needs. Real-time filters, gestures, watermarks, frame processing, RAW, output of any size.
Java
4,943
star
2

ZoomLayout

2D zoom and pan behavior for View hierarchies, images, video streams, and much more, written in Kotlin for Android.
Kotlin
1,051
star
3

Autocomplete

Simple yet powerful autocomplete behavior for EditTexts, to avoid working with MultiAutoCompleteTextView APIs.
Java
357
star
4

BottomSheetCoordinatorLayout

A handy CoordinatorLayout that works well when used in a bottom sheet, even with AppBarLayouts inside.
Java
268
star
5

ViewPrinter

Live preview, edit and print functionality for View hierarchies. Supports PDF, PNG, JPEG.
Java
190
star
6

Egloo

A lightweight Kotlin multiplatform framework for OpenGL ES and EGL management based on object-oriented components, inspired by Google's Grafika.
Kotlin
146
star
7

Elements

βš’ Modular components for RecyclerView development enforcing clean, reusable and testable code, with built-in support for paging and complex hierarchies of data.
Kotlin
82
star
8

whatsapp-database-merger

Small command-line utility to safely merge multiple WhatsApp backups (msgstore.db) into one.
Kotlin
65
star
9

NestedScrollCoordinatorLayout

A CoordinatorLayout that implements nested scrolling and propagates scroll events to parent views.
Java
63
star
10

Firestore

The lightweight, efficient Android wrapper for Google's Firestore model data.
Kotlin
33
star
11

ConstrainedScrollBehavior

An AppBarLayout.ScrollingViewBehavior that adapts scrolling view height based on its content.
Java
18
star
12

Elements-Deprecated

A library of reusable components for RecyclerView, simplifying the development of complex adapters.
Java
11
star
13

Playground

Kotlin
1
star