Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have 33 audio files, each about 11 seconds long, and I'd like to merge them into one lossless file. How can I do this efficiently (i.e. without cut-pasting in Audacity 33 times)?

share|improve this question

3 Answers

up vote 3 down vote accepted

You can do this with ffmpeg and sox:

for i in *.mp3 *.ogg *.flac
do
  ffmpeg -i "$i" "$i.wav"
done

sox *.wav combined.wav
share|improve this answer
This worked perfectly! Thank you for the help. – Fraxtil Aug 1 '10 at 0:11

If you start with only lossless files, you can use use shntool:

shntool join *.flac
share|improve this answer

Assuming you want to merge them alphabetically, by filename:

for f in ./*.{ogg,flac,mp3}; do echo "'$f'" >> inputs.txt; done
ffmpeg -f concat -i inputs.txt output.wav

The for loop puts all the filenames in a file called inputs.txt, one-per-line, and the second one uses ffmpeg's concat demuxer to merge the files.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.