[ID3 Dev] Finding the end of an ID3 Header
Robert Sewell
rsewell at SESAC.com
Mon Nov 6 13:58:41 PST 2006
Hello,
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:
49 44 33 03 00 00 00 01 79 76 57 4F 41 46
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.
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?
Thanks in advance,
Robert Sewell
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 at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.id3.org/pipermail/id3v2/attachments/20061106/2b5d958b/attachment.html>
More information about the ID3v2
mailing list