 |
Forums |
Admin Start New Thread
By: Vincent Carmona
RE: APIC support [ reply ] 2009-02-16 17:54
|
Hi.
I am trying to use ruby-mp3info to extract cover from tags.
I use almost the same code to extract cover with the 2.3.0 version. It would have save me some time if I had looked at the forum first.
I will now try to extract data from idv3v2.4.0 tag. In this version, frames can be parse using different encoding. The end of strings can be indicated by \000 or \000\000 so the Z* option of unpack method cannot be used in all cases. Do you know a convenient way to parsed data from utf16 strings?
I was thinking about:
text_encoding, mime_type, picture_type, data = Mp3Info.new("your_file.mp3").tag2["APIC"].unpack("c Z* c a*")
and then split data using /\000\000/ (but it will not be this easy as "\000\000\000" can appeared in data). Maybe there is an easy way but I do not see it for now (I am a newbie in haking).
Sorry for my poor english :( and thank for your work on this library.
|
By: Guillaume Pierronnet
RE: APIC support [ reply ] 2008-08-14 15:10
|
hi!
i didn't have planned support for all the tags in id3v2. This would be a pain since the id3 v2 standard is bloated and over-specified. Anyway, you can easily extract the data from the APIC tag with this snippet of code:
text_encoding, mime_type, picture_type, description, picture_data = Mp3Info.new("your_file.mp3").tag2["APIC"].unpack("c Z* c Z* a*")
look at http://www.id3.org/d3v2.3.0 section 4.15 for more infos.
bye
|
By: John-Paul Harold
APIC support [ reply ] 2008-07-24 16:43
|
Hi
is the APIC tag supported in mp3info? Specifically, I'm looking to extract an image.
Apologies if this is discussed elsewhere, I couldn't find any explicit mention of it.
jp
|
|
 |