How to create animated GIF from video

I never made a GIF and I desperately wanted to make one. So I googled for a way to do it and discovered that I already have the programs needed to create an animated GIF. How awesome is that! I’m so excited over it I decided to compile a little tutorial on creating animated GIF from video for other beginners like myself.

Good job, everyone! It only took an hour.

Before we can exercise our GIF making prowess, we will need to install 2 programs and 1 plug-in.

1) VLC player
3) GIMP Animation Package (with a great installation tutorial)

Now that we have the tools, we can begin.

1. Get the source material
Use VLC player to extract a short clip from our long video. The clip will be our source material for the GIF. Be sure to choose a good quality video for this. Better the source material, better the GIF.

To turn on the recording mode in VLC, go to View and check Advance Controls.
Play our video. Hit the big red record button at 5-10 seconds before where we want the short clip start. Then hit the record button again at the part we want it to end. Voila! The clip magically appears in our video library, here.
I renamed the clip to “Ep02HD” for convenience sake.

2. Extract frames
Use GIMP to create frames for animation.
Go to Video, then Split Video into Frames, click on Extract Video Range.

Click on the three dots button then scroll down to Video\.

Double click on the Video\ and select clip Ep02HD.mp4.

Enter value in From Frame and To Frame. OR, click on Video Range button to open up the clip on the right side and see the frames we want to start and finish. We are not doing audio, so change Audiotrack value to zero. And check off Create only one multilayer image.

Once we click on OK, GIMP will extract the frames. The time it will take depends on how many frames we select. In this case, 340 frames.

3. Reduce the image dimension
Our frame dimension is huge at 1280×720. It needs to come down in size.
Go to Image, click Scale Image. Change Width to 400 px. If we keep the Width and Height linked, GIMP will automatically adjust the WxH proportion. Or unlink them and manually adjust them independent of each other.

4. Crop the image
The black bars are such a waste of space. Let’s crop them out with Crop tool.

5. Delete frames
A lot of frames means gigantic file size. It also means slow motion playback for everyone except for firefox users. So we need to delete couple frames to make our GIF playback friendly. I delete every other frame (layer), sometime more, to speed up the playback.
GIMP doesn’t have bulk deletion. As a work around, (1) click the eye icon for all the frames(layers) we want to delete. (2) Go to Image, click on Merge Visible Layers. (3) Then select the merged layer, the one that in not in BOLD letters, and (4) click recycle bin icon. After my deleting rampage, I have the frames down to 162.

6. Animation playback
Before we commit to any changes, let’s get a preview.
Go to Filters, then Animation, click on Playback.

I recommend doing a playback between major changes to see if you like the result. I had to un-delete couple frames because the GIF became too choppy.

7. Index the image
If we save the GIF right now, it would look super grainy. Nothing like our playback. So before we save, we index the color.
Go to Image, then Mode, click Indexed…

Change the values to show just like this.

8. Final step, save the GIF!
On GIMP, to save is to export.
Go to File, then Export… Change the extension to .gif and click Export. Check off As animation and click Export.


Now I just need to figure out how to reduce the file size without sacrificing quality. Any suggestions?


One thought on “How to create animated GIF from video

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.