Mostly,we listen audio files in mp3 ,but sometime we have the audio in other formats.Then how to trancoding it to mp3?
And again using powerful ruby library always help us.Like today I'd like to show you guys with
R2mp3 library which intends to convert all audio files on the planet to mp3 with super simple Ruby code and currently support wma,m4a(aac),ra(rm).
Requirement software
(on Ubuntu)
$sudo apt-get install mplayer lame
(on OS X)
$sudo port install mplayer lame
Install the library
$sudo gem install r2mp3
or
$svn checkout http://r2mp3.rubyforge.org/svn/trunk/ r2mp3
Start Coding
require 'rubygems' # if install using gem require 'r2mp3' Converter.new(:convert=>:wma,:file=>"test.wma"){|f| f.to_mp3 }
test.mp3 is already there.Thanks R2mp3.
We don't need to download any fancy gui programs,do we? :)
Here are Ten libraries you must have in the box.
1. Zlib
2. Digest::MD5
3. StringIO
4. Tempfile
5. Readline
6. Find
7. YAML
8. dbm
9. Pathname
10. OptionParser
Fully pointed out by [Doug Beaver]
(It's a bit old article,but it's all great libs)

