holographix
holographix

Reputation: 2557

combine two audio files with a command line tool

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-

Upvotes: 4

Views: 7238

Answers (2)

jrkt
jrkt

Reputation: 2715

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

sox -M guitar.wav drum.wav final.wav

Upvotes: 4

Bjorn Roche
Bjorn Roche

Reputation: 11469

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.

Upvotes: 2

Related Questions