IMPORTANT: Newer / Easier GuideNOTE: This guide, while still working, is outdated and uses a complicated method to achieve this task. Luckily, AfterDawn can now offer a much easier solution that doesn't use as many programs and will take only a fraction of the time to complete. Convert MKV to MP4 for Xbox 360 (Easiest Method)In this guide we use a program called GotSent that will automatically handle all the steps that we previously had to take manually. So try the new guide out first, and if it doesn't work, you can always come back to this one. |
Prepare content from MKV for Xbox 360

How this guide is structured

Software you need
MKVToolnix | This is a software package of tools for MKV files provided by the team behind Matroska. |
MKVExtractGUI | This is a GUI for MKVExtract.exe which is found in the installed directory of MKVToolnix. |
VideoInspector | This is a video file information tool. It will tell us about the streams container in our MKV files. |
Nero AAC files | These are free files for encoding/decoding AAC streams provided by Nero AG. |
MeGUI | This is a frontend program used to accomplish many tasks including encoding and muxing. |
h264info | This tool can change the level setting of an AVC stream if required. |
MP4Box | This is a command-line based tool for creating MP4 files. |
YAMB | This is a GUI for MP4Box. |
WinRAR | This item is required to extract files from some of our download archives. |
VirtualDUBMOD | This is a modified version of the popular VirtualDUB tool. This supports opening and saving MKV. |
You can go ahead and download all of the above now if you wish. Over the instructions, I will reference these items again and link to them, as well as lay out what needs to be done with some that aren't simple installation packages. The first thing you need to do is install check our MKV files with VideoInspector.
Step 1 - Get important information on MKV streams |
Get information on streams inside MKV files with VideoInspector

Alternatively, you can just drag and drop the MKV file onto the running application and that will work just as well.

Please take note of the framerate of FPS of your video. In my example it is 23.98 (23.976 is the NTSC Film spec) and this may be important information later on when creating an MP4 file. Now look at my audio. I have 6 channel AC3 audio. This sounds great, but unfortunately later it will have to be converted to AAC LC for compliance with Xbox 360's playback specs.
Finally, and very importantly, if you got XviD or DivX or something similar as the Codec that is required to decode your video, then you should go directly to page two which shows a method using VirtualDUBMOD by clicking here. Depending on your codec setup however, this may not be very clear yet. However, it will be in the next step if you hang on.
Step 2 - Prepare MKVExtractGUI |
MKVToolnix

If you cannot find the installation directory, then click Start --> All programs --> MKVToolnix. Right-click on the MKV merge icon and click Properties. From here, click the Shortcut tab. Now click the Find Target button and the installation directory should open much like the image accompanying this text.
Keep this folder open now, as it is time to copy in the files from the MKVExtractGUI RAR archive.
Setup MKVExtractGUI

We now must copy these files into the installation directory of MKVtoolnix which you should already have open from the last step. To extract into this folder in the easiest way possible, simply select all the files in WinRAR (CTRL + A) as shown in the picture, and now drag and drop these files over into the folder.
Once that is done and the files have been successfully extracted from the RAR archive and appear in the MKVtoolnix folder, you can close WinRAR again.

Step 3 - Extract Video and Audio streams from MKV file |
MKVExtractGUI

Click the button beside the input field to attempt to open your MKV file.
Identifying your video

Now, look at the content. In my example my video is "V_MPEG4/ISO/AVC". Notice the AVC, this indicates I have a H264/AVC stream, which, going by the Xbox 360 playback table, means I need to put this into an MP4 container for it to play on my Xbox 360. Again, if your results indicate XviD or otherwise, then go right to the the second page by clicking here so you can follow a VirtualDUBMOD method.
In my example, I also have AC3 audio. That's a problem. I cannot have AC3 audio with AVC video in an MP4 container and play it on an Xbox 360, so my audio needs to be re-encoded to AAC LC later on. For now though we will focus on extracting both the video and audio stream we need (extract all audio if there are multiple).

Select all your streams and click the Extract button. Now give MKVExtractGUI some time to save these files to your disk (the larger the file the longer the process).
Finding your demuxed files


If you have multiple audio tracks, please play them one by one (VLC Media Player recommended) and determine which audio stream you want to keep because the Xbox 360 won't let you change them later on anyway. Delete the rest and just keep the audio file that you require for the completed output MP4 file.
The next thing we need to do now is prepare our audio.
Step 4 - Convert AC3 (multichannel) audio (or MP3) to AAC LC |
Get Nero AAC encoder and Setup MeGUI


The neroAacEnc_SEE.exe file is specifically for computers that have processors that support SEE2. If your Intel or AMD64 chip does support SEE2, then that's the file we are looking for. If not (or if unsure), then neroAacEnc.exe is what we are looking for.
What to do with them? The idea is to put them into the installation directory of MeGUI. Go ahead and install MeGUI, then either go to its installation directory at its default of C:\Program Files\megui or again, click Start --> All programs --> MeGui. Right click on "MeGUI modern media encoder" and click properties. Click the shortcut tab and then click the Find Target button. This will open the MeGUI installation directory.

If the program crashes, which is a common bug, you may try to deny it Internet access by setting up a fake proxy server in Control Panel --> Internet Options --> Connections tab --> LAN Settings. Do NOT do this if you do not need to, and don't do it if you are currently reading this in Internet Explorer (if you are, get Firefox!). For some reason, the update application with MeGUI has caused myself and some other friends issues when it runs and tries to access the Internet.
One last thing you will definitely need in order to run MeGUI properly is the .NET framework, at least v2.0. Click here to download.
Encode AC3 to AAC-LC with MeGUI / Nero AAC encoder

Click the button beside the Audio Input field and locate the AC3, MP3 or other audio file you got from your MKV file.


AAC profile should be either set to automatic or AAC LC manually. When you have changed your settings to reflect this, click the OK button. This will take you back to MeGUI, where you should now click the Enqueue button. After you click it, click the Queue tab.

When you are ready, click Start to get the process going.

Once it is completed, go to the folder that you had the original audio file in and you should now find your new MP4 file containing your AAC video stream, ready to be muxed with the original H264/AVC video you got from MKVExtractGUI into an MP4 file that should play on the Xbox 360.
Next up we have muxing and possibly a little extra work to be done on the h264 stream to make it 360-ready.
Step 5 - Mux H264/AVC video with AAC LC audio using YAMB/MP4Box |
Setup YAMB with MP4Box

MP4Box is a command line tool and YAMB is a GUI that can utilize MP4Box.exe, making it a lot easier on you to make MP4 files. Now its time to open YAMB.exe.
YAMB/MP4Box

Click the Settings button on the left hand side of YAMB.
Specify location of MP4Box.exe

When you have it selected correctly simply press back until you get to the main YAMB window again. Double click the Click to create an MP4 file with multiple audio, video, subtitles and chapters streams option.
Add Video and Audio stream

If many chapters data is added here from the MP4 file, you can select it and click Delete as it will be useless to the Xbox 360. Now, here is where we determine whether we need to make any more changed to our H264 (video) file before muxing. Please bare with me for a second.
The Xbox 360 does indeed support the H264/AVC video standard inside the MP4 container. However, specifically the Xbox 360 supports AVC up to High Profile (HiP) Level 4.1. Unfortunately, a lot of files that don't need to be, are specified as level 5.1, as seen for example in the accompanying picture. If you try to play these streams on an Xbox 360 as of February 2008, you will get a black screen, even though in 99% of cases the Xbox is more than capable of playing this particular file. Luckily there is a fix for this problem.. or rather a workaround as editing anything like this in an already encoded file is generally not recommended.
Look at the description of my AVC stream. "AVC - MPEG-4 AVC High@L5.1 - 1280 x 720". This is a problem because of the L5.1. Note also that you wont always get level information from this and may actually get a black screen on your Xbox 360 anyway. So if you have up to L4.1, you are OK, but if you have over that, you will have to use a workaround for this problem.
If you need to set the H.264 level of your video file for compliance with the Xbox 360 console, or if you experience a black screen with just audio, then click here to go to an optional page of this guide that covers a workaround for this problem using a tool called h264info. When you are done, click the "Go back to muxing step" link on the page to come right back here.
Step 5 continued
If you just repaired your file, replace the AVC stream loaded into YAMB with the new one created for you by h264info. If not, then just continue on. You may be asked to specify the framerate of your AVC video stream at this point. I told you to remember it all the way back at VideoInspector.
AVC Stream Properties

The Muxing Process

When it is finished, check the resulting MP4 file with something like VideoLAN client to make sure you have perfect sync and proper playback (note that HD playback may be poor on older computers). Then burn it to a disc or stream it to your Xbox 360 and see how it plays.
That concludes the instructions for Extracting streams from an MKV file and muxing them into the MP4 container for Xbox 360 support. If you have any questions, please visit our Discussion Forums for help.