As we continue with our obsessive compulsion with hacking the crap out of the Apple TV 2G, today we'll be covering how to convert MKV videos into an MP4 format that's acceptable in your iTunes library so you can stream it via WiFi with 5.1 sound. Why Apple keeps their systems so closed is beyond us, but like many things in life, when there's a will, there's a way! Now, let's get hackin'!
Update: Thanks, funstraw! Fixed the numbering for ya. Not sure how that happened.. hehe :)
WHAT YOU NEED:
- Apple TV 2G
- Windows PC (OSX users will have to use the Handbrake alternative or something like that, but you won't get getting 5.1 sound unfortunately)
- XMedia Recode (FREE)
HOW TO DO IT:
1) Download and install XMedia Recode.
2) Launch XMedia Recode.
3) Drag and drop your MKV into the program.
4) Select the MKV you want to convert.
5) Under Format Tab, change the Format the MP4 and the video codec to MPEG-4 AVC/H.264, audio codec to AAC.
6) Under the Video Tab, check the box that says "Video copy."
7) Now, under the Audio Track 1 Tab, check to box "Audio copy" if AAC is your default soundtrack. If it's DTS or anything else, choose Bitrate 448 and change Channels to 5.1 (or if you have only 2 channels, choose Stereo).
8) Hit Add Job, then Encode.
9) If everything was done right, it shouldn't take more than 10 minutes on a Core 2 Duo machine to remux it into the MP4 container.
10) Now just drag into iTunes and enjoy the 5.1 sound with no damage hit to video quality! :)

Commercial Flour Sa...
with all due respect, this is not hacking. it's called transcoding.
and sorry, didn't mean to sound rude. i really do think this is a great idea ;) -- my geekbuddy keeps fooling around with this mkv format on non-apple hardware, and i just think, "come on, man! join the party!"
Mac users can use MKVtools to do the same thing.
http://www.emmgunn.com/mokgvm2dvd/mokgvmhome.html
You lost me on step 4, Oh no you lost step 4. I am so confused
Handbrake for Mac OS X does do 5.1 sound as long as you're starting with a Dolby Digital source. I converted dozens of mkv's with 5.1 for my Apple TV until I got sick of the process and bought a WDTV Live, which will natively play pretty much anything.
For Macintosh, Handbrake does support Dolby Digital 5.1 audio output, and will transcode the video to an Apple TV compliant video format. However the conversion does take some time. What's described in the article sounds like you're simply changing the container format of the video to MP4 and transcoding the audio, "it shouldn't take more than 10 minutes on a Core 2 Duo machine." If that's the case the first generation has trouble with higher bitrate files typically encoded as MKV. Not sure if the newer generation can handle them.
And if you're on a mac you'll want to look into converting DTS to AC3, something I pioneered in 09. It's annoying but MKVDTS2AC3 saves lives.
UGH. who needs apple tv?
time to move on from 720p.
Just tested a 4GB MKV converted to MP4 on Apple TV 2G. This WORKS!
This article, while good for people who "somehow" ended up with MKVs, completely ignores the whole reason people are using the MKV container: we want H.264 video while keeping the unaltered DTS or AC3 soundtrack.
I prefer another app with better result : "FastMKV2MP4", it is also a remuxer (so it is fast) and keeps the AC3 (if DTS in the original file it is converted to AC3). The solution with XMedia Recode results in a multichannel AAC mp4, which the appletv will (unfortunately) output as 2 channel PCM and not as 5.1
I tried to convert a mkv with two audiotracks. The Video works just fine and in VLC the audio does as well. But if i play the mp4 file in itunes it plays both audiotracks at the same time and i can't find a way to choose one of those...
@Jot I think you have to set the 2nd audio track to "none".
Step by step guide on How to Convert and Import AVI to iTunes/iPad/iPhone/iPod/Apple TV at Easy Solution to Convert and Import AVI to iTunes so as to Transfer AVI Files to Apple TV/iPad/iPhone/iPod successfully
it also applies to convert and import mkv, wmv, flv, wtv, mpg and more to itunes for applie tv, ipad, iphone, ipod and more
The following will describe a detailed guide on how to convert MKV to Apple TV and iTunes compatible format so as to successfully stream MKV to Apple TV for easy play MKV on Apple TV, Apple TV 2 or the 3rd generation Apple TV at http://www.bigasoft.com/articles/stream-and-play-mkv-on-apple-tv.html
Nice tip, however, the best tool I use to convert media files is video convert ultimate program, it's fully integrated with dvd ripper, video converter, dvd creator, drm removal, video downloader software that can work effectly and ensure high output quality.
Nice done. i also found a detailed guide to convert mkv files to mp4 here
http://www.mizsoft.com/macosx/mkv-to-mp4.html
Aunsoft Video Converter (Size: 17.9MB)helps you convert between various formats. It is the must-have conversion tool for video lovers, and enables you to enjoy movies on computer, to further edit video for creation, to present video on HDTV, and to publish video online in web-friendly format. You can control your video and music on popular portable devices including iPad, Nexus One, HTC Hero, Zune, iPod, PSP, Apple TV, iPhone anytime anywhere.
<p>mkv to mp4 converter </p>
I use wondershare ultimate video converter. I don't use the Apple TV profile but rather the normal h.24 mp4 profile. That way I can get bitrates as high as 9-12k depending on the file. As we all know apple doesn't allow you to import high quality files to its default video player. But with third party apps like avplayer, as long as the file is mp4 it runs smooth as butter and looks amazing on the retina display.