[Icecast-dev] Icecast stats.xml

Daniel James daniel.james at sourcefabric.org
Mon Oct 27 05:00:05 PDT 2014

Hi Roger,

> The way StreamLicensing.org does it, is to login (authenticate) as admin 
> on the shoutcast/icecast server, and in the case of Icecast-KH they just 
> retrieve the stats.xml

Login as admin is not ideal for this purpose because you may not want
your stats provider or licensing authority to have that much control
over your Icecast instances. It would be better to have a 'stats'
login/password that could only gather stats, nothing else.

> I.e: The IP, the ID, the Connected info. (and preferably the UserAgent too)

There are privacy issues here. Is it really necessary for the licensing
authority to have the timestamp/IP address/user agent of each listener?
Imagine the radio station might have political content which could get
listeners into trouble if the government of a certain country knew who
they were.

It might be better to look up the geolocation for each IP, then delete
the IP from the record. In most cases I know of, the licensing authority
only requires the headline numbers (such as aggregate tuning hours for
listeners in the US, in the case of SoundExchange).

Also, there are issues with polling stats every 60-90 seconds. This will
miss a lot of short duration listeners, which can give you useful

For example, if a particular user agent has lots of very short
connections, there could be a compatibility issue with the stream format
which you would want to know about. Or, people in a particular country
don't like your content as much as listeners in another country, so they
manually disconnect in the first minute.

One solution is to provide instantaneous stats by polling, so the radio
station has some live feedback, but for the detailed reports compile
daily, weekly or monthly stats from the full log.



More information about the Icecast-dev mailing list