Recommend this page to a friend! |
All requests | > | Merge WAV files or convert MP3 to WAV... | > | Request new recommendation | > | Featured requests | > | No recommendations |
by Sameeroaf Bazivitch - 9 years ago (2014-11-02)
+1 | I was able to use file_get_contents and file_put_contents to merge a number of MP3 audio files into a single MP3 file successfully. I tried to do the same with WAV audio files, which I really need, but PHP takes the first WAV file and skips all the rest so the result is a WAV file with the first input wav file from the list. If that is difficult or not possible to merge WAV files, then I need to convert the MP3 file into WAV with the ability to change the sample rate if possible. |
+1 | by Manuel Lemos 24005 - 9 years ago (2014-11-02) Comment You can't merge multiple WAV files like you can with concatenating multiple MP3 because the WAV format header needs to be rebuilt to consider that your WAV audio data is made of multiple parts. MP3 is based on MPEG, so it is frame based and you can start playing frames from the middle of the stream. Anyway, the WAV creator class can compose the result WAV file made of multiple WAV files as you wish, so you do not need to convert to MP3. |
1. by Ramesh Narayan Jangid - 5 months ago (2024-05-01) Reply
This problem can be solved by installing a tool called ffmpeg (ffmpeg.org) on the server and the conversion commands can be triggered on shell via PHP. The command reference can be found on
ffmpeg.org/ffmpeg-all.html
This open-source tool covers operating majority of the media file (audio/video/images) types.
Recommend package | |
|