Trust me, its not a walk in the park getting everything to work smoothly on a mini as well. I have xbmc running on my mini and it has its share of issues.
----------
My mkv to mp4 workflow -
Assuming the source mkv, "input.mkv", contains a h.264 video track and a DTS track
1) Use ffmpeg to extract an ac3 track
Binaries are available @
http://ffmpegmac.net/
ffmpeg -i input.mkv -map 0:1 -acodec ac3 -ac 6 -ab 640000 -f ac3 output.ac3
2) Use mkvmerge to merge the ac3 track into the mkv "input.mkv"
I use mkvmerge in a windows VM
3) Use subler to open "input.mkv" and select the video, audio tracks (original dts and new ac3 track) and chapter track
Re-order the audio tracks and check the ac3 track (so that it is the default track). Mux the tracks
Note that subler has a couple of neat features that allow for -
- generation of chapter preview images
- metadata import from online databases (movie description, poster art, etc)
I have tried tools like mp4tools but ran into an issue where the audio is out of sync