This package has been deprecated

Author message:



1.0.1 • Public • Published


Gifle is a command line node script that provides a very simple means of configuring the output of video files to optimised animated GIFs, using the source filename to set output options.

Install gifle

$ npm install gifle -g


  • Node + npm
  • FFmpeg
  • Imagemagick
  • Gifsicle: only requried for 'crush' command or restricting the color palette


Gifle uses the source video filename to configure its output to an animated gif.

Rename your source video to include desired configuration settings:
Eg. Change to

Command line: Run gifle in command line with the source file as the only argument:

cd path/to/
$ gifle


$ gifle ~/abs/path/to/

An animated gif called my-movie.gif will be saved to same directory as the source with the following settings:

  • Loop 3 times
  • Double source speed
  • 18 frames per second
  • Color palette restricted to 55 colors
  • Resized proportionally to a 300px width


  • One source file
    Having the configuration in the filename means that if you ever want to re-output or optimise an existing asset you don't need to remember or guess the previous settings.
  • Readability
    The filename format is readable enough to understand the output settings at a glance.
  • Ease of use
    Just rename source file and re-output gif to get the best optimisation result for any given source file.


Check out the example filenames in /example/ dir to see gifle output options.

Filename configuration###

Separate each option element in the filename with any of these characters:
(space), - or _.

Settings (all optional):

  • dimensions: %width%x%height%
    Sets the output dimensions of the gif, in integer pixel units. Usually set width or height, though always include the x char. Eg. will resize proportionally to 350px height. will resize proportionally to 222px width. Setting both dimensions is not recommended as it will stretch the output unless they are the same aspect ratio as the source. Will use source dimensions if not set.
  • frame rate %rate%fps
    Set the resultant frame rate in frames per second. If not set will default to 22.
  • file size optimisation crush
    Include the term 'crush' eg. to attempt to further optimise the output gif to reduce the file size. Uses gifsicle. This is done automatically if you limit the color palette.
  • color palette %count%cols
    Limit the color palette eg. to reduce the file size. Provide an integer between 2 and 256. Uses gifsicle which will choose an adaptive group of colors based on the source video.
  • playback speed %modifier%speed
    Adjust the playback speed with a modifier float value. Eg. will be 1.5 times as fast as the original. If not set will default to 1.0, same as source.
  • looping %count%loops
    Sets how many times the gif will loop. Set to 0 to loop forever (default).

## Release History

  • v1.0.1 - Updated dependencies

Package Sidebar


npm i gifle

Weekly Downloads






Last publish


  • loksland