0

I'm already taking advatage of two command line utilities. I'm using ffmpeg to convert m4a to mp3, and then I'm combining a few mp3's into one large one using mp3wrap. The resulting file is something like this:

BackgroundMusic.mp3 > Audio1.mp3 > Audio2.mp3

I need something more like

Audio1.mp3 > Audio2.mp3
|_____________________|
           |
  BackgroundMusic.mp3

To where the background music runs continuously in the background. Would be nice to be able to change the volume of each track too.

Does anyone know a command line program like mp3wrap but can also add in a background track?

I will not be able to use a GUI program such as Audacity, as all of this will be automated on the server.

Thanks!

  • No need for the extra step to convert the m4a to mp3 if you're using ffmpeg. Please show the complete console output of ffmpeg -i Audio1 -i Audio2. – llogan Aug 13 '15 at 17:16
0

You should be able to do this with sox, a cli audio manipulation tool. For example to concat two files, and mix in a third, then play it:

sudo apt-get install sox libsox-fmt-all
sox Audio1.mp3 Audio2.mp3 out1.mp3
sox -m out1.mp3 BackgroundMusic.mp3 out2.mp3
play out2.mp3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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