Getting ICY meta-data ?
Brought to you by:
sobukus
Hello.
How to do to get the ICY meta-data ?
I have try with this first:
mpg123_feature(MPG123_FEATURE_PARSE_ICY)
But this raise a error and the application crash ;-(
So, without this method, I try to get the data with:
mpg123_icy(mh,icy_meta)
This does not raise any error but... icy_meta is empty ;-(
How to do ?
Thanks.
Fre;D
What? Please elaborate. What version of mpg123 is this? What kind of
error?
First: Do you have an example stream? Best would be something that
mpg123 the application also plays so that you can see it does show ICY
meta info. Then … before you try to extract data using mpg123_icy, did
you check if there should be data available?
And finally ? how did you open the stream? Did you set
MPG123_ICY_INTERVAL?
It is with the very last mpg123 commit.
Huh, do you speak Pascal ? Because the example is in Pascal Object.
---> https://github.com/fredvs/uos
No but thanks for the tip, I will use it.
No too, but how to set it ?
Thanks Thomas.
Fre;D
With test stream I meant the actual data you feed to mpg123 to decode, the URL you use to access the stream.
The ICY metadata parsing relies on you parsing the stream headers (HTTP response) to determine the ICY interval. When you then give this value to libmpg123, it will use it to do ICY metadata extraction. Libmpg123 does not do any network protocol itself (announce ICY support, parse headers for interval value). This is done in the console mpg123 application, or in this case, should be done in your code.
You set the ICY interval as a parameter using mpg123_param
http://mpg123.org/api/groupmpg123init.shtml#gga73a8ff3363028b89afc72b3ea032b9cba904b9ea7e03ae0ec349087267bea20c8
Here Pascal code to announce ICY support in network protocol:
And here Pascal code for mpg123 (resumed, without mpg123_param()):
I have to add ICY interval in mpg123_param().
Many thanks Thomas. ;-)
Fre;D
Last edit: fred vs 2017-04-17