Thank you sir for the quick answer.

I'm using gom player and it plays mkv files fine. It's just that some mkv videos lag very badly and the sub is almost always messed up. I still don't understand why .mkv is popular. If the merit is the soft sub, isn't there a way to soft sub .avi files as well?