Convert 5.1 Surround to Mono Files with Ecasound

Ecasound is fully capable of converting a multichannel 5.1 surround sound file into individual mono audio files. By taking advantage of Ecasound's multitrack routing engine, users can extract each audio channel simultaneously in a single terminal command. This guide details how to configure Ecasound's chains and channel routing operators to cleanly split a 6-channel file into distinct mono tracks.

Understanding 5.1 Channel Mapping

Standard 5.1 surround sound contains six discrete channels, traditionally ordered as follows:

  1. Channel 1: Front Left (FL)
  2. Channel 2: Front Right (FR)
  3. Channel 3: Center (FC)
  4. Channel 4: Low-Frequency Effects / Subwoofer (LFE)
  5. Channel 5: Surround Left / Rear Left (SL/RL)
  6. Channel 6: Surround Right / Rear Right (SR/RR)

Ecasound uses the -erc (Ecasound Route Channels) audio effect to reassign channels from the input source to designated output files.

The Conversion Command

To split a 6-channel WAV file into six separate mono WAV files in a single pass, run the following command in your terminal:

ecasound \
  -a:all -i:input_51.wav \
  -a:1 -f:16,1,48000 -erc:1,1 -o:front_left.wav \
  -a:2 -f:16,1,48000 -erc:2,1 -o:front_right.wav \
  -a:3 -f:16,1,48000 -erc:3,1 -o:center.wav \
  -a:4 -f:16,1,48000 -erc:4,1 -o:lfe.wav \
  -a:5 -f:16,1,48000 -erc:5,1 -o:surround_left.wav \
  -a:6 -f:16,1,48000 -erc:6,1 -o:surround_right.wav

How the Command Works

  • -a:all -i:input_51.wav: Assigns the input file (input_51.wav) to all active processing chains simultaneously.
  • -a:1 through -a:6: Defines six independent signal chains, one for each individual channel being exported.
  • -f:16,1,48000: Sets the output audio format parameters. In this example, it sets 16-bit depth, 1 channel (mono), and a 48 kHz sample rate. Match these parameters to your source file's original bit depth and sample rate.
  • -erc:from,to: Routes the specific channel from the input into the mono channel of the output. For example, -erc:3,1 takes the 3rd channel of the input and maps it to channel 1 of that chain's output.
  • -o:filename.wav: Defines the destination file name for that particular chain.

Once executed, Ecasound processes the multichannel stream and generates six discrete mono WAV files, each containing the isolated audio for its designated surround channel.