Two quick possibilities that are often the case when this type of question is asked.
If you aren’t doing a proper RAM preview, perhaps it’s not playing the way it should. Sometimes on a fast computer, if you press spacebar to preview, it plays faster than it would rendered out.
If you have a slower computer, sometimes the slower machine can’t play back in real time if the rendered video has too high a data rate.
What sort of preview are you seeing where everything is fine?
What are your output settings in the render queue?
What version of AE are you using?
What kind of computer do you have?
– 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.