A screenshot of your render settings might help us see what the issue was.
Although, there's a reason the AE team removed the H.264 encoder from the current version of After Effects. It's always been a bit wonky. I usually render an intermediate codec out of AE's render queue and then use the Adobe Media Encoder to make my H.264 deliverable.
- The Great Szalam
(The 'Great' stands for 'Not So Great, in fact, Extremely Humble')
No trees were harmed in the creation of this message, but several thousand electrons were mildly inconvenienced.