Ruby-mp3info 0.5

ruby-mp3info gives you access to low level informations on mp3 files
(bitrate, length, samplerate, etc…). It can read, write, remove id3v1
and
id3v2 tags. It is written in pure ruby.

This new version add the ability to read, write and delete tag2. I
would like to thanks Chris and all others contributors.

Get tar, zip and gems at http://ruby-mp3info.rubyforge.org/

example:

Mp3Info.open(“myfile.mp3”) do |mp3|
puts mp3.bitrate
puts mp3.length #length in seconds
#etc

puts mp3.tag.title
puts mp3.tag.artist
puts mp3.tag.album
puts mp3.tag.tracknum

puts mp3.tag2.TIT2
mp3.tag2.TIT2 = “my title”
end #tag is written at close()

Changelog:

[0.5 06/12/2005]

  • id3v2 writing and removing support added. tag2 attribute is r/w now
  • max guess size to find a valid frame set to 2Mb
  • implemented a new class ID3v2, ID2TAGS moved into it
  • Mp3Info.tag is r/w now and has priority over @tag1 and @tag2 when
    writing
  • added Mp3Info#rename() method to change the filename written at close
  • clean up: all overloaded standards classes replaced by including
    modules
  • FIXED bug in reading id3v2 tags tagged with olds versions of
    “mp3ext” ( MP3ext: MP3-Info extension )
  • FIXED bug on calculating id3v2 frame size
  • FIXED bug when multiple TLEN tags
  • FIXED bug when converting text tag from Unicode
  • FIXED bug: file was not closed, causing too many opened files and
    test failure on win32