Dan’s View

2010/03/01

ShoutCast Stream Meta script

Filed under: Geek,Programming — Tags: , — dan @ 10:00

Using the following python script you can pull the meta info from a playing stream. The headers variable will contain the Radio Name and other things, and the meta’s returned will include the currently playing track.

source

Example output:
dan@x ~/ $ ./get_icy_name.py
{'headers': {'icy-genre': 'Techno Drum and Bass', 'icy-notice2': 'SHOUTcast Distributed Network Audio Server/Linux v1.9.93atdn
', 'icy-pub': '1', 'icy-br': '128', 'icy-name': 'Bassdrive - Worldwide Drum and Bass Radio', 'content-type': 'audio/mpeg', 'icy-metaint': '24576'}, 'metas': {'StreamTitle': 'G-Shock Radio Feb 25th 2010 - hosted by Kasio', 'StreamUrl': ''}}
dan@x ~/ $

Powered by WordPress