|
Alright,
here's a rough guide to creating an animated gif from a video using the
free programs below. This tutorial is not only intended to show you how
to get the end result, but to be able to apply the same technique to
videos other than the sample video provided.
UnFREEz
IrfanView
SUPER
(optional)
VirtualDub
1.7.1
VirtualDub-MPEG2
Step
1 - Convert the file to a usable format
The
programs I use to create animated gifs accept only avi and mpg/mpeg
files. If your source video is any other format, or is unreadable by
these programs, you will need to convert it. A simple way to test
this is to open up the relevant copy of VirtualDub (VirtualDub-MPEG2
if it is an mpg file or VirtualDub 1.7.1 if it is an avi) by
double-clicking VirtualDub.exe and attempt to open the source file.
This can be done through the File menu or by simply dragging your
movie into the window. If the video loads and you see the first
frame, you can skip to Step 2. If the first frame says "Warning:
Nothing to ouput Bframe decoder lag," it is still useable and
you can skip to Step 2. If any other error is shown, you will need to
convert it.
**Note,
if the source video needs to be converted and it is of a large size
(300mb+), I highly recommend first cutting out the portion which you
intend to animate. This will make the conversion process go along
much quicker as you only will need to convert a fraction of the video
rather than the entire length, which can take hours depending on the
size. As there are many different types of formats, it would be
impossible to list all the programs that are able to do this. I
recommend going to www.videohelp.com and searching for a program that
will allow you to edit your file.
Open
SUPER. Drag your file into the panel highlighted in red:
Next
choose your Output Container, Video Codec and encoder (you can
disable audio as we won't be needing it). Honestly, I really don't
know all that much about "optimizing" a file so I usually
end up experimenting with all sorts of video codecs and video
settings until I get a file that most closely mimics the quality of
the original and works in VirtualDub. There is also a basic guide to
using SUPER that you can reference for more information.
Once you
have picked your settings, right-click anywhere, select "Output
File Saving Management" and select the folder you wish to save
the file to.
For the
sake of this tutorial, I've prepared a video that you can work with
to see how you would do the rest of the steps. You can find it here.
If, when opening it, you get no picture, you need to download and
install the Xvid codec.
Step
2 - Convert the video to images
Start
VirtualDub 1.7.1 and open Jones.avi by either dragging it into the
window or opening it through File -->Open Video File. Your window
should look something like this (it may show more frames if it is
larger):

In
order to convert the video to images, VirtualDub needs to be in Full
Processing Mode and uncompressed. To double-check these settings, go
to Video and make sure the dot is next to Full Processing Mode. Next,
go to Video-->Compression and make sure "Uncompressed
RGB/YCbCr" is selected in the left panel, as shown below:
Once the
settings have been verified, we can export the image files. First
though, a folder needs to be created on your hard drive to hold
the image files about to be exported. On your hard drive, create a
folder and name it "Tutorial." Once you have created a folder, click on
File --> Export --> Image Sequence. You should see the following
window:
Enter "Jones" as the
filename and enter "3" for minimum number of digits. Click on the
elipses button next to the "Directory to Hold" field and select the
Tutorial folder you just created. Select JPEG as your output format and
set quality to 100. Press "OK". You should now have 338 images in your
Tutorial folder.
Step 3 - Crop and resize the images
Once the images have all been exported, minimize VirtualDub and open
the image Jones000 in Irfanview. Press and hold the right arrow key on
your keyboard and you can see a rough estimate of how the animation
will look. Of course, for most purposes this animation is too
large so we'll need to crop and/or resize it.
When going back and viewing Jones000 again, you'll notice that a lot of
the field is being shown. Because the point of a gif is to show action,
it might help to try to crop the view to just the play/players we want
to see. Click and drag a box around just the players on the field; as
you are doing so, notice that the X and Y coordinates of the box are
shown in the title bar of Irfanview, along with the dimension in
pixels. Once you have completed the box, click on File --> Batch
Conversion/Rename. You should see a window similar to this:

Click and drag the window until you are able to see the the dimensions
in the title bar of the previous window. Next, under "Output directory"
click "Browse" and find your Tutorial folder. Press "Ok." Now, because
we want to save these cropped images in a seperate folder, we need to
create one. To do this, simply type "Cropped" after the backwards slash
which follows "Tutorial". The new folder will be created once we start
the conversion. Under Work as: select "Batch Conversion." Under Batch Conversion Settings
make sure JPG - JPEG Format is selected. Click the Options button to
the right, set the Save Quality to 100 and make sure all
checkboxs are unchecked. Next, check the checkbox next to "Use advanced
options" and click on "Set advanced options." You should see a window
similar to this:

Check the Crop checkbox. You
should still be able to see the title bar of the original window
containing the dimensions of your box. Normally, you would enter those
numbers into the corresponding fields but for this tutorial, enter the
following numbers:
X-Coord: 105 Y-Coord: 54
Width: 397 Height: 212
Next, check the checkboxes next to "Preserve aspect ratio" and "Use Resample function." Press "Ok".
Back in the Batch Conversion window, there is a panel to the left which
shows the files to be processed. In the column of buttons to the right,
press "Add all" to add all your images. Finally, press "Start" start
the conversion. A status window will appear, showing your progress.
Once the conversion is completed, press "Exit."
Now, even though the the files have been cropped, they need to be
resized to meet the new signature rule of the Chicago Bears board. This
rule states that no pictures in a user's signature can exceed 110
pixels. Go to File --> Open and open Jones000 located in the Cropped folder. Next, go to Image --> Resize/Resample. You should see a window similar to this:

Make sure "Preserve Aspect Ratio" is checked and enter 110 for the
height as shown above; the corresponding width will automatically be
entered. Make note of the new dimensions and press "Cancel" to return
to the main window. Next click on File --> Batch
Conversion/Rename. Create another folder in the Tutorial folder through the Output directory field as we did above and name it "Thumbs." Under Batch Conversion Settings:
select "GIF-Compuserve GIF" as the output format and click on "Set
Advanced Options." Uncheck Crop, check "Resize" and enter the values we
got from the Resize window. When completed, your window should look
like the one below:

Press "Ok", add all the images from the Cropped folder to the Input
File by pressing "Add All" and press "Start" to begin resizing; all the
files should be saved to the Thumbs folder. Once the resizing is done,
press "Exit" to close the status window and return to the main window.
Close Irfanview.
Step 4 - Adjust the file size
As a rule of thumb, I like to keep all of my animations I use on forums
under 2mb; I feel this is a good middle-ground for 56k'ers and cable
users alike. It's large enough to have a decent size animation but not the
point where someone's connection bogs down while it tries to load it.
To check what size our animation will be, go to the Thumbs folder that
was created inside of the Tutorial folder. Press Ctrl+A to select
all the files, right-click on any file that is selected and go to
Properties to view the size. The Properties window shows the cumulative
size to be 5.11MB, 3MB over the "limit."
Now, there are two ways to reduce the size of an animation. One way is
to shrink the dimensions of your animation. The second way is decrease
the number of frames - or files - in the animation. The negative of the
former is that depending on the number of files in your animation, you
would have to make it *really* small to squeeze in under the limit. The
negative of the latter is that the more frames you take out, the more
"jerky" the animation will get; also, the more frames you take out, the
faster the animation will appear. Most of the time, you need to make a
compromise between the two. I'll usually resize the animation a small
amount and remove some frames as well, then check the size. If I'm
still over, I'll tweak it some more. This is the part of making an
animation that requires patience; the final goal is to have an
animation where you're able to see what's going yet at the same time,
have it appear realistic (unless you're going for a different look).
After making a few animations, I've found that generally, any animation
200 frames or over is too big. Seeing as how our animation, at 338
frames, is well over that, a good starting point would be to try to
reduce the number of frames and see how the end result looks. If it's
too jerky and/or too fast, we can add back in some more frames and
start chipping away at the dimensions.
To roughly see how many files it would take to reach the "maximum" of
2mb, look at the size of the files. They range from 14 to 17 KB,
so we can take the liberal average to be 16 KB. Dividing 16 into 2000
gives 125. So in other words, we need to reduce the number of frames
from 338 to 125 to meet our 2MB limit. Dividing 125 into 338 gives us
2.704; this means that if we wanted to remove the excess pictures
evenly, we could only keep roughly every third picture. Fortunately,
there's an easy way to do this in VirtualDub.
First off, delete all the images in the Tutorial, Cropped and Thumbs
folder (keep the empty folders). Hopefully, you still have VirtualDub
minimized. If not, repeat Step 1 to load the video and check that
it's in Full
Processing Mode and uncompressed. Next, go to Video --> Framerate and under Frame rate conversion select the option to process every third frame. The window should look something like this:

Now Export the images as we did before to the Tutorial folder. Close
VirtualDub and open the Tutorials folder. You will notice that the
number of frames has gone from 338 to 112. Open Jones000 in Irfanview
and hold down the right arrow key on your keyboard to preview the
animation. As predicted, the animation has sped up considerably. Return to the first
frame in Irfanview (Jones000) and click on File --> Batch
Conversion/Rename. Select the Thumbs folder as the output directory, check that "GIF-Compuserve GIF" is the output format and click on on "Set advanced options." Because
Irfanview has retained the settings from earlier in the tutorial, we
can crop and resize at the same time. Check the Crop and Resize
checkboxes and press "Ok." Add all the pictures to the Input File panel
and click "Start" to begin the conversion. Close Irfanview when it is
complete.
Open the thumbs folder and check the size of the files; it should show
them as being 1.68 MB, well under our limit. Now to address the speed
issue.
Open up UnFREEz, select all the files in the Thumbs folder and drag
them into white panel, making sure to hold onto to the topmost
file (Jones000) when you do so to preserve the order. The window should look something like this:

Make sure "Loop animation" is checked, click on "Make Animated GIF" and
save the gif somewhere on your hard drive. Minimize UnFREEz, open the
newly created gif in Irfanview and view the animation. Now the
animation seems as if the play is in slow motion. Go back to UnFREEz
and you'll notice a field called Frame Delay. Supposedly, this is the
delay time between frames in centiseconds, or 1/100th of a second. I've
found it to be buggy, however. For example, at 0 cs, or no delay, the
animation should move at it's fastest yet it is actually at it's
slowest. Not until you get to a 2 centisecond delay does the animation
speed up. Because of this, it is necessary to experiment with different
delay times. For this animation, I've found a 4 or 5 centisecond delay
looks the most realistic. Pictured below is the animation with a 5
centisecond delay:
Well, there you have it. Now you should have a rough idea of how to create your own animations from video. Good luck!
|