Anisse<p>Here is the magic incantation I've found creates the best animated gifs for use as emojis in Slack. Powered by <span class="h-card" translate="no"><a href="https://mastodon.social/@kornel" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>kornel</span></a></span> 's <a href="https://github.com/ImageOptim/gifski" rel="nofollow noopener noreferrer" target="_blank">gifski</a>:</p><pre><code>ffmpeg -i INPUT.gif -vf "format=yuv420p" -f yuv4mpegpipe - | gifski -W 128 -H 128 -Q 55 -o OUTPUT-compressed.gif -<br></code></pre><p>Make quality <code>-Q</code> vary until size is just below ~128k. For some reason, Slack's limit is not exactly 217, but not 128000 either.</p><p><a href="https://social.treehouse.systems/tags/ffmpeg" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ffmpeg</span></a> <a href="https://social.treehouse.systems/tags/gifski" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>gifski</span></a> <a href="https://social.treehouse.systems/tags/gifsicle" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>gifsicle</span></a> <a href="https://social.treehouse.systems/tags/RustLang" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>RustLang</span></a> <a href="https://social.treehouse.systems/tags/SlackMoji" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SlackMoji</span></a></p>