Im using handbrake and Im not sure what settings to use.

Hard drive space isnt an issue really, as long as its not the same size as the video_ts file im happy.

Quality is my main focus so here's what im thinking:

container: mp4
codec: x264
constant quality: 70%
keep aspect ratio: on

Ive done some research but all the different containers and codecs are somewhat confusing. Why use mkv over mp4 or avi? Why use h.264/x264? over mpeg4 (ffmpeg)? And what containers support which codecs/encoders. Can anyone help me out with understanding all this?