<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v =
"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word" xmlns:st1 =
"urn:schemas-microsoft-com:office:smarttags"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2802" name=GENERATOR><!--[if !mso]>
<STYLE>v\:* {
BEHAVIOR: url(#default#VML)
}
o\:* {
BEHAVIOR: url(#default#VML)
}
w\:* {
BEHAVIOR: url(#default#VML)
}
.shape {
BEHAVIOR: url(#default#VML)
}
</STYLE>
<![endif]--><o:SmartTagType name="PersonName"
namespaceuri="urn:schemas-microsoft-com:office:smarttags"></o:SmartTagType><!--[if !mso]>
<STYLE>
st1\:*{behavior:url(#default#ieooui) }
</STYLE>
<![endif]-->
<STYLE>
<!--
/* Font Definitions */
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:blue;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:Arial;
color:navy;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
{page:Section1;}
-->
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=blue link=blue bgColor=#ffffff>
<DIV><FONT face=Arial size=2>The sync-signal has a byte pattern of 0xFFE0.
Scanning the file stream for this pattern will reveal the position of the first
frame within the mp3 file.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Andy.</FONT></DIV>
<BLOCKQUOTE
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=mitch@honnert.com href="mailto:mitch@honnert.com">Mitchell S.
Honnert</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> Wednesday, January 25, 2006 7:35
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> RE: [ID3 Dev] First byte of the
first frame: the inevitable byte (revised)</DIV>
<DIV><BR></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">If all you want to do is find the
first audio frame, you don’t necessarily need to know the ID3v2 tag
length. (If you do need the length, it’s clearly spelled out in the
spec.) Do a search on MPEG header and you’ll find the byte pattern which
identifies the start of an audio frame. One location for this
information is at http://www.mp3-tech.org/ in the Programmer’s Corner
section. (In writing my .NET tag editor library, I decided to add
support for MPEG data like bit rate and frequency, and this is the page I used
as a reference.)<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">Mitchell S.
Honnert<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">www.UltraID3Lib.com<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<DIV>
<DIV class=MsoNormal style="TEXT-ALIGN: center" align=center><FONT
face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
<HR tabIndex=-1 align=center width="100%" SIZE=2>
</SPAN></FONT></DIV>
<P class=MsoNormal><B><FONT face=Tahoma size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">From:</SPAN></FONT></B><FONT
face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"> Silas
Pradetto [mailto:silas@sonoroussound.com] <BR><B><SPAN
style="FONT-WEIGHT: bold">Sent:</SPAN></B> Wednesday, January 25, 2006 2:22
PM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> <st1:PersonName
w:st="on">id3v2@id3.org</st1:PersonName><BR><B><SPAN
style="FONT-WEIGHT: bold">Subject:</SPAN></B> [ID3 Dev] First byte of the
first frame: the inevitable byte (revised)</SPAN></FONT><o:p></o:p></P></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P>
<TABLE class=MsoNormalTable cellPadding=0 border=0>
<TBODY>
<TR>
<TD
style="PADDING-RIGHT: 0.75pt; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; PADDING-TOP: 0.75pt"
colSpan=2>
<P class=MsoNormal style="MARGIN-BOTTOM: 12pt"><FONT
face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">thanks, the
files encoded by different encoders I would consider to be different, i
only want to detect files that i may have downloaded twice and are in
different dirs, and someone may have changed the tag on one not the
other, but the file is the same otherwise. thanks for the suggestion on
the already-done dup remover, as i have no real time for writing this
stuff anymore, the other question is how to find the length of the ID3v2
tag???<BR><BR>thanks
again,<BR><BR>silas<o:p></o:p></SPAN></FONT></P></TD></TR>
<TR>
<TD
style="PADDING-RIGHT: 0.75pt; PADDING-LEFT: 0.75pt; BACKGROUND: blue; PADDING-BOTTOM: 0.75pt; WIDTH: 0.1in; PADDING-TOP: 0.75pt"
width=10 bgColor=blue>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"> <o:p></o:p></SPAN></FONT></P></TD>
<TD
style="PADDING-RIGHT: 0.75pt; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; PADDING-TOP: 0.75pt">
<P class=MsoNormal style="MARGIN-BOTTOM: 12pt"><FONT
face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">If you
really want to reinvent the wheel you can -- you have to determine how
long the ID3v2 tag is, skip that, then read the rest of the file
(excepting the last 256 bytes if it has an ID3V1 tag). How you do this
depends entirely on the library (if any) you use. Note that if all you
do is a byte-by-byte comparison then you still won't detect dupes if the
files were encoded by different encoders, or at different bitrates, or
various other issues. <BR><BR>If you don't want to reinvent the wheel,
then go take a look at <A
href="http://musicbrainz.org">musicbrainz.org</A> -- they've already
done this. And taken care of the various issues I listed
above.<o:p></o:p></SPAN></FONT></P>
<DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">On 1/25/06, <B><SPAN
style="FONT-WEIGHT: bold">Silas Pradetto</SPAN></B> <<A
href="mailto:silas@sonoroussound.com">silas@sonoroussound.com</A>>
wrote:<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt">I recently became added to this system of
emails, and I am trying to write a program to find duplicates in MP3's.
I wish to only take into consideration the actual song data, not bytes
of any tags. Therefore, how do I find the first byte in the file of
actual song data, ie the first byte of the first frame? I want to be
able to detect duplicates that have different tags but are the exact
same audio information. Also, to make the program faster, I would like
to know where to find certain info such as bitrate, length in seconds,
etc, so when I am scanning my 100000 song library I don't have to check
bytes if the songs are obviously dissimilar. Thanks very much. Oh, and I
mostly do VB 6, though I do know some C++, so if you are going to talk
about file I/O stuff please refer to VB if you can.
<BR><BR>Silas<BR>---------------------------------------------------------------------
To unsubscribe, e-mail: <IMG id=_x0000_i1025 height=32
src="data:image/bmp;base64,Qk1GAgAAAAAAADYAAAAoAAAAEAAAAAsAAAABABgAAAAAABACAADEDgAAxA4AAAAAAAAAAAAAODjaODjap6f5p6f5p6f5p6f5p6f5p6f5p6f5p6f5p6f5p6f5p6f5p6f5ODjaODjaODjaODja4uL/////////////////////////////////////////4uL/ODjaODjaODjaODjap6f54uL/////////////////////////////////4uL/p6f5ODjaODjaODjaODja4uL/p6f54uL/////////gYHygYHy////////4uL/p6f54uL/ODjaODjaODjaODja////4uL/p6f5trb/gYHyWlrpWlrpgYHytrb/p6f54uL/////ODjaODjaODjaODja////////trb/gYHyWlrpODjaODjaWlrpgYHytrb/////////ODjaODjaODjaODja////////gYHyWlrpODjatrb/trb/ODjaWlrpgYHy////////ODjaODjaODjaODja////gYHyWlrpODjatrb/////////trb/ODjaWlrpgYHy////ODjaODjaODjaODjagYHyWlrpODjatrb/////////////////trb/ODjaWlrpgYHyODjaODjaODjaODjaODjaODjatrb/////////////////////////trb/ODjaODjaODjaODjaODjaODjaODjagYHyp6f5p6f5p6f5p6f5p6f5p6f5p6f5p6f5gYHyODjaODjaODja"
width=32 border=0><A
href="mailto:id3v2-unsubscribe@id3.org">id3v2-unsubscribe@id3.org</A>
For additional commands, e-mail: <IMG id=_x0000_i1026 height=32
src="data:image/bmp;base64,Qk1GAgAAAAAAADYAAAAoAAAAEAAAAAsAAAABABgAAAAAABACAADEDgAAxA4AAAAAAAAAAAAAODjaODjap6f5p6f5p6f5p6f5p6f5p6f5p6f5p6f5p6f5p6f5p6f5p6f5ODjaODjaODjaODja4uL/////////////////////////////////////////4uL/ODjaODjaODjaODjap6f54uL/////////////////////////////////4uL/p6f5ODjaODjaODjaODja4uL/p6f54uL/////////gYHygYHy////////4uL/p6f54uL/ODjaODjaODjaODja////4uL/p6f5trb/gYHyWlrpWlrpgYHytrb/p6f54uL/////ODjaODjaODjaODja////////trb/gYHyWlrpODjaODjaWlrpgYHytrb/////////ODjaODjaODjaODja////////gYHyWlrpODjatrb/trb/ODjaWlrpgYHy////////ODjaODjaODjaODja////gYHyWlrpODjatrb/////////trb/ODjaWlrpgYHy////ODjaODjaODjaODjagYHyWlrpODjatrb/////////////////trb/ODjaWlrpgYHyODjaODjaODjaODjaODjaODjatrb/////////////////////////trb/ODjaODjaODjaODjaODjaODjaODjagYHyp6f5p6f5p6f5p6f5p6f5p6f5p6f5p6f5gYHyODjaODjaODja"
width=32 border=0><A
href="mailto:id3v2-help@id3.org">id3v2-help@id3.org</A>
<o:p></o:p></SPAN></FONT></P></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P></TD></TR></TBODY></TABLE>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P></DIV>---------------------------------------------------------------------
To unsubscribe, e-mail: id3v2-unsubscribe@id3.org For additional commands,
e-mail: id3v2-help@id3.org </BLOCKQUOTE></BODY></HTML>