Captura de metadados do Icecast-audio-stream

1

Eu quero receber metadados desta estação:

http://ice1.somafm.com/deepspaceone-128-mp3

Para conseguir isso, fiz o seguinte pedido via shell:

$ GET -H "Icy-MetaData: 1" http://ice1.somafm.com/deepspaceone-128-mp3

Embora eu espere receber o valor Icy-metaint , ele não gera nenhuma saída.

Também fiz o seguinte pedido:

$ HEAD http://ice1.somafm.com/deepspaceone-128-mp3

Isso produz:

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

O que estou fazendo de errado?

    
por LaPriWa 24.04.2016 / 09:27

1 resposta

1

Você deve verificar se o comando que você está usando realmente envia esse cabeçalho.

Usando o cURL funciona bem (veja a última linha de saída):

$ curl -H "Icy-MetaData: 1" -v "http://ice1.somafm.com/deepspaceone-128-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 173.239.76.148...
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Connected to ice1.somafm.com (173.239.76.148) port 80 (#0)
> GET /deepspaceone-128-mp3 HTTP/1.1
> Host: ice1.somafm.com
> User-Agent: curl/7.45.0
> Accept: */*
> Icy-MetaData: 1
> 
* HTTP 1.0, assume close after body
< HTTP/1.0 200 OK
< Content-Type: audio/mpeg
< Date: Mon, 25 Apr 2016 04:16:47 GMT
< 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
< Server: Icecast 2.4.0-kh3
< Cache-Control: no-cache, no-store
< Pragma: no-cache
< 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:45000
< 
    
por 25.04.2016 / 06:23