Did you do a search? This has been answered many times before.
The stock player is made to play mp4 container files, with an h264 baseline video codec. It may support other codecs, but its hit or miss. You can use Handbrake to convert your videos to that. Do a search on here for Handbrake, and you will find many threads on how to convert.