lemmin Posted October 27, 2007 Share Posted October 27, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/74949-id3-tags/ Share on other sites More sharing options...
lemmin Posted October 27, 2007 Author Share Posted October 27, 2007 Does anyone know of a different forum that would be more on topic for this sort of question? Quote Link to comment https://forums.phpfreaks.com/topic/74949-id3-tags/#findComment-379481 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.