Read/Write ID3v1.0 and ID3v1.1 Tags.

Small, short code snippets that other people may find useful. Do you have a good regex that you would like to share? Share it! Even better, the code can be commented on, and improved.

Moderator: General Moderators

Post Reply
fatihhood
Forum Newbie
Posts: 1
Joined: Mon Dec 29, 2003 3:20 am

Read/Write ID3v1.0 and ID3v1.1 Tags.

Post by fatihhood »

Hi,

This class that represents ID3v1.0 and ID3v1.1 tags. It can read, write, and remove tags in MP3 files.

Download : http://www.phpbuilder.com/snippet/detai ... et&id=1107

may the FORCE be with us!

may the PHP be with us!

.)
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post by JAM »

Interesting. Good work!
Do we see a v2 tag editor in the future?

(Personally, I have no idea how the ID tags work, so excuse me for asking ;))
dave420
Forum Contributor
Posts: 106
Joined: Tue Feb 17, 2004 8:03 am

Post by dave420 »

ID3v2 is pretty fun to get working under PHP, especially when you get it compliant with all the sub-versions. It's more complicated than V1, as it requires more binary knowhow.

ID3v1.x tags are stored as the last 128 bytes of the MP3 file. ID3v2 tags are more complicated, as they sit at the front of the file, and are variable-length. It uses a feature, called "sync-safe encoding" to make sure the ID3 tag isn't parsed as MP3 data (sync-safeing means making sure you have no bytes with the MSB set, so <128). It's a good topic for people to learn about binary file structures, especially as you can work with songs you like, and can see if it works almost instantly.

I wrote a class that handles ID3v1, 2.2 and 2.4 tags, so I could tame my mp3 collection :) good experience.
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

can i have it?
abshaw
Forum Commoner
Posts: 33
Joined: Thu Feb 19, 2004 7:14 pm

Post by abshaw »

Good effort,

Guys, if you have the version 2 editor done by now, it would be like a gift straight from heaven. anxiously awaiting.

8O 8O 8O
bg
Forum Contributor
Posts: 157
Joined: Fri Sep 12, 2003 11:01 am

Post by bg »

anyone got a link to the specs for each id version?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Post Reply