[ID3 Dev] Syncsafe integers and 2.3/2.4
Ion Todirel
iontodirel at yahoo.co.uk
Mon Aug 22 07:00:37 PDT 2005
Slow, please
First you cannot determine if is syncsafe or not! based on MSB in all bytes. Second in your library you only can put an option to read frame size as syncsafe or as normal integers, you cannot read ID3v2.3 or ID3v2.4 as normal because iTunes write these information as normal integers, look how WindowsMedia Player or Winamp write these, if what you say is true then iTunes does'n support ID3v2 standard.
Ben Bennett <fiji at ayup.limey.net> wrote:
On Mon, Aug 22, 2005 at 05:40:51AM +0100, Ion Todirel wrote:
> To Ben Bennett:
>
> Both 2.3 and 2.4 use Syncsafe integers. ID3v2.4 its a nice one, i
> recommend you to implement yourself ID3v2.4/Reader-Writer and threat
> there your syncsafe problems, also if you you have problems with
> syncsafe email me, i develop some nice methods.
Strictly speaking both do. But they use them in different places.
Look at the document detailing the changes from 2.3 to 2.4 [1]. It
explicitly says:
Unsynchronisation [S:6.1] is done on frame level, instead of on tag
level, making it easier to skip frames, increasing thestreamability
of the tag. The unsynchronisation flag in the header [S:3.1]
indicates if all frames has been unsynchronized, while the new
unsynchronisation flag in the frame header [S:4.1.2] indicates
unsynchronisation. To avoid false synchronisations in the frame
* header the size description and flag field has been rewritten [S:4].
Resynchronisation of the complete tag when the unsynchronisation flag
in the tag header is set might result in a corrupt tag.
The line marked with * is the change that we are discussing. Prior to
2.4 the frame size was a 32 bit integer. In 2.4 it is a 28 bit
syncsafe integer. However, if you generate a large frame in iTunes
and save the tag as 2.4 you will see that the frame size is not syncsafe.
Please tell me how you reliably determine the frame size in 2.4. I
have a bunch of heuristics that are inefficient and annoying:
- Look at the bit pattern to see if it has 1s where a true syncsafe
integer ought to have 0s
- Check to make sure we are at the end of the tag (or in the
padding), or at the start of the next frame. And if not, treat it as
a non-syncsafe int and see if it is better
I have excahnged email with the author of the Godfather tagging
program and he only supports reading of 2.4 tags. He will only write
to the 2.3 because the 2.4 implementation is too messed up by various
people.
Which is too bad since 2.4 supports UTF-8 which I want. I think it
would be cool to release a 2.3.1 version that supports the UTF-8
encoding. And I think htere needs to be a 2.4.1 release that just
updates unclear portions of the 2.4 spec and makes sure that people
know that frame sizes are sync-safe now.
-ben
[1] http://www.id3.org/id3v2.4.0-changes.txt
---------------------------------------------------------------------
To unsubscribe, e-mail: id3v2-unsubscribe at id3.org
For additional commands, e-mail: id3v2-help at id3.org
---------------------------------
Yahoo! Messenger NEW - crystal clear PC to PC calling worldwide with voicemail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.id3.org/pipermail/id3v2/attachments/20050822/076b48c8/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Class1.cs
Type: application/octet-stream
Size: 3261 bytes
Desc: 1434560400-Class1.cs
URL: <http://lists.id3.org/pipermail/id3v2/attachments/20050822/076b48c8/attachment.obj>
-------------- next part --------------
---------------------------------------------------------------------
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