|
$Id: mp3info.rb,v 1.2 2003/03/18 19:21:55 moumar Exp $
ruby-mp3info gives you access to low level informations on mp3 files (bitrate, length, samplerate, etc...). It is written in pure ruby. This library doesn't fetch ID3 tags. For that, check raa for mp3tag
get tar.gz at davedd.free.fr/ruby-mp3info/download/
$ ruby install.rb config $ ruby install.rb setup # ruby install.rb install
require "mp3info" mp3info = Mp3Info.new("myfile.mp3") puts "MPEG #{info.mpeg_version} Layer #{info.layer} #{info.vbr ? "VBR" : "CBR"} #{info.bitrate} Kbps #{info.channel_mode} #{info.samplerate} Hz length #{info.length} sec. error protection #{info.error_protection}"
Test::Unit library is used for tests. see testunit.talbott.ws/
$ ruby test.rb
[0.1 17/03/2003]
License: | Ruby |
Author: | Guillaume Pierronnet (moumar@netcourrier.com) |
Website: | davedd.free.fr/ruby-mp3info/ |
Classes and Modules |