[icecast-dev] ice-metadata header incomplete?

msmith at labyrinth.net.au msmith at labyrinth.net.au
Mon Jan 13 21:21:34 PST 2003



Colin Snover <colin at zetafleet.com> said:

> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I'm trying to write a PHP script that communicates with the Icecast2 server
> directly to retrieve current song information. Since the documentation for
> the ICE/SHOUT protocol is, frankly, pretty much non-existant, I did a search
> on Google and eventually came up with this site:
> 	http://www.smackfu.com/stuff/programming/shoutcast.html
> 

If you're streaming mp3, and your streaming client supports setting metadata
on icecast2 servers (this requires, among other things, a version of icecast2
no more than two weeks old. I know of no source clients other than very recent
versions of oddsock that can do this correctly), then this should work. 

However, this is horrifically inefficient - you're getting the entire stream
even though you're interested solely in the metadata. It also only works for mp3.

If you're streaming ogg vorbis, then the metadata is transmitted in the actual
ogg vorbis data, according to the specification. You can read the
specification for details on how to make use of this.

A better way to do this is to request /admin/stats.xml from the server, and
parse the information you're interested in out of this (I think it's included,
though I haven't checked). You'll need to authenticate to get this document,
with username "source", and whatever password you have configured.

Mike

--- >8 ----
List archives:  http://www.xiph.org/archives/
icecast project homepage: http://www.icecast.org/
To unsubscribe from this list, send a message to 'icecast-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Icecast-dev mailing list