My method is a bit bizarre and can be a bit tedius for long animations, but it works on Linux while School House's method will not (the programs are not available).
Basic Animated GIF TutorialTwo programs are needed:
Mplayer and
Gimp (both are free and open source). It is possible to have Mplayer make a gif directly, but in my experience this produces poor results. Instead I make a series of png files and import them into the Gimp to make the animation.
1) Enter the following command at the shell prompt:
QUOTE
mplayer -vo png -ao null -ss hh:mm:ss -frames ff /path/to/filename.avi
1a) Replace hh:mm:ss with the point at which to start capturing images. (For example entering 00:10:00 will start capture ten minutes into the video.
1b) Replace ff with the number of frames to capture. To figure out how many frames you need look at the frame rate (fps) of the video. (For example if the frame rate is 30fps and you want three seconds you would enter 90.)
1c) Replace /path/to/filename.avi with the name and path of the video file you wish to use.
1d) Mplayer will save the images in your current working directory with names of the form 000000XXX.png where "XXX" is an automatically incremented number counting up from the first frame.
2) Open the
first frame of your animation in Gimp. (You ma need to start with the file 0000002.png as Mplayer sometimes makes the first image the first image of the
video rather than the first image at your starting time.)
3) Open the subsequent frames
in order as layers. (File->Open as layer... or [ctrl] + [alt] + o )
4) Save the image as a gif file.
5) The "Export File" dialogue should pop up.

Make sure to select "Save as animation" then click "Export".
6) The "Save as GIF" dialogue should then pop up.

The "Delay between frames where unspecified" is the important setting here. Generally, about 40ms of delay will make the animation flow at the same speed as the original video. To calculate the proper delay for a given video divide 1000 by the frame rate of the video. I believe that the delay can only be a multiple of 10. If you enter something else it will be rounded.
If there is any interest, I might post a tutorial about more advanced techniques later.