Tuesday, April 12, 2011

SHARE - How to get mp3 information (id3v1 and id3v2 tags) using ruby-mp3info

how to install gem
    gem install ruby-mp3info
how to use
    require "mp3info"
    begin
      mp3=Mp3Info.open(file_full_path)
      mp3.tag.title
      puts mp3.tag.artist  
      puts mp3.tag.album
    rescue Exception => e
      puts e.inspect
    end
for more information you can see here
http://ruby-mp3info.rubyforge.org/

No comments:

Post a Comment