[ID3 Dev] How do I deal with this problem COMM frame

Paul Taylor paul_t100 at fastmail.fm
Tue Apr 3 07:43:46 PDT 2007


Ben Bennett wrote:
> On Tue, Apr 03, 2007 at 06:34:54AM +0100, Paul Taylor wrote:
>   
>> Its V24, what are their different ways of writing frame sizes ?
>>     
>
> Welcome to syncsafe size hell.
>
> Basically, in 2.4 the frame sizes are written as syncsafe integers,
> whereas in 2.3 they were normal integers.
>
> http://id3.org/id3v2.4.0-structure has the full details (see section 4
> for the frame header info, and section 6.2 for the unsync integer info).
> The short version is:
>   If the size is 1000, then that is 0x03e8 (hex) which is:
>     00000000 00000000 00000011 10111000
>   But syncsafe numbers are basically spread out so they never put
>   values in the high bit of a byte (e.g. X0000000).  So the above
>   becomes:
>     00000000 00000000 00000110 10111000
>                              ^-- added
>   Which is the number 0x06e8 which is 1768 (decimal).
>   
Ben thanks for the example but not sure that I follow shouldnt it be

00000000 00000000 0000011*1* *0*0111000

,i.e bit 7 is always zero and what would be bit7 is shifted into the the 
next byte.

> The hell part arises because some software (iTunes) does not implement
> the spec correctly and reads and writes regular integers rather than
> unsyncronized ones when dealing with 2.4.  :-(
>
> 			-ben
>   
Oh dear, what have others done about this then. It also leads me to 
wonder whether I should even write v24Frame syncsafe integers by 
default. For ID3v23 I always unsynced the tag where required but because 
this caused a problem for Itunes Ive changed the default so that it 
doesnt write them unsynced.

paul


---------------------------------------------------------------------
To unsubscribe, e-mail: id3v2-unsubscribe at id3.org
For additional commands, e-mail: id3v2-help at id3.org



More information about the ID3v2 mailing list