View previous topic :: View next topic |
Author |
Message |
LerkeR Guest
|
Posted: Sun Apr 02, 2006 1:53 am Post subject: Flash + MP3 Streaming + ID3 Tags |
|
|
So, I'm making a flash app for my site that streams off my icecast2 station. I have it working so that it plays the songs, but heres my question:
Does anyone know how to get the ID3 tags from it?
I've tried the basics of getting them from an MP3 file but can't seem to get it to work. |
|
Back to top |
|
|
MikeS Code Warrior
Joined: 29 Jun 2005 Posts: 73 Location: Barcelona, Spain
|
Posted: Sun Apr 02, 2006 10:32 am Post subject: |
|
|
An icecast stream does not contain ID3 tags.
The flash client is not, to my knowledge, capable of requesting or using the shoutcast-style inline metadata (which is, may I say, a horrendous hack - what a nasty protocol!) used by icecast servers.
Mike |
|
Back to top |
|
|
LerkeR Guest
|
Posted: Sun Apr 02, 2006 1:25 pm Post subject: |
|
|
MikeS wrote: |
An icecast stream does not contain ID3 tags.
The flash client is not, to my knowledge, capable of requesting or using the shoutcast-style inline metadata (which is, may I say, a horrendous hack - what a nasty protocol!) used by icecast servers.
Mike |
Okay, I wasn't sure weither icecast used ID3 tags, but I didn't know what else to call them.
So there is no way to obtain the artist and track title data from the stream through flash? |
|
Back to top |
|
|
Anonymous Guest
|
Posted: Sun Apr 02, 2006 2:19 pm Post subject: |
|
|
Well, I was just looking at the web status page of the server and noticed it says the artist & track title. Looking at the status.xsl data I see this:
Code: |
<td>Current Song:</td>
- <td class="streamdata">
- <xsl:if test="artist">
<xsl:value-of select="artist" />
-
</xsl:if>
<xsl:value-of select="title" />
</td>
|
Is it possible to somehow have flash read the artist and title values? |
|
Back to top |
|
|
ice_bear Guest
|
Posted: Tue Apr 11, 2006 2:37 pm Post subject: icecast streamign id3 |
|
|
can anyone explain the reason (in technical terms) why icecast/shoutcast do not stream id3 tags? from the players point-of-view an id3 frame should not cause problems with the stream, it will be parsed/ignored and the player should move on to the next valid "data" frame, right?
thanks. |
|
Back to top |
|
|
aguenter Guest
|
Posted: Thu Apr 13, 2006 5:10 am Post subject: |
|
|
LerkeR wrote: |
Well, I was just looking at the web status page of the server and noticed it says the artist & track title. Looking at the status.xsl data I see this:
Code: |
<td>Current Song:</td>
- <td class="streamdata">
- <xsl:if test="artist">
<xsl:value-of select="artist" />
-
</xsl:if>
<xsl:value-of select="title" />
</td>
|
Is it possible to somehow have flash read the artist and title values? |
Sure, have Flash read status.xsl as an XML object and use the onData handler to extract the plain text. Then, you can parse the string as you wish. |
|
Back to top |
|
|
karlH Code Warrior
Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Thu Apr 13, 2006 11:45 am Post subject: Re: icecast streamign id3 |
|
|
ice_bear wrote: |
can anyone explain the reason (in technical terms) why icecast/shoutcast do not stream id3 tags? from the players point-of-view an id3 frame should not cause problems with the stream, it will be parsed/ignored and the player should move on to the next valid "data" frame, right?
thanks. |
If a source client places ID3 tags midstream then icecast will ignore it and pass it through to the player. Many ID3 tags though are placed at the end of the files that are read by the source client.
karl |
|
Back to top |
|
|
Anonymous Guest
|
|
Back to top |
|
|
Anonymous Guest
|
Posted: Thu Sep 27, 2007 10:21 pm Post subject: Thanks for all the ideas.. |
|
|
Ultimately, I ended up with this:
http://www.sheer.us/code/flex/wshr.mxml
I used a mod of Rich43's solution for metadata, although I parse the status out in the php, and wiiamp's solution for the memory leak issue. Thanks, all. |
|
Back to top |
|
|
|