How to Convert AAC to AC3 in .MKV File

While I was looking for a better way to convert mkv file with soft subtitles to be played on my Playstation 3, I found there are some tools that allow me to to the conversion. Most of the conversion tools assume the mkv file uses H.264 as the video codec and AC3 as the audio codec. Even though most mkv files stick to H.264 for video, a lot of them use AAC as the audio codec.

Without re-inventing the wheel, I came up a way to convert the AAC sound track in mkv file to AC3 without re-encode the video.  Here are the tools needed. Download and install them. Note that MKVToolnix doesn’t require installation, just extract it to a folder.

MKVToolnix
http://www.bunkus.org/videotools/mkvtoolnix/downloads.html#windows

MKVE Wizard
http://coreforge.org/frs/?group_id=33&release_id=20

VLC Player
http://www.videolan.org/vlc/download-windows.html

  1. Run MKVE Wizard to extract the audio. Specify the file location and click on Next.
    mkvaac2ac3_01
  2. Select the AAC audio track and click on Next to continue. Note that if the Wizard cannot find where you install MKVToolnix, you have to click on Settings to specify it manually. After a few moments, the AAC audio track is saved. It’s save as test_Track2.aac in this example.
    mkvaac2ac3_02
  3. Run VLC player to convert the AAC sound track to AC3. Click on Media and select Convert/ Save.
    mkvaac2ac3_03
    Change the Filter in the dialog window to All Files (*.*) , so you can select the AAC file extracted by step 2.
    mkvaac2ac3_04
  4. In the Stream Output Windows, check File box and enter the file name. I named it test_Track2.ac3. In the Encapsulation tab, select RAW.
    mkvaac2ac3_05
  5. Click on the Audio codec tab, select Audio check box and change the Codec to A52/AC-3. Specify the Bitrate and Channels if needed. Click on Save to convert the audio.
    mkvaac2ac3_06
  6. Run mkvmerge GUI(mmg.exe) from the MKVToolnix folder.
    mkvaac2ac3_13
  7. Drag and drop the original mkv file (test.mkv) and the converted audio track (test_Track2.ac3) to the Input files box. Uncheck the A_AAC track and move the AC3 track up before the subtitles tracks. Enter an output file name. Click on Start muxing to create the new mkv file.
    mkvaac2ac3_071

There are quite a few steps, but the whole process doesn’t take long because the video is not re-encoded.

25 Comments Post a Comment
  1. Prosodie says:

    I want to thank you for this useful descriptions. I’ve searched on a lot of web sites but found nothing like yours…

    I tried and it works very good…

  2. Cacharro says:

    Hi, Could you help me, I do all this process, but in my case show me a error that says, the track doesn´t exist.

    I tried with several files but none works.

  3. Cacharro says:

    In the first step, with the MKVE Wizard , I download the ver. 1.2

  4. amida168 says:

    Have you tried a different mkv file? Maybe the mkv file is corrupted.

  5. amida168 says:

    MKVE Wizard requires MKVToolnix to run. Maybe it cannot find where you install MKVToolnix? Did you click on settings to specify the location?

  6. Cacharro says:

    Thanks a lot amida 168 , that was the error, I don´t specify the correct location, now everything run smooth,

    Thanks.

  7. usman says:

    hi, im having a prblem getting past the first step, when i manually go on settings and select the MKVToolnix folder it still doesnt work. is there a specific folder in the MKVToolnix folder that i need to click on or sumat?

  8. usman says:

    also ive tried this with another movie with the AAC and it wont work but when i try it with movies that already have AC3 it works? btw the movies are bluray and over 4gb, is that why its not working?

  9. usman says:

    also the movies arnt currupted because the video and sound works perfect on my laptop but my tv doesnt support AAC, and when i open the files which already have AC3 the MKV wizard shows info like size, duration, title, date etc but when i open the files which have ACC only the file size info is given and it wont work, pls could you help me

  10. shonofear says:

    hey,
    good post but was wondering to maintain the 5.1 channel surround sound from the AAC audio track did you add more channels (defaults is 2) in VLC to 5 ? or would i select 6 for 5.1 surround sound ?
    im testing 5 atm and is streaming/saving now.
    wats the dealeo though, do i have to wait for the whole audio track to play through whilst it converts it to AC3 ? soo slow

    Cheers

  11. amida168 says:

    I have never thought about this. The source AAC I worked with has two channels, so I selected 2. I guess you have to change the channels to 6 in VLC for 5.1 AAC.

    Yes, you have to wait for the process to finish.

  12. comnguoi says:

    Thank you for posting the simple guide.
    The converted ac3 file has wrong channel mapping. The center channel is mapped as Ls channel.
    How can I fix the mapping poblem?

  13. amida168 says:

    I checked VLC again and did not find anything about remapping the audio channels. I don’t know if it’s possible.

  14. schroder says:

    I had problems with the VLC part (steps 3-5) but managed with the use of ffmpeg. The following cmd did the trick for me: ffmpeg.exe -i “c:\tmp\file.aac” -acodec ac3 -ab 128k “c:\tmp\file.ac3″. This encodes with 128k. Had two audio tracks and converted both this way. After that mkvmerge GUI took care of the rest.

    Great tutorial! Thanks

  15. ed gozo jr says:

    can you also guide me on how to convert Xvid in mkv file to H.264

  16. e2 says:

    Good guide. This works except the channel mappings are incorrect!

  17. RJMonteiro says:

    Thanks mate for sharing this info, it help me a lot.

  18. davince says:

    I had the same problem and succesfully used MediaCoder to convert AAC to AC3 while keeping the video untouched.

    So I had a MP4 with H.264+AAC and converted it into a MKV with H.264+AC3.
    Now my receiver understand the multi-channel audio ;-)

  19. John says:

    Where do I find the streaming output? I cannot seem to find it.

  20. edgozojr says:

    at the convert stage, my vlc says “can not open file”! I have bee able to do this before,I do not understand why it can’t do it now! please help

  21. rory says:

    in 2 cases it does not work:
    -under windows x64
    -if file 1,2 gb bigger

  22. Philip says:

    Hi there,

    I’ve successfully converted the audio from aac to ac3. The problem now is that instead of center speaker, the sound comes out from rear speaker.

    Please help!!

  23. amida168 says:

    At what step did you get the error message?

  24. Cacharro says:

    Yes I tried different files , but non one works, did youn know, if I need a special codec, I have the Matroska pack, n´I don´t Have any trouble to watch the files in my Pc.

Leave a Reply




 

Translator

English flagItalian flagKorean flagChinese (Simplified) flagChinese (Traditional) flagPortuguese flagGerman flagFrench flagSpanish flagJapanese flagArabic flagRussian flagGreek flagDutch flagBulgarian flagCzech flagHindi flagRomanian flagSwedish flagHebrew flagHungarian flag

Archives