fixing geocities animated gifs
I've been using internet since the mid-1990s, so of course I remember Geocities and even had a page there once (which I think was under the "TelevisionCity" category). A very common thing was to use animated GIF images.
Were those images saved somewhere? Yes. Internet Archive has GifCities, which has hundreds of thousands if not millions of those GIFs, all searchable, and in original form...
...and that's the problem.
Many of those old crusty GIFs never had a frame rate set, and I know exactly why.
Mid-to-late 1990s PC specs meant you either had a CPU that was a 486 or a Pentium. It was unlikely you had a Pentium II unless you had serious cash for it, and you absolutely did not have a Pentium III since that didn't exist until 1999.
Combine that with using Microsoft Windows 95, and using Netscape Navigator 3, Netscape Communicator 4, Microsoft Internet Explorer 2, or Microsoft Internet Explorer 3 as your browser.. and yeah, things were slow.
Oh, and let's not forget WebTV a.k.a. MSN TV, as in the thing you connected to your television for internet use. That was also dog slow, both for hardware and software. I never had one of those, but I knew one person that did back in the day. Just one. WebTV never sold all that well.
An animated GIF without a frame rate set means it will go through its frames as fast as possible. On a mid-to-late '90s era PC, the GIF looked fine because even at the fastest the browser could display an animated GIF, it was still "normal" speed. But on a modern computer now, it's way too fast.
Two animated GIF examples from Geocities pages in original form to show the speed problem:
There are two methods to fix this.
Method 1: gifsicle
The easiest way I found to introduce a proper frame rate with gifsicle is to explode the original GIF into separate frames, then recombine.
Put the GIF into a folder.
Run this:
gifsicle -e file.gif
A bunch of frame files are created, starting with .000 and counting up from there.
Move the original GIF out of the folder.
Run this:
gifsicle -d 1 -m * -o fixed.gif
This tells gifsicle to set a delay of 1/100th of a second, merge all frames into one file, and output the file fixed.gif.
And we end up with this:
Method 2: GIMP
This is way more involved, but may be preferable if you need to set a more precise frame rate and/or fix other things on a per-frame level.
Open the GIF in GIMP.
The first thing to do is "unoptimize" the GIF to eliminate weirdness (mostly to do with transparencies, should the GIF have any).
Filters > Animation > Unoptimize
If there is nothing to be done on a per-frame level, you can just export as this point.
File > Export As...
Yes, Export As... must be used and not Save As...
Title the file fixed.gif and click Export.
Now we set the frame rate. Using 100 for all frames is the one that usually works. If you notice it's too slow or too fast at 100, just export again and adjust until it looks right.
The end result:
Dealing with GIFs that have varying frame delays
An example of this is a GIF animation has some frames at 100ms, but then a half-second "pause" with one frame at 500ms, then loop.
The vast majority of Geocities animated GIFs don't have any of this going on, but on rare occasion, some might.
GIMP is the easiest way to deal with this. In the Layers list is where all the frames are. Each frame will show how many milliseconds of delay it has, identified with parenthesis. Using a 10 frame animation example, let's frames 1 through 9 have a delay of 100ms. You'll see each layer as something like Frame 1 (100ms), Frame 2 (100ms), and so on. Now let's say the tenth frame is where the animation "pauses" for one-half second before looping. The name there would be Frame 10 (500ms).
Any Layer, which in this case is any frame, can be changed just by double clicking it. For example, if I wanted to make the "pause" on the tenth frame longer, I just double-click and change (500ms) to (1000ms), and that increases the time just for that frame from one-half second to a full second.
Yes, it is possible to adjust delays on a per-frame level using gifsicle, but way more difficult. In GIMP I see a nice tidy list of everything in Layers, and can quickly find which frame(s) have different delays.
Convert the GIF to MP4
Some may want to do this to put the GIF in a video. Use FFMPEG for that.
Fix the frame rate of the GIF first and export, then do this:
ffmpeg -i fixed.gif fixed.mp4
You only get one animation loop from this. Take your fixed.mp4 and create another file that has the loop repeat 20 times:
ffmpeg -stream_loop 20 -i fixed.mp4 -c copy fixed20.mp4
Done.
If the resulting MP4 has a frame rate running way too fast, it's probably because you used gifsicle. Try exporting from GIMP instead to make your fixed GIF, then make your MP4 clips.
Like this article? Leave a tip