如何从PHP压缩或转换为低质量的MP3文件 [英] How to compress or convert to low quality Mp3 file from PHP
本文介绍了如何从PHP压缩或转换为低质量的MP3文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有任何PHP库或函数可以隐藏Mp3文件以降低质量?
Is there any PHP library or function to covert Mp3 file to lower quality?
我想通过PHP将128Kbps或更高质量的Mp3文件压缩/转换为64Kbps Mp3文件.
I want to compress / convert 128Kbps or higher quality Mp3 file to 64Kbps Mp3 file by PHP.
有人知道吗?
推荐答案
首先,您需要安装ffmpeg,网址为: http://ffmpeg.org/download.html
First of all, you need to install ffmpeg available at: http://ffmpeg.org/download.html
然后,确保在PHP配置中启用了安全模式,然后选择可执行文件的正确目录: safe_mode_exec_dir
Then, make sure you have safe mode enabled in your PHP configuration and select the right dir where you can execute files: safe_mode_exec_dir
最后,使用:
exec("ffmpeg -i inputfile.mp3 -ab 64 outputfile.mp3")
这篇关于如何从PHP压缩或转换为低质量的MP3文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文