This is a command-line utility to convert any video in a Matroska video container (MKV) to x264 video in an MP4 container (M4V), ostensibly for viewing on an AppleTV or an Apple iPad.
The real magic comes in the form of extracting an SSA/ASS subtitle track from the Matroska container, converting it to an SRT subtitle track (a format accepted by MP4), and then muxing the subtitles in to the newly converted MP4 file.
While technically this script will run in any Perl environment, reliance on SublerCLI (for subtitle muxing) currently makes it only usable on Mac OS X.
mkv2mp4.pl <mkvfile>...