Page 1 of 1

icy-url not available in libvlc?

Posted: 02 Oct 2018 16:54
by uwencke
Hi,

I noticed that http streams (often) provide icy-url header in their response, but there seems to be no way to get that information through libvlc:

E.g:
curl -v --header "Icy-MetaData:1" http://mp3channels.webradio.antenne.de:80/antenne -o out.txt
> GET http://mp3channels.webradio.antenne.de:80/antenne HTTP/1.1
> User-Agent: curl/7.38.0
> Host: mp3channels.webradio.antenne.de
> Accept: */*
> Proxy-Connection: Keep-Alive
> Icy-MetaData:1
...

< icy-br: 128
< icy-pub: 1
< icy-description: ANTENNE BAYERN
< X-RadioName: ANTENNE BAYERN
< icy-audio-info: ice-samplerate=44100;ice-bitrate=128;ice-channels=2
< icy-url: http://antenne.de/antenne
< Instance-id: 93c080424f724dffbd2800f7d920fe0e
< Cache-Control: no-cache
* Server Icecast 2.3.2-kh31 is not blacklisted
< Server: Icecast 2.3.2-kh31
< icy-genre: Pop
< Expires: Mon, 26 Jul 1997 05:00:00 GMT
< icy-metaint: 16000

Or is there a way that I'm not aware of? Other icy parameters can be accessed, one can see the parsing happening here: https://github.com/videolan/vlc/blob/ma ... ess/http.c. I also wrote a small script that tries to get all meta data from the mediaplayer by polling. I get:

get meta
meta 0: ANTENNE BAYERN
meta 2: Pop
meta 12: ANTENNE BAYERN - Wir lieben Bayern, wir lieben die Hits
get meta
meta 0: ANTENNE BAYERN
meta 2: Pop
meta 12: Sia - Cheap Thrills
get meta
meta 0: ANTENNE BAYERN
meta 2: Pop
meta 12: Sia - Cheap Thrills

where 0,2 and 12 are the integer values of the libvlc_meta_t.

I'd like to propose adding the icy-url to the supported parameters. Not sure whether it should go into libvlc_meta_URL or whether a new enum value should be added.

FYI: Note that icy-url is a key that opens the door to radio dns technology. It can be used to find plenty of machine-readable additional information about the program.

Thank you for your consideration and time.

Re: icy-url not available in libvlc?

Posted: 03 Oct 2018 07:31
by mfkl
Hi uwencke,
is there a way that I'm not aware of?
I think you are correct, libvlc does not offer a way to retrieve this information.

If you want to submit a patch to expose this or talk about the design, you should send a message on the mailing list https://mailman.videolan.org/listinfo/vlc-devel

Cheers

Re: icy-url not available in libvlc?

Posted: 20 Jan 2019 23:40
by Jean-Baptiste Kempf
It should be easy to add, as extra metadata.