IceStats – A WordPress Plugin For IceCast

image_pdfimage_print

After finding a shortage of good plug-ins to display the status of my IceCast stream, I decided to develop my own and learn a thing or two about WordPress plug-in development at the same time. You can see it in action on my homepage in the sidebar under the heading “Now Streaming”.

The IceStats plug-in checks the status of the IceCast server, and if it is online it will display the current artist, song title and a link to the stream.

After activation the plug-in will show up in your widget’s menu, and all of the plug-in’s settings can be managed in the menu located at Settings -> IceStats.

icestats settings

Settings:

  • Server Name: (Set to the DNS name or IP address of your Icecast server)
  • Server Port: (Set to the port number that your Icecast server is running on, usually 8000)
  • Stream Mount: (Set to the name of the mount point with a .m3u extension, eg. stream.m3u)

You can find the stream mount point file name by clicking on the m3u button at on your Icecast status page. You can reach that by opening a web browser and typing:

http://your.icecast-server.com:8000

When the page opens you should see 2 icons to the right of the page that look like this:

M3U Button

Click on the M3U button and note the URL it sends you too. This will more than likely be:

http://your.icecast-server.com:8000/mountname.m3u

insert the mountname.m3u into the Stream Mount box.

Your plugin should now be configured correctly. Make sure you edit the metatag data for your song files so that they list the Artist name and Song Title, if you don’t tag them then the information will not be displayed! Tagging .ogg and .mp3 files can be done in many different ways depending on your Operating System and is beyond the scope of this plugin’s documentation.

You can download the IceStats plug-in directly from here. You can also grab it at the WordPress.org Plugin Directory.

Like this plugin? Please consider donating to support future development efforts.





10 Responses to “IceStats – A WordPress Plugin For IceCast”


  1. Lamotex

    thanks for your widget, but can you explain how to configure it.
    i mean where we need to change, please.

  2. Ronny

    I updated the page with more information on how to setup the widget. Hope it helps.

  3. Jordan

    Hey, thanks for the plugin!! The only thing is, it’s not displaying the artist/track info at all. It says the server is online, and I know my settings are correct, but it just doesn’t show the metadata. Can you help? The “Click Here” link works as well to get to my stream. Thank you for any advice! – Jordan

  4. Ronny

    Jordan,

    The plugin displays the song data fine on my end as well as for other users. Please make sure your meta-data is correct for the song file (It may have some strange characters, or be empty!). There are many tools out there that allow you to edit it, as well as some of the more popular media players.

  5. Mark

    Happens to me also. Tag info is not displayed. It’s configured correctly and shows in stream players (itunes, VLC) and via the ajax update script on my site.

    Does the plugin recognise icecast2? Perhaps that’s it.

  6. Cristian B.

    I have same Jordan problem. With Winamp I see correctly the song name.
    Some idea?

  7. Ronny

    Please try updating to the latest version in the subversion repository or from the non wordpress link above. Seems that the wordpress plugins site never pushed my updated revision through.

    The plugin should be displaying the data as long as the file has been correctly tagged. Does your icecast server’s XML page display the artist info correctly? The plugin just parses the XML page and pulls the information from there. If it is not there the plugin will not display it.

    As you can see from the plugin active on this site that it is displaying correctly for my Icecast stream, and I am using my latest version. The only thing added in the newest revision is the listener count display.

    Please navigate in a browser to your Icecast server using the following address:

    http://yourserver:8000/status2.xsl

    and verify that the artist information is present on that page within the XML. If it is then there may be an issue with my plugin and your version of Icecast. If it is not there then there is an issue with your song’s meta data.

    My Icecast server is running Icecast version 2.3.2 and Ices version 2.0.1-r1.

  8. Arthur

    Pls mate, upload the version with listeners count as in your site, thank you!

  9. Ronny

    I commited that version to SVN a while ago, however the wordpress plugins site seems to have issues updating the pages. The link on this page will give you the latest package.

    https://www.ronnybull.com/assets/files/icestats.tar.bz2

  10. Ronny

    It seems that Icecast has recently changed from providing statistical information in the form of XML to JSON. The plugin was developed using the XML interface for parsing the information needed. The new update changes the plugin to work with the JSON interface. As you can see by my sidebar it is working in the current version of WordPress (4.1 at the time of this writing).

    I have committed the changes to the wordpress.org subversion repo and have also updated the tarball at the following link:

    https://www.ronnybull.com/assets/files/icestats.tar.bz2

    Enjoy!

    Ronny