Extract individual audio stems from MKV file?

Discussion in 'Apple TV and Home Theater' started by Harry322, Sep 9, 2011.

  1. Harry322 macrumors member

    Joined:
    Oct 11, 2005
    Location:
    Los Angeles
    #1
    I am interested in taking an .mkv file and extracting the 5.1 audio file (I'm guessing an ac3 file?) and then separating each track (left, center, right, left surround etc.) into 6 discrete WAV files.

    Is there a program that can accomplish this?

    Thanks
     
  2. roidy macrumors 6502a

    Joined:
    Dec 30, 2008
    Location:
    Nottingham, UK
    #2
    Well MKVtoolnix will extract the ac3 track from an mkv file.

    Then if you have a windows machine you can use:-
    BeSweet or
    eac3to or
    HeadAC3he to convert ac3 to 6 mono waves.

    On the Mac side of things the only thing I could find is the 3rd post of this thread on the Mac OSX Audio forum that talks about using Audacity to convert ac3 to 6 mono waves and there's a Mac version of Audacity.

    http://www.macosxaudio.com/forums/viewtopic.php?t=33085
    Audacity

    This is all I could find, hope it helps.
     
  3. Harry322 thread starter macrumors member

    Joined:
    Oct 11, 2005
    Location:
    Los Angeles
    #3
    Thanks roidy!

    I'll give that a shot. Much appreciated!
     
  4. Harry322 thread starter macrumors member

    Joined:
    Oct 11, 2005
    Location:
    Los Angeles
    #4
    OK, so I've tried all of the options laid out by roidy - and sadly, nothing seems to work.

    I don't have access to a windows machine, and opening the .exe files in WINE give me errors.

    Is there any Mac application that can demux an ac3 file into seperate WAV files?
     
  5. roidy, Sep 10, 2011
    Last edited: Sep 10, 2011

    roidy macrumors 6502a

    Joined:
    Dec 30, 2008
    Location:
    Nottingham, UK
    #5
    OK, I've just done a test and Audacity works perfectly under Windows, so there's no reason the Mac version shouldn't also work.

    1. Install Audacity 1.3.13.

    2. Install the FFmpeg import/export library, from the Audacity site. This will allow you to import/export AC3 files.

    Now you can open your mkv/mp4 files directly in Audacity and select the AC3 track, but for some reason it downmixes it to stereo:mad: So.....

    3. Extract your AC3 track from your movie file.

    4. Run Audacity and goto Edit->Preferences, this box will popup:-

    Capture1.JPG

    5. Goto the Import/Export page and under the "When exporting tracks to an audio file" section select "Use custom mix", if you don't do this when you export your file all the tracks will be mixed into one file.

    6. Goto File->Open and load your AC3 file, it should load as 6 mono tracks:-

    Capture2.JPG

    7. Goto File->Export Multiple.

    8. Select the export format and location then press Export.

    9. You'll get an edit metadata page for each of the 6 tracks just press ok on each.

    10. Mission accomplished :)

    Just a quick side note, Audacity doesn't label the 6 mono audio tracks but the ordering is as follows:-

    Track 1 = Left front
    Track 2 = Right front
    Track 3 = Center
    Track 4 = LFE(Sub)
    Track 5 = Left Surround
    Track 6 = Right Surround
     
  6. Harry322 thread starter macrumors member

    Joined:
    Oct 11, 2005
    Location:
    Los Angeles
    #6
    Well Roidy, you've done it again.

    Turns out there was a problem with my AC3. I tried your method on a different file and it worked like a charm!

    Thanks again!
     
  7. roidy macrumors 6502a

    Joined:
    Dec 30, 2008
    Location:
    Nottingham, UK
    #7
    No problem, glad to hear you've got it working.
     
  8. Harry322 thread starter macrumors member

    Joined:
    Oct 11, 2005
    Location:
    Los Angeles
    #8
    Just to further complicate things, I am trying to use this process on Thor which has a DTS-HD Master Audio 7.1 track.

    Any chance that there's a work around that supports this type of file? Or is it also an .ac3 file?
     
  9. roidy macrumors 6502a

    Joined:
    Dec 30, 2008
    Location:
    Nottingham, UK
    #9
    Yep, just tried it and it seems to work with DTS-HD 7.1, heres what I did:-

    1. Convert a Blu-ray to mkv using MakeMKV, selecting only the DTS-HD 7.1 track to make it easier.
    2. Use MKVExtract from MKVToolsnix to extract the 7.1 audio to a file that has a .dts extension.
    3. Load the .dts file into Audacity just like in the 5.1 AC3 example.
    4. Export the same as before.
     
  10. Harry322 thread starter macrumors member

    Joined:
    Oct 11, 2005
    Location:
    Los Angeles
    #10
    Fantastic!!! Thanks, I'll give it a shot
     

Share This Page