問題描述
您知道使用 PHP 合并兩個 MP3 文件的類嗎?
Do you know a class to merge two MP3 files using PHP?
我在 Google 上什么也沒找到.
I've found nothing on Google.
推薦答案
如果合并是指將一個音頻置于另一個之上,請忽略此答案.
如果您不想重新編碼 MP3,您可以直接附加它們.我知道這適用于 MPEG 電影,所以我想它也適用于 MP3.另一種選擇是將 audo 文件添加到沒有壓縮的 Zip 存檔中,然后將擴展名重命名為 .mp3.
If you dont want to re-encode the MP3s, you can probably just append them. I know this worked for MPEG movies, so I guess it could work for MP3s too. Another option would be to add the audo files to a Zip Archive with no compression and then rename the extension to .mp3.
我做了一個快速測試,這個
I did a quick test and this
file_put_contents('combined.mp3',
file_get_contents('file1.mp3') .
file_get_contents('file2.mp3'));
工作正常.ID3 標簽將是錯誤的,但生成的文件包含兩個音頻文件.有關其他一些可能的問題,請參閱 Pekka 答案中的鏈接一>.
worked fine. The ID3 tags will be wrong, but the resulting file contains both audio files. For some other possible gotchas, see the link in Pekka's answer.
此外,一些快速的谷歌搜索結果
Also, some quick googling resulted in
- http://www.sourcerally.net/Scripts/20-PHP-MP3 級
- http://codingforums.com/showthread.php?t=169069
和一些討論
- http://ask.metafilter.com/21381/Merge-mp3s-帶-PHP
這篇關于合并兩個 mp3 php的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!