views:

374

answers:

3

Is there a way to load ID3 tags in AS3 without loading sound?

+2  A: 

well you can simply start loading the sound, with bufferTime = 0, and when the id3 data is available, you just close the stream.

or, if the sound is distributed through a server, then the server could read out the ID3 and provide an API to get it.

greetz

back2dos

back2dos
hmm ok. Im going to try that out, and ill let you know. Thanks!
alvincrespo
A: 

Reading ID3 tags with AS3

http://www.socialvitamin.com/2009/04/03/reading-id3-tags-with-as3/

JeremySpouken
Yea I checked that link out before posting the question but you still need to open the Sound API, im trying to accomplish the same without loading the Sound API to save memory.
alvincrespo
@alvincrespo: you could also use a URLStream to load just the beginning of the file and then close the stream right after you got the ID3 header. however I am not very convinced your memory considerations make sense. also, does that mean, you'll never actually playback the sounds?
back2dos
A: 

Well using AS3 to read the ID3 Tags is probably not the way to go. You can of course use PHP, C#, Python or any other language to read the ID3 tags out of an MP3.

For instance you can have a PHP Script "id3Reader.php?file=mymp3.php" and will return an XML containing all the ID3 info, then you can parse that in AS3 which is rather quick. I recommend using caching in the PHP part or probably having a data store like mysql so you don't have to be reading the id3 tag over an over. Although PHP is a rotten language it does its job and for this kind of task it does it well.

Reading ID3 with PHP

http://php.net/manual/en/ref.id3.php

JeremySpouken