2

I am using afconvert to convert wav files into caf. Is it possible to mix existing channels (in my case two) down to one channel? I don't want to drop any sound. I see the --mix option but am not sure how it works. It does not seem to do anything. I am using afconvert batch in a script file so it would be handy with a solution that does not involve any GUI.

This is the current way I am using

/usr/bin/afconvert sourceaudio.wav outputaudio.caf -d ima4 -f caff -v

I use ffmpeg for this. It works:

http://trac.ffmpeg.org/wiki/AudioChannelManipulation

Mix a single stereo stream down to a mono stream. Both channels of the stereo stream will be downmixed into the stream.

ffmpeg -i stereo.flac -ac 1 mono.flac

Jonny
  • 565

2 Answers2

2

Well actually I asked this in the beta Sound Design network site, and got a good standalone answer which is:

https://sound.stackexchange.com/questions/28189/downmixing-audio-on-command-line

to specify little-endian (intel) integer 16 or 24 bit wav file:

afconvert -d LEI16 -c 1 --mix input_file.wav output_file.wav

or

afconvert -d LEI24 -c 1 --mix input_file.wav output_file.wav
Jonny
  • 565
1

Just -c 1 seems to downmix the left and right channels:

afconvert input.wav output.caf -c 1 -d ima4 -f caff -v

afconvert input.wav output.caf -c 1 -d ima4 -f caff -v and afconvert input.wav output.caf -c 1 --mix -d ima4 -f caff -v produced identical files.

Lri
  • 42,502
  • 8
  • 126
  • 159