4

I've to merge two (or more) audio files (like a guitar and a drum track) into a single file. I'm running over linux CentOS and I'd need a command line tool to do so, because I've got to run this as part of a background process, triggered via crontab of a custom bash script. I also need to be able to change the pan, volume, trim and start time (i.e I want the guitar track to start after 1.25ms after the drum track so that they can be both in sync with each other).

My first choice would be ffmpeg, but I was wondering if there could be something more specific, reliable and less fuzzy than ffmpeg.

thx a ton! -k-

holographix
  • 2,497
  • 2
  • 32
  • 46
  • Hey, I'm wondering if you found something to suit what you're looking for (I'm looking for something similar). Or was sox good enough? – Orlando Sep 08 '13 at 18:08
  • This question is answered in [How to overlay/downmix two audio files using ffmpeg](https://stackoverflow.com/a/14528482/8776746). – ynn Mar 02 '20 at 07:16

2 Answers2

4

Sox is the best way to do this. Your command would be the following:

sox -M guitar.wav drum.wav final.wav
jrkt
  • 2,615
  • 5
  • 28
  • 48
2

I don't know for sure if sox can do all that (esp start time), but I think so: http://sox.sourceforge.net/

Certainly it would be my "goto" tool for that, short of writing my own.

Bjorn Roche
  • 11,279
  • 6
  • 36
  • 58