![gifsicle speed up gif gifsicle speed up gif](https://thumbs.gfycat.com/BetterFormalGoat-size_restricted.gif)
The backticks ( `) around the seq command cause its output to be included as parameters in the gifsicle command line. The -f "#%g" makes it print a # before each number, which makes gifsicle understand it as a frame selection instead of a file name. The seq command just outputs a sequence of numbers from 0 to 99, counting up in steps of 2. With JohnB's sample animation, it shrinks the output size down by 27%. (If your input animation is already unoptimized, gifsicle may print a warning about it, but this is also completely harmless.)Ĭonversely, the -O2 switch re-optimizes the output animation to minimize the file size. You really want to do this before doing pretty much anything with animations, otherwise you're likely to get messy results. The -U switch will merge frames in the input animation with the preceding ones, so that each frames stands alone and doesn't depend in any others. (It's OK to use a larger number, but gifsicle will complain about it.)
![gifsicle speed up gif gifsicle speed up gif](https://media2.giphy.com/media/dZdnjosnkcshinJBor/200.gif)
Replace input.gif and output.gif with the input and output file names, and 99 with the number of frames in your animation. This command should work in most Unix shells I've tested it in bash. Here's a simpler solution using gifsicle than JohnB's script: gifsicle -U input.gif `seq -f "#%g" 0 2 99` -O2 -o output.gif