Any good libraries for transcoding audio, preferably with a Ruby API? I'm thinking "like ImageMagick, but for audio files."
I'm working on a project for the iPhone and iPod Touch (will announce on Projects when it gets approved) that involves the use of MP3 files. For my purposes, I don't need high-quality content - in fact, it'd be better if I could reduce the size of the files in question.
I've written a Ruby on Rails web application to support the iPhone app. Currently it stores MP3s as blobs in the database. I'd like to transcode the MP3s within the Rails app.
My preferred solution would be to have some Ruby code that looked kind of like the following:
def transcoded_audio # returns data for transcoded MP3
original_audio = AudioFile.new(content_blob)
original_audio.transcode(:format => 'mp3', :bitrate => 65536) unless original_audio.bitrate <= 65536
end
I've got a funny feeling that I'll have to screw around directly with LAME, but if there's something out there that wraps it nicely, I'd really like to know about it!
posted by flabdablet's sock puppet at 6:44 PM on March 25, 2009