使用PHP在Linux Debian中合并MP3文件 [英] Merging MP3 files in Linux Debian using PHP
本文介绍了使用PHP在Linux Debian中合并MP3文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
这一点: http://lists.mplayerhq.hu/pipermail/ ffmpeg-user / 2009-September / 022171.html
首先你必须安装sox。 sudo apt-get install sox。
$ sox first.mp3 -r 44100 -c 2 -s -w first.raw
$ sox second.mp3 -r 44100 -c 2 -s -w second.raw
$ cat first.raw second.raw> concatenated.raw
$ sox -r 44100 -c 2 -s -w concatenated.raw concatenated.mp3
您可以使用exec()从php执行所有这些命令。
What's the easiest way to merge the contents of several MP3 files into one using PHP 5.2 on Linux Debian system? I found some scripts that are supposed to do in PHP only, but they seem to be buggy. Perhaps there is a way to accomplish this task using command line programs, that I could install on my Linux Debian machine?
解决方案
check this: http://lists.mplayerhq.hu/pipermail/ffmpeg-user/2009-September/022171.html
first you have to install sox. sudo apt-get install sox.
$ sox first.mp3 -r 44100 -c 2 -s -w first.raw
$ sox second.mp3 -r 44100 -c 2 -s -w second.raw
$ cat first.raw second.raw > concatenated.raw
$ sox -r 44100 -c 2 -s -w concatenated.raw concatenated.mp3
you can execute all these commands from php with exec().
这篇关于使用PHP在Linux Debian中合并MP3文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文