Linux tool to overlay MP3 files for use in PHP

旧巷老猫 提交于 2020-01-01 14:22:27

问题


I have been searching the internet with no success for a tool that will allow two mp3 files to be overlaid on top of each other. I have a client who wants to build a service that allows someone to select a music track and a vocal track from a list of files and then have them play together. Her business produces visualisation CD's and I believe this would be the best route as she has hundreds of visualisation mp3 scripts and about 30 backing music. This will allow the merging of these 2 files dynamically and for them to be cached as opposed to doing the manual work on demand.

I have investigated ffmpeg and other tools but these tend to handle cutting/splitting/merging etc, but I have found nothing that will allow me to overlay two audio tracks on top of each other to produce a merged track.

I guess what would be perfect is something along the lines of a command line version of audacity.


回答1:


Install sox, use the --combine switch

sox --combine {mix|merge|mix-power} track1.mp3 track2.mp3 output.mp3

Use --volume FACTOR before an input file name to i.e. keep the background track in the background :-); sox has a lot of other options to mix, match, edit audio files; you can find the man page online here, to check in advance if you want to gove it a try (you should...).



来源:https://stackoverflow.com/questions/8359974/linux-tool-to-overlay-mp3-files-for-use-in-php

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