Indeed, I too used the open-source Handbrake for the same. What I am trying to say is that encoding is not the issue here, how GIF handles a large no. of frames is -After Effects does allow for exporting in MP4 format but it involves a few extra steps and can be done in one of 2 ways; either use the Media Encoder app to do it, or install Quicktime then export it as a Quicktime file and change the format to H.264.
A GIF with the exact same quality, FPS, etc will always have a bigger size than its video counterpart. That's why most Gifs are usually 5 - 10 sec long with poor quality.You must be registered to see the links
Also, I'm very new to After effects so it's very much possible I might be fucking something up. So let's just leave it at that