I have posted about this before here but I have recently found a better way to do this involving a little mac application called ‘subler’. It doesn’t convert the mkv, but just converts non-standard audio (DTS/AC-3 etc) and then recombines (muxes) the original video with the converted audio and places it in an m4v (or mp4) container. This means it takes about 5% of the time that a full video conversion would take. YES!
It’s also free (well, distributed on a GNU GPL v2 license), it can be found on google code and the app is so easy to use AND it fetches meta data and thumbnails from an online database too!
Before starting encoding, open the settings to set up the audio conversion. I convert to iTunes so I ticked ‘AC-3 audio to AAC’, downmix audio to ‘Dolby Pro Logic’, and 128kbps.
Now simply open the MKV and it asks you which tracks you would like to use and add the video and at least one audio track (multiple audio tracks, subtitles and chapters are supported too) and then hit ok. Press shift-cmd-m and search for the meta data, add it, then it asks you to choose a thumbnail image (your iTunes library is gonna look great (not to mention scrolling though it on Apple TV).
Now (and this is great) you can add the process to a queue (option under the file menu) – you should select ‘Video-MPEG4′ and tick 64 bits chunk offset on the addto queue dialogue. Once complete, just drag it in to iTunes (you could place a folder action on the destination folder so that this happens automatically).
There is also a command line version of the app which you can script, say, when a new file is detected it will automatically convert it, so in theory everything would be automatic, but the last time I tried this I found the CLI didn’t fully support DTS audio conversion unlike the GUI version.
Posted from Coppull, England, United Kingdom.