[ID3 Dev] Help request

Robert Manson rmanson at gracenote.com
Fri Aug 4 13:46:42 PDT 2006

Is this a 2.2, 2.3 or 2.4 tag?

ID3 v2.4 is the only standard that uses synchsafe frame sizes - although
iTunes breaks with the standard and uses un-syncsafe frame sizes.



From: Pisacreta Michele [mailto:info at pisacretamichele.it] 
Sent: Friday, August 04, 2006 1:30 PM
To: id3v2 at id3.org
Subject: [ID3 Dev] Help request



I am Michele from Italy.


I'm developing a little mp3 player (  c# /.NET ) able to read ID3 tag
(ver 2.x).

I'm not going to use UltraID3Lib
<http://home.fuse.net/honnert/hundred/?UltraID3Lib>   because i'm trying
developing my own library.


The trouble i have is about 'synchsafe integer'.


On www.id3.org web site I've found:

An ID3v2 tag can be detected with the following pattern:
$49 44 33 yy yy xx zz zz zz zz
Where yy is less than $FF, xx is the 'flags' byte and zz is less than


ID3v2 size             4 * %0xxxxxxx

My routine to evaluate synchsafe integer seems to work correctly....

Application read correctly all frames supported ( GEOB and APIC too...)

but in some files i've found a frame (Always a PRIV) sized more than $7F
in last size byte. (eg $8A).


this is an example I've found:


ID3v2   Header Unsynchronisation flag           : 0;

ID3v2   Header Extended header flag             : 0;

ID3v2   Header Experimental indicator flag    : 0;

ID3v2   Header Footer present flag                 : 0;




PRIV .... ..WM/UniqueFileIdentifier.A.M.G.a._.i.d.=.R. . . .
.;.A.M.G.p._.i.d.=.P. . . . . .;.A.M.G.t._.i.d.=.T. .

|----- 10
----------------------- 138



Value of .... is $00 00 00 8A  



using synchsafe integer my routine doesn't returns 138 but 266, so
application skips next frames...

if I convert frame size using standard procedure it works....


So how i can prevent it?

Can you help me?


Thanks and excuse me for my english...


Michele Pisacreta.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.id3.org/pipermail/id3v2/attachments/20060804/4e1cc3da/attachment.html>

More information about the ID3v2 mailing list