Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
742 views
in Technique[技术] by (71.8m points)

codeigniter - How to convert .wav to .mp3 file in php

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...