I have WAV data that I would like to convert to MP3 on the fly using a PHP script. A WAV file starts with a script, so it does not run as a file.
I can run something like this:
exec( "lame --cbr -b 32k in.wav out.mp3" );
But for this you will need to first write in.wav to disk, read .mp3 from disk, and then clear it when I finish. I would rather not do this. Instead, I have a wav file stored in $ wav, and I would like to run it through LAME so that the resulting data is then saved in $ mp3.
I saw links to the FFMPEG PHP library, but I would prefer not to install any additional libraries for this task, if possible.
source share