convert video to jpeg with good quality:

1
avconv -i input_video.mp4 -qmax 1 -qmin 1 images_%05d.jpg

crop video:

1
avconv -i input.avi -vf crop=<width>:<height>:<x>:<y> output_%05d.png

create gif using

http://gifmaker.me/