Software like RecordMyDesktop save the video file as ogv but sometimes is better a little gif!
On https://github.com/Mte90/Script/blob/master/ogvtogif.sh you can find a little script by me.
How it works?
Convert the ogv in single jpg frames, next convert this files to an animated gif finally is optimised and the file created for the conversion are removed.
Yes Youtube is funny sometimes.