The AVI format is a multimedia container format developed and maintained by Microsoft. AVI has support for multiple video codecs including MPEG-4. This makes the conversion to MP4 simple:
$ ffmpeg -i input.avi output.mp4
If the input.avi codec is not MPEG-4, setting the libx264 codec might be required:
$ ffmpeg -i input.avi -c:v libx264 output.mp4
Tip: Instagram and Twitter do not support AVI video uploads.