<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Get Info: #pico8</title>
    <description>Posts tagged “pico8” — Blog of independent game and app developer Matt Sephton. Featuring vintage Macintosh, game development, digital artwork, Japanese esoterica, video game reviews, hacks and tips, and much more.</description>
    <link>https://blog.gingerbeardman.com/tag/pico8/</link>
    <atom:link href="https://blog.gingerbeardman.com/tag/pico8/index.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Wed, 01 Jul 2026 16:09:47 +0000</pubDate>
    <lastBuildDate>Wed, 01 Jul 2026 16:09:47 +0000</lastBuildDate>
    <generator>Jekyll v4.4.1</generator>

    
      
        <item>
          <title>Post-processing Animated GIFs</title>
          <description>&lt;blockquote&gt;
  &lt;p&gt;This article was originally posted on &lt;a href=&quot;https://www.lexaloffle.com/bbs/?tid=3614&quot;&gt;pico8 BBS in 2016&lt;/a&gt;, and on &lt;a href=&quot;https://devforum.play.date/t/post-processing-animated-gifs/1074&quot;&gt;Playdate devforum in 2020&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I was interested to see how easy/difficult it is to edit the animated GIF recordings. My goal was to trim some frames from the beginning and end to make a more succinct video.&lt;/p&gt;

&lt;p&gt;After much trial, error and experimentation here are my findings using Mac OS X.&lt;/p&gt;

&lt;p&gt;The game shown in the GIFs is &lt;a href=&quot;https://www.lexaloffle.com/bbs/?tid=3547&quot;&gt;Worm Nom Nom by ilkkke &amp;amp; kometbomb&lt;/a&gt;.&lt;/p&gt;

&lt;h2 id=&quot;overview&quot;&gt;Overview&lt;/h2&gt;

&lt;p&gt;Animated GIFs can be:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;viewed frame-by-frame using system Preview.app&lt;/li&gt;
  &lt;li&gt;manipulated using “gifsicle”, “imagemagick”, “graphicsmagick” command line tools&lt;/li&gt;
  &lt;li&gt;converted using “ffmpeg” command line tool&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Notes&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;useful tools need to be installed, you may wish to use the “brew” command line tool or similar.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;viewing&quot;&gt;Viewing&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;Open the GIF in Preview.app and it will show you all frames.&lt;/li&gt;
  &lt;li&gt;Preview calls the first frame 1 (one), but other tools usually call it 0 (zero).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;original/source animated GIF:
&lt;img src=&quot;https://cdn.gingerbeardman.com/images/posts/post-processing-animated-gifs-01.gif&quot; alt=&quot;GIF&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;un-optimising&quot;&gt;Un-Optimising&lt;/h2&gt;

&lt;p&gt;Warning: If you have previously optimised your GIF to reduce filesize, &lt;a href=&quot;https://devforum.play.date/t/optimising-gifs-from-mb-to-kb/788&quot;&gt;as in this other thread&lt;/a&gt;, and you want to edit the GIF further then be sure to first use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gifsicle -U&lt;/code&gt; to unoptimise it, otherwise the editing commands won’t work as expected.&lt;/p&gt;

&lt;h2 id=&quot;trimming&quot;&gt;Trimming&lt;/h2&gt;

&lt;p&gt;required: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;gifsicle&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;then this is how you trim&lt;/p&gt;
&lt;div class=&quot;language-shell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;gifsicle anim.gif &lt;span class=&quot;s2&quot;&gt;&quot;#212-238&quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; trimmed.gif
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;note: this makes a copy of the GIF and keep frames 213 to 239 (gifsicle uses zero based frame count)&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://cdn.gingerbeardman.com/images/posts/post-processing-animated-gifs-02.gif&quot; alt=&quot;GIF&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;resizing&quot;&gt;Resizing&lt;/h2&gt;

&lt;p&gt;if you want to double size of the image:&lt;/p&gt;
&lt;div class=&quot;language-shell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;gifsicle &lt;span class=&quot;nt&quot;&gt;--scale&lt;/span&gt; 2 trimmed.gif &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; resized.gif
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;https://cdn.gingerbeardman.com/images/posts/post-processing-animated-gifs-03.gif&quot; alt=&quot;GIF&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;captioning&quot;&gt;Captioning&lt;/h2&gt;

&lt;p&gt;if you want to add an overlay to caption the animation&lt;/p&gt;

&lt;p&gt;required: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;imagemagick&lt;/code&gt; or &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;graphicsmagick&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;then use this bash script:&lt;/p&gt;
&lt;div class=&quot;language-shell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;c&quot;&gt;#!/bin/bash&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;source&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$1&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;caption&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$2&lt;/span&gt;
: &lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;?&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Usage: &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$0&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; anim.gif overlay.gif [output.gif]&quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt;
: &lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;?&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Usage: &lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$0&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt; anim.gif overlay.gif [output.gif]&quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nv&quot;&gt;fnsource&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;basename&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$source&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt; .gif&lt;span class=&quot;si&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;nv&quot;&gt;fncaption&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;si&quot;&gt;$(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;basename&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$caption&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt; .gif&lt;span class=&quot;si&quot;&gt;)&lt;/span&gt;

&lt;span class=&quot;nv&quot;&gt;output&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;${&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;:-&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$fnsource&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;$fncaption&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;.gif&quot;&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;}&lt;/span&gt;

gifsicle &lt;span class=&quot;nt&quot;&gt;-E&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$source&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;for &lt;/span&gt;f &lt;span class=&quot;k&quot;&gt;in&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;*&lt;/span&gt;.gif.&lt;span class=&quot;k&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;do &lt;/span&gt;composite &lt;span class=&quot;nv&quot;&gt;$caption&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$f&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$f&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;done
&lt;/span&gt;gifsicle &lt;span class=&quot;nt&quot;&gt;--loopcount&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;*&lt;/span&gt;.gif.&lt;span class=&quot;k&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;gt;&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;$output&lt;/span&gt;
&lt;span class=&quot;nb&quot;&gt;rm&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;*&lt;/span&gt;.gif.&lt;span class=&quot;k&quot;&gt;*&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;how to run the command&lt;/p&gt;

&lt;div class=&quot;language-shell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;./caption.sh anim.gif overlay.gif &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;output.gif]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;note: if you do not specify an output name, it will be named using original filenames, eg. anim-overlay.gif&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;/images/posts/post-processing-animated-gifs-04.gif&quot;&gt;overlay.gif&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://cdn.gingerbeardman.com/images/posts/post-processing-animated-gifs-05.gif&quot; alt=&quot;GIF&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;converting-to-video-for-youtube&quot;&gt;Converting to Video for YouTube&lt;/h2&gt;

&lt;p&gt;required: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ffmpeg&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;to convert the GIF to MP4:&lt;/p&gt;
&lt;div class=&quot;language-shell highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ffmpeg &lt;span class=&quot;nt&quot;&gt;-i&lt;/span&gt; trimmed.gif &lt;span class=&quot;nt&quot;&gt;-movflags&lt;/span&gt; faststart &lt;span class=&quot;nt&quot;&gt;-pix_fmt&lt;/span&gt; yuv420p video.mp4
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;video uploaded to YouTube:&lt;/p&gt;

&lt;lite-youtube style=&quot;aspect-ratio: 1/1;&quot; videoid=&quot;Ydeg4bNHn08&quot; params=&quot;start=0&amp;amp;modestbranding=2&quot;&gt;
&lt;/lite-youtube&gt;

</description>
          <author>by Matt Sephton</author>
          <pubDate>Thu, 16 Jun 2016 00:00:00 +0000</pubDate>
          <link>https://blog.gingerbeardman.com/2016/06/16/post-processing-animated-gifs/</link>
          <guid isPermaLink="true">https://blog.gingerbeardman.com/2016/06/16/post-processing-animated-gifs/</guid>
        </item>
      
    

  </channel>
</rss>
