All right, we are going to assume that you have the entire movie ripped to the hard drive, and for this first example, we will assume that the main movie is contained in a single m2ts file within the Streams folder.
You should download a program called Handbrake. It is free to use. http://handbrake.fr/ Once you have it installed, open the program.
On the right side of the main window in Handbrake you should click on High Profile. Now, change the output file type from MP4 to MKV. At this point you are ready to import the video, so click on Source–>Video File and navigate to the largest m2ts file in the Streams folder of your blu ray movie.
Set your destination file by clicking on Browse at the end of that line.
This is what you should see at this point: