To convert animation GIF to MP4 by ffmpeg, use the following command

ffmpeg -r 30 -i input.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" output.mp4

Here ``-r 30'' specify the frame rate 30 frames/sec. So if you want 10 sec movie with frame rate 30/sec, you make GIF animation that has total 300 frames, then use ``-r 30''.

The references are http://unix.stackexchange.com/questions/40638/how-to-do-i-convert-an-animated-gif-to-an-mp4-or-mv4-on-the-command-line and ``man ffmpeg''.