How can I convert 5.1 AC3 to 6 WAVs?
January 26, 2010 8:31 AM   Subscribe

How can I take 5.1 (or 7.1) audio from a DVD, encoded as AC3, and convert it so each channel is its own WAV file? (Mac solution preferred; Windows XP will suffice)

I found this wonderful tutorial on how I can take DTS audio from a DVD and using Mac The Ripper, VLC, and Audacity I can have each channel as its own track in Audacity (and from there I can do what I want with each channel).

But I want to be able to do this with my AC3 encoded DVDs as well. If I try this same solution, VLC converts the AC3 into an 8 second file of silence, and while my Mac Audacity claims to be able to import the AC3 file, it too imports only silence.

Google-fu has failed me, so help me AskMefites! you're my only hope!
posted by arniec to Computers & Internet (6 answers total) 4 users marked this as a favorite
 
eac3to somefile.ac3 somefile.wavs

This is a windows solution, but fast and completely simple. Here are some perhaps useful options, depending on the nature of your project:

+/-100ms apply a positive or negative audio delay
+/-3dB apply a positive or negative audio gain (volume change)
-0,1,2,3,4,5 remap the channels to the specified order
-edit=0:00:00,0ms loops or removes audio data at the specified runtime
-silence/-loop forces usage of silence (or looping) for audio edits
-down6 downmix 7 or 8 channels to 6 channels
-down2 downmix multi channel audio to stereo (Dolby Pro Logic II)
-phaseShift shift phase (when doing stereo downmixing, see "down2")
-mixlfe mix LFE in (when doing stereo downmixing, see "down2")
-down16 downconvert decoded audio data to 14..23 bit
-slowdown convert 25.000 and 24.000 content to 23.976 fps
-speedup convert 23.976 and 24.000 content to 25.000 fps
-23.976/... define source fps to be "23.976", "24.000", "25.000", ...
-changeTo24.000 change source fps to "23.976", "24.000", "25.000", ...
-resampleTo48000 resample audio to "44100", "48000" or "96000" Hz
-r8brain use r8brain resampler instead of SSRC
-keepDialnorm disables dialog normalization removal (not recommended)
-lowPriority moves processing to background/idle priority


By default, eac3to strips dialog normalization (generally good when working with separate WAVs) and otherwise does nothing other than decoding according to the AC3 specs using libavcodec.
posted by Inspector.Gadget at 8:47 AM on January 26, 2010


Also works for DTS, btw.
posted by Inspector.Gadget at 8:48 AM on January 26, 2010


You can use a52dec to do the conversion on the command line.
posted by zsazsa at 9:32 AM on January 26, 2010 [1 favorite]


You could try sox, though I am not sure if it supports more than 4 channels. This is how you would get four channels in seperate output files (there may be a way to do it without running sox four separate times, but I am not sure).

sox [in.ac3] -c 1 [c1-out.wav] mixer 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;
sox [in.ac3] -c 1 [c2-out.wav] mixer 0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0;
sox [in.ac3] -c 1 [c3-out.wav] mixer 0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0;
sox [in.ac3] -c 1 [c4-out.wav] mixer 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0;

the mixer effect takes a series of bus amplitudes as its input, so we are just saying put the first input channel on the first output channel and zero out the rest, put the second input channel on the first output channel and zero all the rest, etc. You can also do level control or mixing: 0.25,0,0,0,0.25,0,0,0,0.25,0,0,0,0.25,0,0,0 would mix all four channels down to the first channel with levels reduced conservatively to eliminate the possibility of clipping.
posted by idiopath at 9:41 AM on January 26, 2010


Best answer: Thanks for the tips folks. None of them really worked out like I'd hoped...the closest was eac3to but I never got a full-length 6 channel output.

For anyone who finds this later, I DID find a solution: there is an FFmpeg plug-in for Audacity 1.3 and beyond (presently only in beta), and this plug-in allows Audacity to support importing of AC3 files, including 5.1 AC3 files, so after installing the plug-in it was literally drag and drop to get the files I wanted in Audacity, and from there I could export them individually or do whatever I wanted. All details about this plug-in can be found here: http://manual.audacityteam.org/index.php?title=FAQ:Installation_and_Plug-Ins#installffmpeg.

Thanks for the aid though, it got me pointed in the right direction.
posted by arniec at 11:35 AM on January 28, 2010 [1 favorite]


the closest was eac3to but I never got a full-length 6 channel output.

You should have been able to do just that. Would you be able to share the source file with me via Mefimail? I can pass the bug reports onto the developers. The only thing I can think of is that one or more individual WAVS might have gone over the 4GB RIFF structure limit, but that would be very unusual for a DVD source ....
posted by Inspector.Gadget at 6:13 PM on January 29, 2010


« Older How to develop realistic expectations for starting...   |   Hey, travel writers - when do you pitch? Newer »
This thread is closed to new comments.