Barbara (htbthomas) wrote,

Tutorial: animated video icons using GAP for autumnrae89

I'm going to show you how I made this icon:

Using GIMP 2.6 and the GAP plug-in.

Level: Intermediate (you'll need to know your way around GIMP, or failing that, possess a lot of patience/drive.)

This is a very lengthy tutorial, because (no two ways about it) making animated icons is extremely time consuming. I love them, though, so I spend the time trying to make the best ones I can. And I'm always searching for ways to improve.

(NOTE: You will need to download and install GAP and the bug fixes before using this tutorial. An alternative way of making animated icons is to take frame-by-frame screen caps. If you find installing and/or using GAP too confusing, you might want to try this tutorial, and pick back up at Step 4.)

Step 1 - select your clip
Go to your avi, mpg or mov file and note the timestamp of the clip you want. For example, Shawn and Juliet's cheek kiss happens between 39:07 and 39:15. Be careful to pick something that only lasts a few seconds. Make sure to write it down!

Step 2 - extract the frames
In GIMP, go to Video-->Split Video into Frames-->Extract Videorange

On this menu you need to:

A) Open your video file here (if you're not used to the old DOS system, this is the worst part, lol)
B) Click downward arrow to remove audiotrack
C) Pick a folder to save the frames to here (I tend to make a new folder for each animated icon)
D) Click Video Range here
E) Press the up and down arrows until the time codes here** match the range you wrote down
F) Click Loop and Play Selection Only
G) Click here to play -- but first it will ask you if you want to create a video index file.

You do! After it is done (it takes a little while), you can click the left side button again to start it
H) A really annoying "Videoseek" bar will start up. When it's done, the clip will play just that bit. Move the frame numbers higher and lower until you get exactly the clip you want. The Videoseek will reset each time, hence me naming it "annoying." After doing that several times, I ended up selecting between Frame 56270 and 56370.

It's too many frames, though -- your finished product should only have between 15-20 frames. I'll deal with that in Step 3
I) The frames will load into the folder you specified in Letter C, and then the first frame will show in the new GIMP picture:

Click out of it without saving - you want to select your frames differently.

Step 3 - reduce the number of frames
Go to File-->Open As Layers and find your folder.

I created about 100 frames just now -- WAY too many. So I have to figure out which frames to keep!

I look at each frame in the preview to the right, noticing where the movement is. I decide that I want to begin just as Juliet's moving to kiss him, and end just as Shawn closes his eyes. BUT! I only select every third frame (this works well with videos), using Ctrl+Click.

This gets me down to 33 frames. I can still do better. So I decide to cut out the middle section, right after her lips touch Shawn's cheek to just before he closes his eyes.

I de-select the "eye" icon in front of each layer until I find the ones I want to cut. I am able to delete the frames between 56306 and 56347 (using the Trash Can icon at the bottom).

Now I'm at 21 layers. This is workable - if I make the animation a small image size. :) Don't forget to re-click the "eye" icons to make everything visible again.

Step 4 - brighten the frames
Now, you might notice how DARK the image is right now. It will not look good when sized down. There is a nice trick to brightening the frames. An animated GIF can only have a limited number of colors or the size will be too large. This helps reduce the colors as well! Only problem? You have to do it frame by frame. :(

Select a color with the eyedropper - something beige or yellow works best. I found a spot between their heads with a lighter color.

Create a new layer right above the top layer by clicking the New Layer icon (sheet of paper at bottom) and selecting foreground color. Drag it to the top if it isn't there already.

Change the layer mode to "Divide". This seems to work best - though a different setting may work better depending on the color you chose.

Notice how much brighter the image is? Now it's time to copy that layer and move it down between each layer, until you have enough for each frame.

Press "Duplicate" at the bottom, then drag the layer below. When you're done it should look like this:

Now merge each layer by right-clicking on the colored layer and selecting "Merge Down." Do this with every colored layer.

Step 5 - crop and scale down
Time to check the animation - to make sure it's light enough before going on. Go to Filters-->Animation-->Playback.

Then click the Play button on the new window which pops up. If it's fine, move on, if not, repeat Step 4 until it's light enough!

Now I want to crop the picture so that it's basically square. Sometimes I do rectangles, it all depends on the animation. The most important things I want in this crop are their faces, so I try to center it the best I can, using the "eye" icons to check that I'm not going to crop off anything I shouldn't. This selection is 344x344, exactly square.

Go to Image-->Crop to Selection to crop it.

Next we need to scale the whole animation down so that the finished product is a manageable file size! The more frames you have, the smaller the animation has to be, unfortunately. I think 60x60 will be small enough, but I may have to go smaller later. Image-->Scale Image, then Save As an .xcf file for later, just in case.

Step 6 - fade in and out
Create a new white layer and move it to the top. Duplicate it 2 times. Place one layer directly under, and the other below the top video frame. Change the opacity of the lowest one to 33.0, and the middle one to 66.0. Then Merge Down each of those two with lower opacity.

It should look like this after the merge:

Repeat with the two lowest layers of the stack as well, but in reverse:

Use playback again to check it, if desired. Now, I felt like Juliet's kiss was still too dark, so I followed Step 4 again here, only on her portion of the icon.

Step 7 - add a background/border

First we need to enlarge the canvas, just a little. Go to Image-->Canvas Size. I increased the size to 66x66, to create a 3 px border. Click "Center" and then "Resize".

Next I used the eyedropper as before to select a border color. I chose the pink of Shawn's lips, but it could be anything you like. :)

Then create a New Layer with the new Foreground Color, and move it below the bottom frame.

Merge Down the bottom video frame to the colored layer. You now have a border!

Third, enlarge the canvas again to 100x100 and center again. Create a new white layer and place it below the bottom frame, then merge, just as before.

It should look like this. Check in playback again, if desired!

Step 8 - save as a GIF
Right now, the icon would be too large to use, even as much as we've done to it. We have to Optimize it, then reduce the colors further.

Go to Filters-->Animation-->Optimize for GIF.

This will create a new GIF file. The other file is still there, just in case you want to change something later.

Now if I saved this as a GIF, its filesize would still be too large at 53K. We have to reduce the colors even more! Go to Image-->Mode-->Indexed.

Usually 100 colors works, but sometimes I have to Undo a couple of times and try more or less colors.

I also tried 110 colors, and it was also small enough.

Both are a little grainy, but I would probably have to make the animation a little smaller (55x55 or 50x50) to fix that.

Save the new GIF file, selecting "Save As Animation", then Export-->Save. The 100 colors file size is now 38.9K, and the 110 is 40K -- perfect for using on LiveJournal/elsewhere.

If you made it this far, you get a gold star!!! Hopefully this helped. :)

This tutorial did not discuss adding text or different timings on the frames at all. I would be happy to do a separate tutorial for that later! ♥
Tags: icons, tutorial

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded