I’ve noticed that a few people lately have asked about converting mp3 audio files to wav files. Ideally, one would use MediaConverter. But that app is just plain broken.
I recently wrote a script for this using ffmpeg as the backend for the conversion. You can access a copy of this here:
https://dl.dropbox.com/s/t1uqe2xyigkemhg/m2w?dl=1
Of course, this is just a plain text file. Save it to /boot/common/bin (or somewhere else in your path) and make sure the executable bits are set.
Works like a charm, for me anyway, so others may find this useful.
Now… the big item. You may not have the ffmpeg binary on your system (probably don’t). Haiku comes with an ffmpeg plugin, used by the MediaPlayer, for example. But that’s a lib not the binary executable. So, you can grab a current one here:
This is the latest version compiled for Haiku AFAIK. Just download this and unzip to /boot.
However… this binary has a dependency on the SDL libs. You may not have those around, in which case it won’t run. To get those, run this:
installoptionalpackage sdllibs
This installs a BUNCH of stuff, so it make take a few minutes. A bunch of codecs, support libs, etc.
Once you have that you’re good to go right? Probably not. The libSDL-1.2.so gives (me anyway) a missing symbol error when trying to load. Shrugs
So, I downloaded the SDL Game Libraries from Haikuware. Here’s the link:
http://haikuware.com/directory/view-details/development/class-libraries/sdlgamelibraries-gcc4
After installing that, all works perfectly.
Now, could you skip the installoptionalpackage step and just use the SDL game libs? I’m not sure, but I don’t think so. Because the ffmpeg binary seems to want access to the libspeex and libvpx libraries which the haikuware package does not include. But I could be wrong about that. In any event, following the steps above should get you a working ffmpeg binary. Once you have this, my script should work fine.