Examples: Recording defined time of video with converted format: avconv -i sablonlar.ogv -ss 00:00:00 -t 00:00:17 output.mp4
Therewithal we converted ogv format to mp4.
We selected input video with -i parameter.
We selected start time of video with -ss parameter.
We selected how long would make recorded from start time of video with -t parameter.
Lastly we described output video name(output.mp4).
Change your video to gif animation: avconv -i output.mp4 -s 640x480 -vf format=rgb24 -pix_fmt rgb24 -r 6 output.gif
We selected input video with -i parameter.
We described codec formats with -vf format=rgb24 ve -pix_fmt rgb24 parameters.
We selected how many pictures would record in one second with -r parameter.
Lastly we named output picture(output.gif)
We can optimize output gif with GIMP:
From GIMP menu: Filters-Animation-Optimize(for GIF)
Record audio of video: avconv -i inputvideo.mp4 -vn -f wav sound.wav