Are you increasing the resolution by some manner? What is the source material like? 5 gigs is a reasonable amount of space but not that much for 1080p video (neither is 30 for that matter), and thus if your 1080p video is a bit noisy the encoder will also try to encode that noise again and leave you with a massive render. Similarly are any of your after effects settings doing anything fun like framerate doubling/motion interpolation, noise filters, something that makes a lot of noise on the frame...
What are your precise output settings? H264 says not a lot as it encompasses a whole range, starting from near lossless (or theoretically lossless) and going to hyper compressed stuff. Similarly if you have a minimum bitrate set it will play to it.