Skip to content

alfiehanssen/GIFSet

Repository files navigation

GIFSet

GIFSet is a simple toolset for creating GIFs and GIF-like videos.

There are two short demo videos here on YouTube and here on Vimeo (the Vimeo demo has some cool UI in the mix, if you watch one demo, watch the Vimeo demo).

Setup

###Cocoapod

Add this to your podfile:

target '{YourTarget}' do
    pod 'GIFSet', '{LatestVersionNumber}'
end

###Submodule

git submodule add git@github.com:alfiehanssen/GIFSet.git and add the source files to your project/target.

###Framework

git clone git@github.com:alfiehanssen/GIFSet.git, open the workspace, build the GIFSet scheme, and add the resulting GIFSet.framework to your project.

Usage

Check out the NSOperation subclasses. See them used in the example app in this repo. Briefly, here's what they can do:

  1. GIFOperation: creates a GIF of a specified duration from an array of images

  2. CompositionOperation: Creates an AVMutableComposition from an array of AVAssets

  3. ImageExtractionOperation: Extracts a set of images at specific CMTimes from an AVComposition

  4. ImageConcatenationOperation: Concatenates an array of images into a GIF-like video of a specified duration

  5. VideoGIFFromVideoOperation: Uses the above operations to create a GIF-like video given an AVAsset (to extract the images from), a number of images to extract, and a duration for the final output

  6. GIFFromVideoOperation: Uses the above operations to create a GIF given an AVAsset (to extract the images from), a number of images to extract, and a duration for the final output

TODO

  • Determine if we can create a GIF-like video by reading and writing the asset using AVAssetReader/Writer. Instead of by extracting images which is time consuming.
  • Test videos of various orientations, resolutions
  • Unit tests

Want to Contribute?

If you'd like to contribute, please follow the guidelines found in CONTRIBUTING.

Found an Issue?

Please file any and all issues found in this library to the git issue tracker.

Questions?

Tweet at me here: @alfiehanssen.

License

GIFSet is available under the MIT license. See the LICENSE file for more info.

Credits

The video used in the example app was shot by @ghking

The name GIFSet sorta sounds like DIPSET

alt tag