Usually those movies are ripped from Blue-Ray dvd's or hd dvd's... thus the usage of mkv. files rather than standard avi. If you want to learn how to encode in h264 inch format you simply need an x264 encoder. I recommend Fair Wizard but... up to you.