Monday, 3 May 2010

Convert video to animated GIF for free and easy

I've often wondered the exact process by which this is done. Firstly, it's much easier to do in Ubuntu Linux rather than Windows 7. The reason being is that all the software is there to be immediately installed and it works immediately. You can either dual boot, use VMWare to run a Linux virtual machine, or even VNC to a Linux box like I do.

Install recordMyDesktop from the terminal

sudo apt-get install recordmydesktop gtk-recordmydesktop

Drag the area of the screen you wish to record using the small preview of the whole screen. Click record when ready. The video will save as out.ogv

Next you'll need FFMpeg. The easiest way is to install WinFF from the Ubuntu Software Centre.

Create a folder to hold all the frames you're going to generate

mkdir frames

Next run this to split the video into PNG frames. JPEG is too compressed.

ffmpeg -i out.ogv frames/frame%d.png

Now you'll have all the frames.

Run GIMP Image Editor from the menu. Select File > Open as Layers... and hold down the shift key to select the frames you want. You can crop or do any image processing here if need be. Then File > Save as and give a .gif extension to your file. Save as animated GIF. You are done.

2 comments:

Anonymous said...

I get this error:

[image2 @ 0x2676d70]Could not open file : frames/frame1.png

Chris said...

Hi, sounds to me like you have a write permission issue. What path are you running this on? Thanks - Chris