The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,482 other followers

Some notes on dumping IceCast ICY streams to get meta-data

Posted by jpluimers on 2021/06/23

Some links I want to investigate further.

This is difference in the header meta data of an icecast URL, than in the stream data.

The header meta-data you get from this cURL command (via [WayBack] linux – Catch Metadata from Icecast-audio-stream – Super User):

# curl -H "Icy-MetaData: 1" -v "http://icecast.omroep.nl:80/radio2-bb-mp3" > /dev/null
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 145.58.53.154...
* TCP_NODELAY set
* Connected to icecast.omroep.nl (145.58.53.154) port 80 (#0)
> GET /radio2-bb-mp3 HTTP/1.1
> Host: icecast.omroep.nl
> User-Agent: curl/7.54.0
> Accept: */*
> Icy-MetaData: 1
> 
* HTTP 1.0, assume close after body
< HTTP/1.0 200 OK
< Content-Type: audio/mpeg
< Date: Mon, 01 Jul 2019 06:46:33 GMT
< icy-br:192
< ice-audio-info: samplerate=48000;channels=2;bitrate=192
< icy-br:192
< icy-genre:Mixed
< icy-metadata:1
< icy-name:NPO Radio2
< icy-pub:0
< icy-url:http://www.radio2.nl
< Server: Icecast 2.4.0-kh10
< Cache-Control: no-cache, no-store
< Access-Control-Allow-Origin: *
< Access-Control-Allow-Headers: Origin, Accept, X-Requested-With, Content-Type
< Access-Control-Allow-Methods: GET, OPTIONS, HEAD
< Connection: Close
< Expires: Mon, 26 Jul 1997 05:00:00 GMT
< icy-metaint:16000
< 

The content meta-data you can for instance get with node.js in a call like [WayBack] https://colon.roderickgadellaa.com:8001/get/id3/?url=http%3A%2F%2Ficecast.omroep.nl%3A80%2Fradio2-bb-mp3:

{"ok":true,"code":200,"error":false,"data":{"headers":{"content-type":"audio/mpeg","date":"Sat, 29 Jun 2019 17:07:03 GMT","icy-br":"192, 192","ice-audio-info":"samplerate=48000;channels=2;bitrate=192","icy-genre":"Mixed","icy-metadata":"1","icy-name":"NPO Radio2","icy-pub":"0","icy-url":"http://www.radio2.nl","server":"Icecast 2.4.0-kh10","cache-control":"no-cache, no-store","access-control-allow-origin":"*","access-control-allow-headers":"Origin, Accept, X-Requested-With, Content-Type","access-control-allow-methods":"GET, OPTIONS, HEAD","connection":"Close","expires":"Mon, 26 Jul 1997 05:00:00 GMT","icy-metaint":"16000"},"metadata":{"StreamTitle":"AUDIOLINK-AUDIO-FTP-SERVER - +EJ+  Ons Uuropener"},"timestamp":1561828023103,"cacheValidUntil":1561828038103},"request":{"protocol":null,"slashes":null,"auth":null,"host":null,"port":null,"hostname":null,"hash":null,"search":"?url=http%3A%2F%2Ficecast.omroep.nl%3A80%2Fradio2-bb-mp3","query":{"url":"http://icecast.omroep.nl:80/radio2-bb-mp3"},"pathname":"/get/id3/","path":"/get/id3/?url=http%3A%2F%2Ficecast.omroep.nl%3A80%2Fradio2-bb-mp3","href":"/get/id3/?url=http%3A%2F%2Ficecast.omroep.nl%3A80%2Fradio2-bb-mp3"}}

This was at a time where the Dutch NPO Radio 2 had trouble with their ID3 service as the first part stopped refreshing for days: "metadata":{"StreamTitle":"AUDIOLINK-AUDIO-FTP-SERVER - +EJ+ Ons Uuropener"}

Some links that will help me eventually dump this from the command-line:

–jeroen

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: