How to convert .wav to .mp3 file in php

萝らか妹 提交于 2019-12-29 08:49:30

问题


I am currently developing a website using the CodeIgniter framework and in one of the Process I need to download a .wav music file and convert it to .mp3 file. All the coding needs to be done only in PHP and I cannot use Ruby or java to do so.

And I am currently hosting on a shared env i.e. Dreamhost.

So please let me know how to work out this problem.


回答1:


Use FFMPEG. There is a PHP extension for it, but I've found better success just calling exec(). Most hosts I have used (even shared hosting) will install it if it isn't already available.

Edit: Dreamhost provides this for you. See this: http://wiki.dreamhost.com/FFmpeg

And this: http://wiki.dreamhost.com/Php-ffmpeg



来源:https://stackoverflow.com/questions/5330486/how-to-convert-wav-to-mp3-file-in-php

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