2 pass encoding will get you a higher quality file for the same size than one pass, it checks the source and the re-encoded file more closely for optimizations.
I have not played with mkv or mp4 files so can't really answer the other part of your question.