<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1561" name=GENERATOR>
<STYLE>@font-face {
font-family: Trebuchet MS;
}
@font-face {
font-family: Tahoma;
}
@page Section1 {size: 8.5in 11.0in; margin: .6in .8in .6in .8in; }
P.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Trebuchet MS"
}
LI.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Trebuchet MS"
}
DIV.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Trebuchet MS"
}
A:link {
COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
COLOR: windowtext; FONT-FAMILY: Arial; mso-style-type: personal-compose
}
DIV.Section1 {
page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=purple link=blue bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Your calculation of the indicated size of the ID3v2
tag seems correct to me. However, it's pretty hard to guess at what might
be going on without having more of the file (or at least the beginning of the
"real" mp3 file) to examine. It could be a tag header doesn't give the
correct size of the tag. Or there could be a problem with the mp3
file.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I would guess that most mp3 players (at least the
good ones) do use some kind of search for the frame sync.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Jim Martin</FONT></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=rsewell@SESAC.com href="mailto:rsewell@SESAC.com">Robert Sewell</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=id3v2@id3.org
href="mailto:id3v2@id3.org">id3v2@id3.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, November 06, 2006 4:58
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [ID3 Dev] Finding the end of an
ID3 Header</DIV>
<DIV><BR></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hello,<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I have a need to verify that mp3
files uploaded by our users comply with certain minimum specs (bit and sample
rates, etc.). To get to the mp3 headers, I first have to check for an
ID3 tag, and if found, use bytes 6-9 to calculate the location of the first
mp3 frame. My routine seems to work in most cases. However, I’ve
got one mp3 files that doesn’t seem to fit the specs, and fails my
verification process, although all mp3 players play the file without a
problem. Below are the first 13 bytes of the
file:<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">49 44 33 03 00 00 00 01 79 76 57
4F 41 46<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">If I am interpreting the ID3 specs
correctly, the first mp3 frame should be found at offset 7D00. However,
I only find 00 there; the first mp3 is really at
7EA1.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Am I missing something? Or
did the program that added the ID3 tag miscalculate the ID3v2 size
bytes? If the latter, do all players allow for mistakes and just start
hunting for the 11-bit frame sync?<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Thanks in
advance,<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><STRONG><B><FONT face=Tahoma size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">Robert
Sewell</SPAN></FONT></B></STRONG><o:p></o:p></P>
<P class=MsoNormal><FONT face="Trebuchet MS" size=3><SPAN
style="FONT-SIZE: 12pt"> </SPAN><o:p></o:p></FONT></P>
<P class=MsoNormal><FONT face="Trebuchet MS" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P></DIV><PRE>If you do not wish to receive future commercial e-mail messages from SESAC, you may send an e-mail message from this address to optout@sesac.com
CONFIDENTIALITY NOTICE: This e-mail transmission, and any documents, files, or other e-mail messages attached to it, may contain confidential information that is legally privileged. If you are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of any of the information contained in or attached to this message is STRICTLY PROHIBITED. If you have received this transmission in error, please immediately notify the sender via e-mail or by telephone at 615.320.0055 and destroy the original transmission and its attachments without reading them or saving them to disk.
</PRE></BLOCKQUOTE></BODY></HTML>