Jump to content

Recommended Posts

I have written some code that grabs any any and all ID3 tags in a file. It works fine unless the file includes the tag "APIC" which holds an encoded image. The problem is that the bytes that I read the size from show less than half of what the actual size of that tag is. For example, the tag will say the size is 7415, but if I count the characters in the tag, there are 14978, or so. On the ID3 website they explain synchronization briefly, but what I get from it doesn't seem to make sense. It says to replace all occurances of %11111111 00000000 111xxxxx with %11111111 111xxxxx and all occurances of $FF 00 00 with $FF 00. I used some regex to do this and it found and replaced two occurance. Since that only lowered the size by two bytes, I don't think this is correct, since it obviously didn't fix anything anyway.

 

I guess this really isn't a PHP question, but I really would appreciate it if someone could point me to somewhere that could help me. An example of unsynchronization, if that is what the problem is, would be great.

 

Thanks for any help.

Link to comment
https://forums.phpfreaks.com/topic/74949-id3-tags/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.