How to convert .wav to .mp3 file in php

I am currently developing a website using Framework CodeIgniter and in one of the Processes I need to download a .wav music file and convert it to a .mp3 file. All coding needs to be done only in PHP, and I cannot use Ruby or java for this.

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

So let me know how to solve this problem.

+4
source share
1 answer

Use FFMPEG . There is a PHP extension for it , but I found better success by simply calling exec() . Most of the hosts that I have used (even shared hosting) will install it if it is not already available.

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

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

+6
source

Source: https://habr.com/ru/post/1343982/


All Articles