I want to quickly scan an Mp3 file and get its song name, artist etc info before playing. For ID3tag V1, I can search from the file beginning and end. For tags of other version, is there a good way to find them without actually decoding?
Thanks.
-Jane
__________________________________________________ Do you Yahoo!? Yahoo! Web Hosting - Let the expert host your site http://webhosting.yahoo.com
On Wednesday, November 13, 2002, at 06:22 PM, Jane Zhao wrote:
I want to quickly scan an Mp3 file and get its song name, artist etc info before playing. For ID3tag V1, I can search from the file beginning and end. For tags of other version, is there a good way to find them without actually decoding?
ID3v1 tags always appear in the last 128 bytes of the file. ID3v2 tags prior to ID3v2.4 can only appear at the beginning of the file.
ID3v2.4 tags can legally appear anywhere, but in practice you'll usually only find them in one of two places:
1. at the beginning of the file.
2. at the end of the file, before any ID3v1 tag. Read the last 10 bytes of the file or the 10 bytes before the ID3v1 tag; a valid ID3 tag footer will contain the tag length which you can use as a negative offset to locate the start of the tag.