Album cover on website
Album cover on website
Hi Bernd,
I'm new at this forum. I have a question. Is it possible in PF that the album cover of the currently playing track is send along with the song info, so that it will be displayed in a webplayer on my website? e.g. like this http://www.rockfiles.nl
I'm new at this forum. I have a question. Is it possible in PF that the album cover of the currently playing track is send along with the song info, so that it will be displayed in a webplayer on my website? e.g. like this http://www.rockfiles.nl
rockfiles.nl 110% rock radio!!
the no.1 rock & metal station!!
the no.1 rock & metal station!!
Re: Album cover on website
There is already a v4.0.4.19-beta out (use "Check for Beta-Versions..." to update).
This version contains a new control command called: EXEC_WRITE_JPEG_FILE, which writes any track's album art image to a file.
Parameters: filename[|from[|size]]
Note: The filename should denote the full path to a .jpg file; what can be '0'=current track (default), '1'=next track, 'A'=current player A, 'B'=current player B, 'C'=current player C, 'D'=current player D; size defined the quadratic with/height (default is 200).
Example:
This version contains a new control command called: EXEC_WRITE_JPEG_FILE, which writes any track's album art image to a file.
Parameters: filename[|from[|size]]
Note: The filename should denote the full path to a .jpg file; what can be '0'=current track (default), '1'=next track, 'A'=current player A, 'B'=current player B, 'C'=current player C, 'D'=current player D; size defined the quadratic with/height (default is 200).
Example:
Code: Select all
EXEC_WRITE_JPEG_FILE C:\Test\NowPlaying.jpg|0|300
Bernd - radio42
ProppFrexx ONAIR - The Playout and Broadcast Automation Solution
ProppFrexx ONAIR - The Playout and Broadcast Automation Solution
Re: Album cover on website
Yes, but that is not as easy as you think it might be 
ProppFrexx contains several macros which can be used to 'send' a cover art image:
- ${albumart}
- ${cpltrackalbumartcurrent}
- ${cpltrackalbumartnext}
- ${cpltrackalbumarta}
- ${cpltrackalbumartb}
- ${cpltrackalbumartc}
- ${cpltrackalbumartd}
- ${plstrackalbumartcurrent}
- ${plstrackalbumartnext}
These macros can be used exactly like any other existing macros which you might use to transmit the song title, artist etc. to your web-site.
E.g. via the following control-commands:
- EXEC_SEND_HTTP_GET
- EXEC_SEND_HTTP_POST
- EXEC_WRITE_PLAYLISTFILE (see here for details http://www.proppfrexx.radio42.com/myBB/ ... php?tid=72)
Note, that above album art macros resolve the cover art image of an audio track (if existing) to a Base64 encoded string containing the binary image data of a Jpeg image.
This means:
- ProppFrexx reads any existing track image
- converts that to a Jpeg image of size 200x200
- uses that converted image and used a standard base64 encoder to convert that to a string
On your web-site (when receiving/reading that base64 image string) you must:
- decode that received string back to binary data (e.g. via the PHP 'base64_decode' function)
- use that decoded binary data to create the image on your web-site
- use the 'image/jpeg' mime type for that!

ProppFrexx contains several macros which can be used to 'send' a cover art image:
- ${albumart}
- ${cpltrackalbumartcurrent}
- ${cpltrackalbumartnext}
- ${cpltrackalbumarta}
- ${cpltrackalbumartb}
- ${cpltrackalbumartc}
- ${cpltrackalbumartd}
- ${plstrackalbumartcurrent}
- ${plstrackalbumartnext}
These macros can be used exactly like any other existing macros which you might use to transmit the song title, artist etc. to your web-site.
E.g. via the following control-commands:
- EXEC_SEND_HTTP_GET
- EXEC_SEND_HTTP_POST
- EXEC_WRITE_PLAYLISTFILE (see here for details http://www.proppfrexx.radio42.com/myBB/ ... php?tid=72)
Note, that above album art macros resolve the cover art image of an audio track (if existing) to a Base64 encoded string containing the binary image data of a Jpeg image.
This means:
- ProppFrexx reads any existing track image
- converts that to a Jpeg image of size 200x200
- uses that converted image and used a standard base64 encoder to convert that to a string
On your web-site (when receiving/reading that base64 image string) you must:
- decode that received string back to binary data (e.g. via the PHP 'base64_decode' function)
- use that decoded binary data to create the image on your web-site
- use the 'image/jpeg' mime type for that!
Bernd - radio42
ProppFrexx ONAIR - The Playout and Broadcast Automation Solution
ProppFrexx ONAIR - The Playout and Broadcast Automation Solution
Re: Album cover on website
Thank you for your answer. I will try to fix it. 

rockfiles.nl 110% rock radio!!
the no.1 rock & metal station!!
the no.1 rock & metal station!!
Re: Album cover on website
Hi Bernd,
I,m still trying to fix my problem. I already found, how to get the song info in my webplayer. But in wich command do I fill in this info:
- ${albumart}
- ${cpltrackalbumartcurrent}
- ${cpltrackalbumartnext}
- ${cpltrackalbumarta}
- ${cpltrackalbumartb}
- ${cpltrackalbumartc}
- ${cpltrackalbumartd}
- ${plstrackalbumartcurrent}
- ${plstrackalbumartnext}
Could you help me along with this?
Best Regards!
I,m still trying to fix my problem. I already found, how to get the song info in my webplayer. But in wich command do I fill in this info:
- ${albumart}
- ${cpltrackalbumartcurrent}
- ${cpltrackalbumartnext}
- ${cpltrackalbumarta}
- ${cpltrackalbumartb}
- ${cpltrackalbumartc}
- ${cpltrackalbumartd}
- ${plstrackalbumartcurrent}
- ${plstrackalbumartnext}
Could you help me along with this?
Best Regards!
rockfiles.nl 110% rock radio!!
the no.1 rock & metal station!!
the no.1 rock & metal station!!
Re: Album cover on website
The above macros can be used with any control-command.
As said above...
E.g. via the following control-commands:
- EXEC_SEND_HTTP_GET
- EXEC_SEND_HTTP_POST
- EXEC_WRITE_PLAYLISTFILE (see here for details http://www.proppfrexx.radio42.com/myBB/ ... php?tid=72)
And as said above, these macros are resolved to a Base64 encoded string containing the binary image data of a Jpeg image.
This means:
- ProppFrexx reads any existing track image
- converts that to a Jpeg image of size 200x200
- uses that converted image and used a standard base64 encoder to convert that to a string
As a result the macro will resolve to a base64 encoded string containing the raw image data!
On your web-site (when receiving/reading that base64 image string) you must:
- decode that received string back to binary data (e.g. via the PHP 'base64_decode' function)
- use that decoded binary data to create the image on your web-site
- use the 'image/jpeg' mime type for that!
So I am not sure what info you are actually missing.
As said above...
E.g. via the following control-commands:
- EXEC_SEND_HTTP_GET
- EXEC_SEND_HTTP_POST
- EXEC_WRITE_PLAYLISTFILE (see here for details http://www.proppfrexx.radio42.com/myBB/ ... php?tid=72)
And as said above, these macros are resolved to a Base64 encoded string containing the binary image data of a Jpeg image.
This means:
- ProppFrexx reads any existing track image
- converts that to a Jpeg image of size 200x200
- uses that converted image and used a standard base64 encoder to convert that to a string
As a result the macro will resolve to a base64 encoded string containing the raw image data!
On your web-site (when receiving/reading that base64 image string) you must:
- decode that received string back to binary data (e.g. via the PHP 'base64_decode' function)
- use that decoded binary data to create the image on your web-site
- use the 'image/jpeg' mime type for that!
So I am not sure what info you are actually missing.
Bernd - radio42
ProppFrexx ONAIR - The Playout and Broadcast Automation Solution
ProppFrexx ONAIR - The Playout and Broadcast Automation Solution
Re: Album cover on website
Maybe this will help you.
<?php
echo "<img src=data:image/jpg;base64,${currentalbumart} width='200' height='200' border='0' title='${currenttrackname}' >";
?>
<?php
echo "<img src=data:image/jpg;base64,${currentalbumart} width='200' height='200' border='0' title='${currenttrackname}' >";
?>
Re: Album cover on website
Thanks for your answer! What I actually need to know is where excactly in PF do I fill in these commands.. I know that it's needs to be doen in de event/command section. But what are my next actions then?
Maybe someone could help me out with this..
Maybe someone could help me out with this..
rockfiles.nl 110% rock radio!!
the no.1 rock & metal station!!
the no.1 rock & metal station!!
Re: Album cover on website
Thank you Bernd,
But when I'm there, what's my next action?
I put an attachment with this message, so you can see my current situation.
But when I'm there, what's my next action?
I put an attachment with this message, so you can see my current situation.
- Attachments
-
- command builder.jpg (68.65 KiB) Viewed 14829 times
rockfiles.nl 110% rock radio!!
the no.1 rock & metal station!!
the no.1 rock & metal station!!
Re: Album cover on website
Not sure what more you are looking for.
When you placed those two commands e.g. with the "Streaming.OnSongTitleChanged" event and they are working fine...then you might have a file called 'test.html' on your web-site?
Is that working?
If not, what happens, if you open the file C:\Test\test.html locally within your internet browser?
When you placed those two commands e.g. with the "Streaming.OnSongTitleChanged" event and they are working fine...then you might have a file called 'test.html' on your web-site?
Is that working?
If not, what happens, if you open the file C:\Test\test.html locally within your internet browser?
Bernd - radio42
ProppFrexx ONAIR - The Playout and Broadcast Automation Solution
ProppFrexx ONAIR - The Playout and Broadcast Automation Solution