Artworks or not artworks?

You have a question or need an advice about how to do something? Ask it here!
Post Reply
claudius06
Posts: 78
Joined: 25 Nov 2023 09:23
Artworks or not artworks?

Post by claudius06 »

Hello,
I'm revisiting the topic of artworks. I've read some posts on the subject as well as the manual. But I realize the subject is complicated.
For example, I have no choice but to use Icecast to connect to the broadcasting server, does this mean I can't display the artworks on my website and app?
Thank you for your help.
Claude.
User avatar
radio42
Site Admin
Posts: 8350
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Artworks or not artworks?

Post by radio42 »

You can, but you need to post the artwork manually to your web-site, eg. via the http post command and using the artwork macros via eg. the OnSongTitleChanged event. The streaming servers doesn’t support that itself.
claudius06
Posts: 78
Joined: 25 Nov 2023 09:23
Re: Artworks or not artworks?

Post by claudius06 »

Thank you for your reply.
So, does this mean that all the artworks displayed in PFOA will be exported to my website's FTP? Or is it not at all how it works? Where can I find details about this process?
User avatar
radio42
Site Admin
Posts: 8350
Joined: 05 Apr 2012 16:26
Location: Hamburg, Germany
Contact:
Re: Artworks or not artworks?

Post by radio42 »

No. You send the image data itself as a base64 encoded string (via the eg. EXEC_SEND_HTTP_POST command using the ${albumart} macro in the Streaming.OnSongTitleChanged even) to an endpoint of web site (could for example be a php script, which receives that image data and stores it in a database table) at the time a track is played.

On your web-site you can then use php again to display image from that base64 encoded string:

Code: Select all

...
$cover = $_POST['cover'] ?? '';
$imgsize = $_REQUEST['imgsize'] ?? 150;
...
echo '<img src="data:image/jpeg;base64,' . $cover . '" width="'.$imgsize.'" height="'.$imgsize.'"/>';
...			}
claudius06
Posts: 78
Joined: 25 Nov 2023 09:23
Re: Artworks or not artworks?

Post by claudius06 »

Okay, thank you for these details. I will look into this more closely, possibly with a developer.

Post Reply