How to Split Audio Tracks Using Ecasound
This guide explains how to split a continuous live concert audio recording into individual song tracks using Ecasound, a lightweight, command-line multi-track audio processing utility. By identifying track transition timestamps and leveraging Ecasound's input-offset and processing-duration parameters, you can quickly extract each song into its own lossless audio file without needing a heavyweight graphical digital audio workstation (DAW).
Prerequisites
Ensure Ecasound is installed on your system. On Debian- or Ubuntu-based Linux distributions, install it using:
sudo apt-get install ecasoundUnderstanding the Syntax
Ecasound uses command-line options to define input files, start offsets, processing lengths, and output files:
-i:input_file.wav: Specifies the continuous master recording.-y:START_TIME: Sets the starting position (offset) in seconds orhh:mm:ss.dddformat.-t:DURATION: Specifies the duration of the audio clip to process.-o:output_file.wav: Defines the destination file for the extracted track.
Step 1: Identify Your Track Cue Points
Listen to the concert recording or use a basic audio player to note the start time and end time for each song. Convert these markers into duration values:
- Song 1: Starts at
00:00:00, ends at00:04:15(Duration:00:04:15) - Song 2: Starts at
00:04:15, ends at00:09:40(Duration:00:05:25) - Song 3: Starts at
00:09:40, ends at00:14:02(Duration:00:04:22)
Step 2: Extract Individual Tracks
Run individual ecasound commands for each segment.
Replace concert.wav with the filename of your
recording:
Extract Track 1:
ecasound -i:concert.wav -y:00:00:00 -t:255 -o:track01.wav(Note: 4 minutes and 15 seconds equals 255 seconds. You can also
specify -t:00:04:15.)
Extract Track 2:
ecasound -i:concert.wav -y:00:04:15 -t:00:05:25 -o:track02.wavExtract Track 3:
ecasound -i:concert.wav -y:00:09:40 -t:00:04:22 -o:track03.wavStep 3: Automate the Extraction with a Bash Script
To avoid running commands manually for long concerts, create a script
named split_concert.sh:
#!/bin/bash
INPUT="concert.wav"
# Array format: "OutputFile|StartTime|Duration"
TRACKS=(
"track01_intro.wav|00:00:00|00:04:15"
"track02_song_one.wav|00:04:15|00:05:25"
"track03_song_two.wav|00:09:40|00:04:22"
)
for item in "${TRACKS[@]}"; do
IFS="|" read -r OUT START DUR <<< "$item"
echo "Extracting $OUT..."
ecasound -i:"$INPUT" -y:"$START" -t:"$DUR" -o:"$OUT"
done
echo "Splitting complete."Make the script executable and run it:
chmod +x split_concert.sh
./split_concert.shEcasound will process the master recording sequentially, producing clean, gapless audio segments ready for tagging or compression.