Author Topic: Get channel logo from a Radio Stream  (Read 520 times)

fwmann

  • Posts: 4
Get channel logo from a Radio Stream
« on: 10 Apr '19 - 21:08 »
Dear all,

I built a Netradio Streaming Application with Bass. Meta Tags, such as Title and Station Info are shown properly.

Is there a possibility to get the Station/Channel Logo somehow with a function I didnīt find yet? I would like to set the Logo in a TImage. IDE is Delphi or Lazarus.
As an alternative the Logos can be downloaded, but an automatic download with a function and the streaming URL would be much more convenient and never obsolete.

Thank you for any proposals.

Best Regards
fwmann

Ian @ un4seen

  • Administrator
  • Posts: 21991
Re: Get channel logo from a Radio Stream
« Reply #1 on: 11 Apr '19 - 13:20 »
Unfortunately, there isn't any standard way for a station logo to be sent in a Shoutcast/Icecast stream. If you want to show something, you could perhaps try fetching the favicon.ico/png file from the station's website (in the "icy-url" header).

fwmann

  • Posts: 4
Re: Get channel logo from a Radio Stream
« Reply #2 on: 11 Apr '19 - 15:14 »
Hi,

could be helpful. If the url contains the path to the Picture, could be unbundled and shown. Maybe downloaded before.

MB_SOFT

  • Posts: 274
Re: Get channel logo from a Radio Stream
« Reply #3 on: 11 Apr '19 - 19:13 »
there is a standard way through shoutcast 2 but not so many stations use it.

if the station use a BassEnc based encoder can send the logo and the cover art via BASS_Encode_CastSendMeta

so the logo station and the cover art can be directly downloaded from the shotucast server

Example: http://nr11.newradio.it:8056 <--- this is a shotucast stream encoded with BassEnc, the logo station and cover art are sent via BASS_Encode_CastSendMeta

the logo station can be downloaded from the server: http://nr11.newradio.it:8056/streamart?sid=1

as well the nowplaying cover art http://nr11.newradio.it:8056/playingart?sid=1
« Last Edit: 11 Apr '19 - 19:24 by MB_SOFT »

fwmann

  • Posts: 4
Re: Get channel logo from a Radio Stream
« Reply #4 on: 12 Apr '19 - 08:21 »
There is a class TIdHTTP in Delphi I found. Within Lazarus there is Synapse, maybe this will work to retrieve an Image from a url and save it.

fwmann

  • Posts: 4
Re: Get channel logo from a Radio Stream
« Reply #5 on: 13 Apr '19 - 13:43 »
Obviously thereīs no function to retrieve the icon directly from a url. In Python there is something like 'urllib.urlretrieve(str(LogoUrl), filename=fileToImport)'
I found a website 'https://besticon-demo.herokuapp.com/allicons.json?url=www.un4seen.com' which shows the path to the favicon. Will try to implement this solution the best it can be.