Peek: why are files so big?

Created on 14 Mar 2016  路  5Comments  路  Source: phw/peek

So I'm recording some tiny GIFs (around 400px wide) at 15fps, and still get big file sizes.
Twitter sets a limit at 5mb per gif, so I can _never_ use a gif captured with Peek. Yet, I see constantly long gifs with good quality... whats the catch?

thanks for the awesome tool :)

question

Most helpful comment

Sorry for the way too late reply :(

I can't really tell you why your file is so big without more information. What exactly is "big" and "long"?

In general ImageMagick is used to convert the animation to GIF and it does a very decent job in minifying the frames: Each frame will only contain the data that differs from the one before.

In general for animated GIFs there are a few rules to follow for good results:

  • Use a low framerate. 15fps seems to work quite well for me
  • Avoid too much change. If there is heavy animation the frames will differ a lot
  • Avoid too many colors, since GIF is limited to a 256 color pallette. This one is not so much about file size but more about visual quality.

Otherwise I'd need some real world comparison to tell you more, e.g. an animation you think is large and not so big and a comparable animation you recorded with peek which you consider too big.

All 5 comments

Sorry for the way too late reply :(

I can't really tell you why your file is so big without more information. What exactly is "big" and "long"?

In general ImageMagick is used to convert the animation to GIF and it does a very decent job in minifying the frames: Each frame will only contain the data that differs from the one before.

In general for animated GIFs there are a few rules to follow for good results:

  • Use a low framerate. 15fps seems to work quite well for me
  • Avoid too much change. If there is heavy animation the frames will differ a lot
  • Avoid too many colors, since GIF is limited to a 256 color pallette. This one is not so much about file size but more about visual quality.

Otherwise I'd need some real world comparison to tell you more, e.g. an animation you think is large and not so big and a comparable animation you recorded with peek which you consider too big.

I used to use ScreenToGif on Windows to record gifs: please know that I'm delighted there's a Linux alternative!

I used ScreenToGif to record the following gif (used in one of my projects' README):
screenshot

In order to compare file sizes, I recorded quite the same animation with Peek:
peek 2016-08-31 21-19

Even if these are not quite comparable, they are still based on the same filesize scale (framerate, colors amount, duration, "change rate"/animation speed).

Here's the conclusion: ScreenToGif produced a 58,2 kB file while Peek saved a 16,6 kB file. Peek wins!
Should this issue be closed? We could mention it somewhere in the documentation though, or lead some more tests

Thanks @chteuchteu for doing this investigation. It is also my suspicion that Peek is already doing a nice job (thanks to imagemagick in this case) of reducing the file size. In the end Gif is just not well suited for doing large animations with a lot of changes, as the optimization completely depends on just having the differences in each frame. I lean toward closing this, but maybe we should have some kind of FAQ first :)

+1 for the FAQ!

I have added a FAQ to the README

Was this page helpful?
0 / 5 - 0 ratings

Related issues

leoherzog picture leoherzog  路  7Comments

austincunningham picture austincunningham  路  3Comments

grimmer-std picture grimmer-std  路  6Comments

StephenFluin picture StephenFluin  路  4Comments

CasperHK picture CasperHK  路  5Comments