How to change the audio codec in .mkv video files-
This purpose of this tutorial is to demonstrate a way to quickly and easily change the audio codec being used in your HD MKV file. This is very useful to me because I watch HD movies via a portable hard drive plugged in to the USB port on my big screen TV. The problem I was running into is that my TV can only handle certain audio codecs in MKV files, which caused some of them to not work properly. My TV can handle the AC3 codec but not movies encoded with DTS. So in order to make the movies work, I convert the audio file from DTS to AC3 and then re-mux the audio with the movie. The whole process takes around 10 to 15 minutes to do and is a very easy process. I know there are many other ways of doing this, but for this tutorial you will need Xilisoft(or imToo) Hd video converter (I am using version 5.1.15 build 1211) it can be downloaded off of most trackers and mkvtoolnix which can be found here http://www.bunkus.org/videotools/mkvtoolnix/downloads.html#windows
(go to the windows section and choose either the install or the 7zip archive)
Once you have Xilisoft installed and cracked and mkvtoolnix extracted into a folder start at Step 1.
Step 1 - Find out what audio codec is being used: Inside your mkvtoolnix folder there is a file called mmg.exe. Open that up and it should resemble the picture below. Click on the add button and select the mkv video you would like to work on. For this tutorial I will be changing the DTS audio on Startrek into AC3. In the tracks section you can see the audio being used is DTS.

Step 2 - Convert the audio into AC3: Now that I know the audio will not play on my TV I need to change the codec. Open up Xilisoft HD Video converter and than add the movie you want to change the audio on.

Step 3 - Select the audio codec and quality you would like: Once you have your movie loaded highlight it by click once on the name. Than go down to the profile section followed by general audio. Next select the codec you want the audio to be in. Once selected you can change the quality of the audio on the right hand side.

Step 4 - Convert!: Once you have everything set up choose where you want the audio to be saved in the destination line at the very bottom. Than hit the Red record button at the top of the program.

Step 5 - Re-mux the video: Once xilisoft is done working (it took me 7 min for the audio to be extracted and converted) go back to mmg.exe(mkvmerge gui) that we opened in step 1. Click the add button again and select your converted audio that you made with Xilisoft. Your new audio track will be added to the bottom of the chapters tab. Now uncheck the old audio file and anything else you would like removed(like subtitles or alternate languages) and change the file name in the output file name spot. I usually just add ac3 somewhere in the line. Than hit start muxing.

Step 6 - Play your new video: As you can see from the picture below everything went well and it took almost 8 minutes. Everything is now done and your video is ready.

Step 7 - Double checking: If you want to make sure everything went correctly you can open mmg.exe again, and this time add your new version of your movie. The audio track should now be what you wanted.


Well that concludes this tutorial. Please leave a rep if you found it helpful.