File
mp3info.rb
Path: lib/mp3info.rb
Modified: Tue Mar 18 20:21:55 CET 2003

$Id: mp3info.rb,v 1.2 2003/03/18 19:21:55 moumar Exp $

Description

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

Download

get tar.gz at davedd.free.fr/ruby-mp3info/download/

Installation

  $ ruby install.rb config
  $ ruby install.rb setup
  # ruby install.rb install

Example

  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}"

Testing

Test::Unit library is used for tests. see testunit.talbott.ws/

 $ ruby test.rb

ToDo

Changelog

[0.1 17/03/2003]

License:Ruby
Author:Guillaume Pierronnet (moumar@netcourrier.com)
Website:davedd.free.fr/ruby-mp3info/
Classes and Modules

Class Mp3Info
Class Mp3InfoError
Class Mp3InfoInternalError