RubyGems Navigation menu

ruby-mp3info 0.6.15

  • written in pure ruby

  • read low-level informations like bitrate, length, samplerate, etc…

  • read, write, remove id3v1 and id3v2 tags

  • correctly read VBR files (with or without Xing header)

  • only 2.3 version is supported for writings id3v2 tags

SYNOPSIS:

a good exercise is to read the test.rb to understand how the library works deeper

require "mp3info"
# read and display infos & tags
Mp3Info.open("myfile.mp3") do |mp3info|
  puts mp3info
end

# read/write tag1 and tag2 with Mp3Info#tag attribute
# when reading tag2 have priority over tag1
# when writing, each tag is written.
Mp3Info.open("myfile.mp3") do |mp3|
  puts mp3.tag.title   
  puts mp3.tag.artist   
  puts mp3.tag.album
  puts mp3.tag.tracknum
  mp3.tag.title = "track title"
  mp3.tag.artist = "artist name"
end

Mp3Info.open("myfile.mp3") do |mp3|
  # you can access four letter v2 tags like this
  puts mp3.tag2.TIT2
  mp3.tag2.TIT2 = "new TIT2"
  # or like that
  mp3.tag2["TIT2"]
  # at this time, only COMM tag is processed after reading and before writing
  # according to ID3v2#options hash
  mp3.tag2.options[:lang] = "FRE"
  mp3.tag2.COMM = "my comment in french, correctly handled when reading and writing"
end

Versions:

  1. 0.8.5 - September 17, 2014 (78 KB)
  2. 0.8.4 - April 26, 2014 (77 KB)
  3. 0.8.3 - January 18, 2014 (77 KB)
  4. 0.8.2 - November 20, 2013 (26 KB)
  5. 0.8.1 - October 28, 2013 (26 KB)
Show all versions (29 total)

Development Dependencies:

Authors:

  • Guillaume Pierronnet

Owners:

8fae5b9c9ffd332a24ff71a339fa6310

Total downloads 95,149

For this version 6,859

Show all versions (29 total)

Required Ruby Version: None

Licenses:

N/A

Gemfile:
gem 'ruby-mp3info', '~> 0.6.15' = Copy to clipboard Copied!

install:
gem install ruby-mp3info -v 0.6.15 = Copy to clipboard Copied!

Links: