If the intention is to send it to phones, then gif downloads are going to explode your user's data caps. It also seriously limits the quality of the resulting video.
I'd suggest relying on the <video> tag in browsers. It will be a lot easier to encode for your servers too (though may require some retooling).