Category Archives: 5.1 Surround Sound

5.1 surround sound in iMovie

From a series of messages I posted to the Apple Discussions forum

Original Problem:

I have tons of video shot on Sony HDR-CX7 and HDR-CX12 camcorders (AVCHD) in 5.1 stereo. iMovie ’09 and Final Cut Express import the audio as two channel stereo, which is normally fine for a consumer app.

I use a Sony wireless microphone to record interviews, and I normally set the camera to record only the monophonic microphone audio. But, there is also a setting to let the camera record 5.1 stereo from it’s built-in microphone, and use the wireless mic as the center channel audio.

I have footage recorded this way, and I find that when I play it back in stereo, I get a slight delay/echo caused by the wireless mic recording voices, and the camera recording voices (slightly offset). I cannot use the audio this way.

I want to extract the center channel audio from the AVCHD .mts files. I can then line that audio up with the video in Final Cut Express (or even overlay it in iMovie ’09).

Does anyone know of a free utility that can strip out audio from AVCHD files?

It looked like Handbrake might work, but it errors out when it tries to convert more than two channel audio.

I believe the AVCHD audio is AC3 format, so if I can strip that out, Quicktime is able to mute the other surround channels.

Any tips?

First Research:

Some updated research:

1) Sony suggests their Vegas Pro editing software ($$$). The demo will indeed access the center channel, but I have not had time to figure out what to do with it (running via Parallels and Windows XP).

2) eac3to – Windows Command-Line program (free) that can read a .mts file and export an .ac3. It shows up in QuickTime with 6 channels of audio, but the “center” channel is not center — it contains a mix of other channels.

3) VideoPier – $85 program that seems to work. It can output/convert the .mts file to a .mov, and if you open in QuickTime, you get 6 audio channels all set to “mono” — that seems to be a bug. Mute all but the center (second channel, I think) and that IS the isolated center channel.

4) VisualHub – tries to convert, but no go.

5) VLC – can export to a file, and there is a multi-step sequence using this and ffmpeg that supposedly will work, but too much work and too many steps for me to try.

6) VoltaicHD – $35 program that looks promising, but it creates a .mov with 6 audio channels and they have the same issue the eac3to program has. The “center” channel is not center.

So far, VideoPier is close, and the Sony product works (but both too pricey for such a simple task).

The quest continues…

Final Solution:

Here is my current status, and a work-around method to accomplish this.

First, using “ffmpeg” it is possible to extract just the .AC3 audio stream from a .MTS AVCHD camcorder file. I have tried to do this with the Mac OS X GUI version, ffmpegX, but it errors out. It looks like it is sending the wrong parameter to ffmpeg internally (or perhaps it is using a different ffmpeg command I have on my machine). Anyway, the command looks like this:

ffmpeg -i 00000.MTS -acodec copy audio.ac3

That will extract just the audio stream from within the MTS file (which is an AC3 file). By default, you cannot play .AC3 files in QuickTime. It turns out, I had “Perian” installed, which is an extension for QuickTime that allows it to play a bunch of other files. One of the settings was a Stereo mode, which was causing anything I tried to play mix down to stereo. Aha! So, I could toggle that off and actually get to the audio track I wanted.

BUT, since native Mac OS X does not read .ac3, my workaround is to again use ffmpeg to convert the .ac3 file to a .aac:

ffmpeg -i audio.ac3 -acodec ac3 -ab 512k audio.aac

Since the source AC3 file was 448kb/s, I just manually chose 512k as the conversion rate, so it shouldn’t lose too much quality. That value can be changed to decrease file size.

The end result, “audio.aac”, is now a 6 channel 5.1 audio file. You can open it in QuickTime, and go to Window->Show Movie Properties then select the “Sound Track” track, and the “Audio Settings” tab of that track, and you will see tracks 1-6 (Left, Center, Right, etc.). You can toggle the tracks off to get to the one you want (in my case, just Center).

From there you could export this out to a file with just the track you selected, or drag the .aac file in to Final Cut Express.

If you drag in to Final Cut Express, you will see it takes up five audio tracks. I drug this under the original imported video track, and was able to mute the ones I did not need. I also found I could unlock the audio from the video, and then delete the ones I didn’t want, just to clean up the edit window a bit.

The end result is now I can import the AVCHD file in to Final Cut Express, and bring in this converted AAC under the video to access just the center audio I wanted.

When I have time to streamline this process a bit more, I will update this topic.

Hope this helps someone else…