3
2
I want to receive metadata from this station:
http://ice1.somafm.com/deepspaceone-128-mp3
In order to achieve this I did the following request via shell:
$ GET -H "Icy-MetaData: 1" http://ice1.somafm.com/deepspaceone-128-mp3
Although I expected to receive the Icy-metaint
value, it don't throws any output.
I also did the following request:
$ HEAD http://ice1.somafm.com/deepspaceone-128-mp3
This yields:
200 OK
Cache-Control: no-cache, no-store
Connection: Close
Date: Sun, 24 Apr 2016 07:23:14 GMT
Pragma: no-cache
Server: Icecast 2.4.0-kh3
Content-Type: audio/mpeg
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Access-Control-Allow-Headers: Origin, Accept, X-Requested-With, Content-Type
Access-Control-Allow-Methods: GET, OPTIONS, HEAD
Access-Control-Allow-Origin: *
Client-Date: Sun, 24 Apr 2016 07:21:38 GMT
Client-Peer: 173.239.76.148:80
Client-Response-Num: 1
Icy-Br: 128
Icy-Genre: Ambient Space
Icy-Name: Deep Space One: Deep ambient electronic and space music. [SomaFM]
Icy-Notice1: <BR>This stream requires <a href="http://www.winamp.com/">Winamp</a><BR>
Icy-Notice2: SHOUTcast Distributed Network Audio Server/Linux v1.9.5<BR>
Icy-Pub: 0
Icy-Url: http://somafm.com
What am I doing wrong?
Thank you very much! :-D I have one last question: Why must I redirect the output to /dev/null? – LaPriWa – 2016-04-25T14:08:58.500
1That was just to limit the output to the headers by redirecting the body to /dev/null. For your use case you'll probably want to digest the data stream and parse at the signalled 'metaint'. – TBR – 2016-04-25T14:31:14.693
1Personally, I'd probably look at their website interface, as they show metadata there too. Might be easier than carving it out of a stream. – TBR – 2016-04-25T14:37:39.743
1The website interface is subject to change at any time, probably breaking programs dependent on it. Shoutcast specification won't change any time soon and would be the safer method. Using the metadata is also portable to other shoutcast/icecast servers and not just SoMaFM.(a great internet radio station collection btw) – Hydranix – 2016-10-26T20:38:08.510