Page 1 of 1

How do I create a GIF from an emulator?

Posted: Sat Jan 06, 2018 10:56 am
by dfzx
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.

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

Posted: Sat Jan 06, 2018 11:03 am
by Ast A. Moore
Some emulators—zxsp, for instance—create animated GIFs by default. If that’s not your cup of raktajino, you could use something like this.

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

Posted: Sat Jan 06, 2018 11:12 am
by bob_fossil
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

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

Posted: Sat Jan 06, 2018 11:16 am
by dfzx
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. :)

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

Posted: Sat Jan 06, 2018 11:20 am
by namco
Gifcam can be useful for that:
http://blog.bahraniapps.com/gifcam/

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

Posted: Sat Jan 06, 2018 11:20 am
by serbalgi
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.

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

Posted: Sat Jan 06, 2018 11:29 am
by R-Tape
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.

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

Posted: Sat Jan 06, 2018 11:32 am
by dfzx
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!

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

Posted: Sat Jan 06, 2018 11:34 am
by dfzx
Thanks for all the suggestions. Turns out that the Fuse utils already do it. You just need to read the chuffin' documentation. :)