combine two audio files with a command line tool

这一生的挚爱 提交于 2021-02-18 17:36:21

问题


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-


回答1:


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.




回答2:


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

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


来源:https://stackoverflow.com/questions/10721089/combine-two-audio-files-with-a-command-line-tool

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!