How do I create a GIF from an emulator?

Y'know, other stuff, Sinclair related.
Post Reply
dfzx
Dizzy
Posts: 84
Joined: Mon Nov 13, 2017 6:55 pm
Location: New Forest, UK
Contact:

How do I create a GIF from an emulator?

Post by dfzx » Sat Jan 06, 2018 10:56 am

I see people on here occasionally post an inline image to an animated GIF file showing a short sequence from a Spectrum emulator. How do you create such a thing? I managed to get an AVI out of Fuse and its associated utilities for uploading to Youtube, but I couldn't figure out how to make an animated GIF of a Spectrum screen.
0 x

User avatar
Ast A. Moore
Manic Miner
Posts: 626
Joined: Mon Nov 13, 2017 3:16 pm

Re: How do I create a GIF from an emulator?

Post by Ast A. Moore » Sat Jan 06, 2018 11:03 am

Some emulators—zxsp, for instance—create animated GIFs by default. If that’s not your cup of raktajino, you could use something like this.
0 x
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.

User avatar
bob_fossil
Microbot
Posts: 101
Joined: Mon Nov 13, 2017 6:09 pm

Re: How do I create a GIF from an emulator?

Post by bob_fossil » Sat Jan 06, 2018 11:12 am

ffmpeg can convert a video to a gif, though you might end up with a gif containing video compression artefacts depending on the codec used to create the original video. I managed to create an animated gif using SpecEmu's .bmp dump option (Recording menu, Video sub menu). This dumps every frame to a .bmp file. You can then use something like Image Magick to glue all the generated .bmps into an animated gif. That's how I managed to create this:

Image
0 x

dfzx
Dizzy
Posts: 84
Joined: Mon Nov 13, 2017 6:55 pm
Location: New Forest, UK
Contact:

Re: How do I create a GIF from an emulator?

Post by dfzx » Sat Jan 06, 2018 11:16 am

Yes, I tried to convert the FMF file Fuse produces to an AVI, then break that into frames, but the compression had left severe artifacts and the result was horrible. But it looks like fmfconv will create a folder full of PNGs with no compression, so that's probably the way to go. I'll give that a try. :)
0 x

namco
Berk
Posts: 38
Joined: Mon Dec 04, 2017 8:55 pm

Re: How do I create a GIF from an emulator?

Post by namco » Sat Jan 06, 2018 11:20 am

Gifcam can be useful for that:
http://blog.bahraniapps.com/gifcam/
0 x

serbalgi
Berk
Posts: 21
Joined: Sat Jan 06, 2018 11:13 am

Re: How do I create a GIF from an emulator?

Post by serbalgi » Sat Jan 06, 2018 11:20 am

dfzx wrote:
Sat Jan 06, 2018 11:16 am
Yes, I tried to convert the FMF file Fuse produces to an AVI, then break that into frames, but the compression had left severe artifacts and the result was horrible. But it looks like fmfconv will create a folder full of PNGs with no compression, so that's probably the way to go. I'll give that a try. :)
The fmfconv manual explains a way to convert to animated GIF (25 fps) using ImageMagick:

Code: Select all

fmfconv -f 25 input.fmf tmp.png
convert -delay 4 -loop 0 -layers removeDups -layers Optimize tmp*.png output.gif
SPIN also supports animated GIFs.
1 x

User avatar
R-Tape
Site Admin
Posts: 1473
Joined: Thu Nov 09, 2017 11:46 am

Re: How do I create a GIF from an emulator?

Post by R-Tape » Sat Jan 06, 2018 11:29 am

ZX SPIN is great for this purpose:

In ZX SPIN (I'm using 0.666) select recording > video > configure output and select animated gif, you will also need to link to a .GIF file in the filename part. I don't know why GIFs animate and other filetypes don't.

Set up the spectrum to do whatever you want.

Then when you're ready select recording > video > start recording and leave until you're ready to select stop from the same place.
1 x

dfzx
Dizzy
Posts: 84
Joined: Mon Nov 13, 2017 6:55 pm
Location: New Forest, UK
Contact:

Re: How do I create a GIF from an emulator?

Post by dfzx » Sat Jan 06, 2018 11:32 am

serbalgi wrote:
Sat Jan 06, 2018 11:20 am
The fmfconv manual explains a way to convert to animated GIF (25 fps) using ImageMagick:

Code: Select all

fmfconv -f 25 input.fmf tmp.png
convert -delay 4 -loop 0 -layers removeDups -layers Optimize tmp*.png output.gif
SPIN also supports animated GIFs.
:lol: , RTFM why don't I? In my defence, I was reading the fmfconv help text, which doesn't offer the examples section.

Thanks for that!
0 x

dfzx
Dizzy
Posts: 84
Joined: Mon Nov 13, 2017 6:55 pm
Location: New Forest, UK
Contact:

Re: How do I create a GIF from an emulator?

Post by dfzx » Sat Jan 06, 2018 11:34 am

Thanks for all the suggestions. Turns out that the Fuse utils already do it. You just need to read the chuffin' documentation. :)
0 x

Post Reply