如何在PHP中将MP3文件组合在一起[重复]

This question already has an answer here:

I need to put an MP3 file over another one in a specific time slice of whole file.

Is it possible to do this? If so, is there any library or method?

I dont want to put them one after another. Such as;

file_put_contents('combined.mp3',
    file_get_contents('file1.mp3') .
    file_get_contents('file2.mp3'));
</div>

PHP has limited functionality and it will be slow. i recommend using a native library for such purpose. and execute it using shell_exec().

this one may help. https://trac.ffmpeg.org/wiki/Concatenate . that example uses ffmpeg. but make sure shell calls are secure.