Without knowing anything about your render settings, version of AE and so on, nobody can tell you anything.
If you are not using the Adobe Media Encoder to render a h.264 mp4 using one of the standard presets then you are probably creating some custom rendering settings that foul things up. Video has standards and you must learn them and follow them.
If you are using a standard preset and are still having problems then you need to examine the metadata and see what is in there. Without a good understanding of formats and video standards it is going to be very hard to figure out on your own. We need more details.
Well rendering as .mov and not .mp4 seems to fix the issue. Thanks.