Flex/AS3 and FMS getting id3 info from mp3′s

Posted on December 1, 2006 | 2 comments

There was a question on the FlashMedia mailing list about how to get id3 info from a NetStream with AS3 code. It is actually just like AS2 with some quirks to watch out for. The first is the supported ID3 tags:

About supported versions of ID3 tags

Flash Media Server supports playback of ID3 text tags in UTF-8, UTF-16, and ISO-8859-1 formats and supports ID3 versions 1.0, 2.3, and 2.4. Only tags that contain text data are supported, such as song title, artist name, comments, and year recorded.

I had a mp3 with ID3 v2.2 tags that did not work until I put in a v1.0 ID3 tag.

The next is the NetStream is not dynamic in AS3 and you use the client property to handle method calls from the server. There will be a onPlayerStatus and onId3 method call the server makes on the NetStream object.

Here is the running example and source code is available through the right click.

  • Rod Nolan

    Thanks, Renaun! Hindsight is always 20/20 and it makes such perfect sense when you look at it in retrospect but this one was a stumper for me.

    Thanks again!

  • balraj

    Hi, This is good example. But, Could you have some code that shows the bytes of the streamed mp3 or length of the mp3.
    If yes please help me.

    if no (:,

    with extreme hopes,