gifencoder: optimize filesizes by using a static color palette, enabling diff mode and bayer dither

As I'm mostly using gifs for attachement to jira tasks and their filesize being abysmally (read unusable) big with spectacle I was looking into how to improve this.

Recording the screen (1080p), with content not changing that much, a 10 second recording shrinks from about 33 MB to about 500 KB with good enough quality imho.

Alternatively, if you don't wanna change the default for gifencoder, I also looked into implementing presets for size/quality/speed/... but that would be a much bigger changeset, with changes to spectacle for supporting different presets as well as kpipewire which then should support different presets for all encoders for consistency.

This MR would be a quick win imho without big changes.

What would additionally help all formats file sizes would be the option to limit fps recorded. I also played around with this so if there is interest I could also prepare a MR for this - this would basically be an option in spectacle as kpipewire is already up to the task.

Happy for any input 😄

Merge request reports

Loading