MP3 - ID 2 or 3 tags

Can anyone give me a hint how to pull MP3 ID tags out of the file ?
I'm guessing, it's just part of the header information. I'm going to
dig around ruby-lang.org but just in case thought to ask here as well.

TIA
Stuart

I found the ID3lib on rubyforge which looks pretty good. Could I just
forgoe the library though and do this through standard FILE class ?

Stuart

···

On 7/6/06, Dark Ambient <sambient@gmail.com> wrote:

Can anyone give me a hint how to pull MP3 ID tags out of the file ?
I'm guessing, it's just part of the header information. I'm going to
dig around ruby-lang.org but just in case thought to ask here as well.

TIA
Stuart

Can anyone give me a hint how to pull MP3 ID tags out of the file ?

Have you tried ruby-mp3info ?

http://ruby-mp3info.rubyforge.org/

I've used it a bit and it worked fine for my needs.

···

--
Jon Egil Strand
Phone: +47 98232340
jes@luretanker.no

Dark Ambient wrote:

I found the ID3lib on rubyforge which looks pretty good. Could I just
forgoe the library though and do this through standard FILE class ?

Stuart

Can anyone give me a hint how to pull MP3 ID tags out of the file ?
I'm guessing, it's just part of the header information. I'm going to
dig around ruby-lang.org but just in case thought to ask here as well.

TIA
Stuart

Funny advice on a Ruby list, I know, but Practical Common Lisp has exactly this as an example :slight_smile:

http://www.gigamonkeys.com/book/practical-an-id3-parser.html

···

On 7/6/06, Dark Ambient <sambient@gmail.com> wrote:

--
Alex

Dark Ambient wrote:

I found the ID3lib on rubyforge which looks pretty good. Could I just
forgoe the library though and do this through standard FILE class ?

Stuart

Hey,

I wouldn't recommend doing the parsing yourself, because there are various versions of the ID3 standard (ID3v1, ID3v2.2.0, ID3v2.3.0, etc) and ID3v2 is not a too simple format. The difficulty of doing it yourself depends on what files you have and whether you also want to be able to write ID3 data or not.

Rather use a library for the task, here are two you can try:

http://rubyforge.org/projects/id3lib-ruby/
http://rubyforge.org/projects/ruby-mp3info/

id3lib-ruby is based on the id3lib C++ library, so you have an additional dependency there. Other than that, I'm its developer and can recommend it of course :wink:

ruby-mp3info is written in Ruby, so you don't have any additional dependencies. I don't know very much about its interface or stability, but give it a try.

Regards,
   Robin Stocker

Alex Young wrote:

Funny advice on a Ruby list, I know, but Practical Common Lisp has exactly this as an example :slight_smile:

Practical: An ID3 Parser

It's a good book, even if all you plan on doing is Ruby code.

···

--
James Britt

"People want simple stories."

I was thinking the exact same thing.

···

On Jul 6, 2006, at 9:31 AM, Alex Young wrote:

Dark Ambient wrote:

I found the ID3lib on rubyforge which looks pretty good. Could I just
forgoe the library though and do this through standard FILE class ?
Stuart
On 7/6/06, Dark Ambient <sambient@gmail.com> wrote:

Can anyone give me a hint how to pull MP3 ID tags out of the file ?
I'm guessing, it's just part of the header information. I'm going to
dig around ruby-lang.org but just in case thought to ask here as well.

TIA
Stuart

Funny advice on a Ruby list, I know, but Practical Common Lisp has exactly this as an example :slight_smile:

Practical: An ID3 Parser

--
Alex

I found yours first and played around a bit ,seemed to work well.

Stuart

···

On 7/6/06, Robin Stocker <robin@nibor.org> wrote:

id3lib-ruby is based on the id3lib C++ library, so you have an
additional dependency there. Other than that, I'm its developer and can
recommend it of course :wink:

Interesting , this little exercise could turn into something way bigger.

Stuart

···

On 7/6/06, James Britt <james.britt@gmail.com> wrote:

Alex Young wrote:

>>>
> Funny advice on a Ruby list, I know, but Practical Common Lisp has
> exactly this as an example :slight_smile:
>
> Practical: An ID3 Parser
>

It's a good book, even if all you plan on doing is Ruby code.

--
James Britt

"People want simple stories."