Forums | Admin

Discussion Forums: open-discussion

Start New Thread Start New Thread
Message: 64874
BY: Vincent Carmona (vinc-mai)
DATE: 2009-02-16 17:54
SUBJECT: RE: APIC support

 

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.


Thread View

Thread Author Date
APIC supportJohn-Paul Harold2008-07-24 16:43
      RE: APIC supportGuillaume Pierronnet2008-08-14 15:10
            RE: APIC supportVincent Carmona2009-02-16 17:54
                  RE: APIC supportGuillaume Pierronnet2009-03-10 12:07

Post a followup to this message