[Icecast] Listener statistics on a fallback stream

Yahav Shasha yahav.shasha at gmail.com
Sun Dec 6 06:27:52 PST 2015


>
> >Hmm, you have a point there. But the point is, the *listeners* connect
> to a certain mount point; I want to count them there. What's happening
> behind the scenes to get the music to them (be it a fallback stream or even
> a file played from disk) is irrelevant.
> >I'm beginning to think this is a 'feature' of IceCast with unintended
> consequences...


Well i will let the people who actually know the code answer that, however,
you must keep in mind that while you (and myself btw) use the fallback
mechanism for that autodj/live switch, the fallback feature have many other
uses for which the required behaviour in our case would be wrong, so
programming IceCast to behave in this specific way you desire will be
rather "limiting".
instead, you can always configure your server
to achieve different behaviour.
so assuming that creating that script we talked about is off-limits, you
said you hide the fallback mounts  because you don't want them to show at
the user statistics page? simply change the user statistic file to only
show statistics from mounts you want to show, unhide the fallbacks and
solve your problem.
also, maybe there's even a way to actually do show stats from hidden
mount-points by some xslt code..if so, you can use xsl:if to detect if live
source is connected and serve the right mount-point stats.


On Sun, Dec 6, 2015 at 3:41 PM, Jeroen van Oosten <jvoosten at bankai.nl>
wrote:

> Hello,
>
> On 06-12-15 13:58, Yahav Shasha wrote:
>
> >To me it sounds like a bug; surely the fallback never needs statistics,
>> only the real steam because this is where listeners connect to.
>
>
> Well, the fallback mount is still a mount-point nonetheless. you could
> still use it as a "regular" mount-point even if its configured as a
> fallback to another.
>
>
> Hmm, you have a point there. But the point is, the *listeners* connect to
> a certain mount point; I want to count them there. What's happening behind
> the scenes to get the music to them (be it a fallback stream or even a file
> played from disk) is irrelevant.
>
>
> Now, as for the statistics, should we be able to help without knowing what
> system you use to gather your statistics and build those charts? or i
> missed it?
>
>
> No you didn't miss it; I'm using a homebrew XSLT to present the
> information in a simple, parseable format:
>
> <xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform"
> <http://www.w3.org/1999/XSL/Transform> version = "1.0" >
> <xsl:output omit-xml-declaration="no" method="text"
> doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system=
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
> <http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd> indent="yes"
> encoding="UTF-8" />
> <xsl:template match = "/icestats" >MountPoint,Connections,Stream
> Name,Current Listeners,Description,Currently Playing,Stream URL
> Global,Client:<xsl:value-of select="connections" /> Source: <xsl:value-of
> select="source_connections" />,,<xsl:value-of select="listeners" />,,
> <xsl:for-each select="source">
> <xsl:value-of select="@mount" />,,<xsl:value-of select="name"
> />,<xsl:value-of select="listeners" />,<xsl:value-of select="description"
> />,<xsl:value-of select="artist" /> - <xsl:value-of select="title"
> />,<xsl:value-of select="url" />
> <xsl:text>&#10;</xsl:text>
> </xsl:for-each>
> </xsl:template>
> </xsl:stylesheet>
>
>
> The output is a text file that I can easily parse from a script; the
> output is fed into MRTG. At this moment, the 'real' mount points are
> missing from this output, even though clients are connected.
>
> anyway, i can think of two options:
> 1. gather statistics for both mount-points.
>
>
> I thought of that, but the fallback mounts are hidden so I don't get the
> info at all. They are hidden simply because I don't want to show them up to
> the users on the statistics page.
>
> 2. depend on the software you use, you can write some code to determinate
> whether a live source is connected and pull the stats from the relevant
> mount-point accordingly.
>
>
> Way too complicated. Why should I bother "switching" between mount points
> when my listeners connect to a single mount point?
>
> I'm beginning to think this is a 'feature' of IceCast with unintended
> consequences...
>
> Thanks,
>
> Jeroen
>
> --
> Bankai Software
> Jeroen van Oosten
> Telefoon: 010-4134567
> E-mail: jvoosten at bankai.nl
> KvK inschrijving: 24455492
>
> "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." --Red Adair
>
>
> _______________________________________________
> Icecast mailing list
> Icecast at xiph.org
> http://lists.xiph.org/mailman/listinfo/icecast
>
>


-- 
Yahav Shasha,
Web Developer
+972-(0)549214421
http://www.linkedin.com/in/yahavs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/icecast/attachments/20151206/f5378232/attachment-0001.htm 


More information about the Icecast mailing list