How to read id3 tags from files

Hi
I want to read (not write, change or other things, just read) id3 Tags
and flac tags from files. How do I do that? I found 2 libraries that
do something with id3 tags, but I didn’t understand it.

Hi Benedikt

On Thu, May 13, 2010 at 3:51 AM, Benedikt Müller [email protected]
wrote:

Hi
I want to read (not write, change or other things, just read) id3 Tags
and flac tags from files. How do I do that? I found 2 libraries that
do something with id3 tags, but I didn’t understand it.


Gruß, Benedikt

You should mention which libraries tried to use if you need help on
any of those. A quick googling led me here to id3lib-ruby
http://id3lib-ruby.rubyforge.org/ which have some example code
(haven’t use myself that library).

On Fri, May 14, 2010 at 01:23:48AM +0900, Benedikt M?ller wrote:

This was it I tried, but it can’t read flac tags.

using a quick google for “ruby flac tags”
I immediately found flacinfo…

$ irb
irb(main):001:0> require ‘flacinfo’
=> true
irb(main):002:0> @flac = FlacInfo.new(“test.flac”)
=> #<FlacInfo:0x-48ed2528 (STREAMINFO size=34 offset=8) (SEEKTABLE
size=486 offset=46) (VORBIS_COMMENT size=61 offset=536) (PADDING
size=4075 offset=601)>
irb(main):006:0> p @flac.tags
{“title”=>“tuxpower-06”, “vendor_tag”=>“reference libFLAC 1.1.2
20050205”, “block_size”=>61, “offset”=>536}
=> nil

This was it I tried, but it can’t read flac tags.

2010/5/13 Luis P. [email protected]:

great!

2010/5/13 Reid T. [email protected]: