【问题标题】:How can I get server statistics XML of Icecast?如何获取 Icecast 的服务器统计 XML?
【发布时间】:2016-05-08 15:12:41
【问题描述】:

我在 Ubuntu 14.04.4 LTS 上使用 Icecast 2.3.3。

我想在与 Icecast 相同的服务器上运行的 Apache 上显示当前播放的歌曲名称及其艺术家姓名。

我怎样才能得到Icecast的服务器统计XML,如下页所述?

http://icecast.org/docs/icecast-2.3.3/server-stats.html

【问题讨论】:

    标签: icecast


    【解决方案1】:

    如果您想要 XML 表示,您要么必须使用管理员凭据访问 http://localhost:8000/admin/stats,要么将自定义 XSLT 工作表放在 /usr/share/icecast2/web 中。

    您可以在此处找到示例 XSLT 文件:

    http://ruecker.fi/foss/icecast/xslt/

    产生 XML 输出的文件在这里:

    http://ruecker.fi/foss/icecast/xslt/rds-xml.xsl

    您需要做的就是编辑文件中的挂载点名称以匹配您想要获取信息的挂载点名称。

    或者您可以只安装最新 Icecast 的官方 Xiph.org 软件包:

    https://wiki.xiph.org/Icecast_Server/Installing_latest_version_(official_Xiph_repositories)

    因为它提供了JSON API。甚至可以直接从网页中查询,无需任何服务器端代码。

    【讨论】:

    • 您的自定义 XSLT 工作表 (rds-xml.xsl) 有效。谢谢。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-02-13
    • 1970-01-01
    • 2013-11-08
    • 2010-09-16
    • 2013-11-27
    相关资源
    最近更新 更多