File
mp3info.rb
Path: lib/mp3info.rb
Modified: Thu Sep 04 20:25:31 CEST 2003

$Id: mp3info.rb,v 1.3 2003/09/04 18:25:31 moumar Exp $

Description

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

Download

get tar.gz at rubyforge.org/projects/ruby-mp3info/

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.2.1 04/09/2003]

[0.2 18/08/2003]

[0.1 17/03/2003]

License:Ruby
Author:Guillaume Pierronnet (moumar_AT__rubyforge_DOT_org)
Website:ruby-mp3info.rubyforge.org/
Classes and Modules

Class Mp3Info
Class Mp3InfoError