Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

icecast Current Song

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Dev Branches
View previous topic :: View next topic  
Author Message
Anonymous
Guest





PostPosted: Thu Dec 20, 2007 8:10 pm    Post subject: icecast Current Song Reply with quote

Guys,

I hope you can help me, just a newbie in icecast. In the http://domain.com:8000 i can see it display the Current Song. Is it possible to extract that date so i can display the current song in a php page.

Second if possible, to display the last N songs played.

Thanks,

Mike
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Thu Dec 20, 2007 10:26 pm    Post subject: Reply with quote

look at parsing the playlist log file

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Anonymous
Guest





PostPosted: Sat Dec 22, 2007 3:08 am    Post subject: Reply with quote

Hi Karl,

Many thanks, by the way where i can see that...what's teh actual filename. By the way ill be displaying the current playing song in a index.php

karlH wrote:
look at parsing the playlist log file

karl.
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sat Dec 22, 2007 4:09 am    Post subject: Reply with quote

The actual filename is whatever name you specify in the <playlistlog> setting. I'm sure you can get the php to parse it

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
themarty



Joined: 08 Jan 2010
Posts: 3

PostPosted: Fri Jan 08, 2010 8:06 am    Post subject: Reply with quote

and how would you retrieve this information when the php script is on a different server? Is it possible?
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Fri Jan 08, 2010 1:43 pm    Post subject: Reply with quote

not if the script is not on the same server, but you can of course copy it before processing it. You can retrieve the last N lines in the kh codebase but I may want that going through the xsl engine so formatting can be decided by the admin.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
themarty



Joined: 08 Jan 2010
Posts: 3

PostPosted: Fri Jan 08, 2010 2:38 pm    Post subject: Reply with quote

karlH wrote:
not if the script is not on the same server, but you can of course copy it before processing it.


Copy it? You mean copy it to a public accessible file and then retrieve that? That's not really a solution if you want to automate the process (for example, display the current song of the icecast channel that runs on server A, on a website running on server B.

Quote:
You can retrieve the last N lines in the kh codebase but I may want that going through the xsl engine so formatting can be decided by the admin.


What exactly do you mean by retrieving lines for the kh codebase?

Maybe i should have been a bit more clear:

My goal is to write a script that is universal applicable for showing information about icecast servers which run wherever in the world. The programmer would only need to fill in the details of the specific station he wants to grab the information from and the script should do the rest.

I can capture the stream which gives me this information:

(example from kiss-fm stream)
Quote:
HTTP/1.0 200 OK
Content-Type: audio/mpeg
icy-br:128
icy-description:KissFM 106.5 Kyiv, Ukraine
icy-genre:Dance
icy-name:KissFM
icy-pub:1
icy-url:http://kissfm.ua
Server: Icecast 2.3.2
Cache-Control: no-cache
Content-Length: 221183499
Expires: Mon, 26 Jul 1997 05:00:00 GMT


But after that, the audio-stream starts. So i'm looking for another way to grab the current song and ideally a history of songs.

I don't have experience with icecast myself, only with shoutcast servers, for which i've made a script which can display current song, history, etc. I'm just trying to find information to make this script also usefull for icecast stations.
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Fri Jan 08, 2010 5:50 pm    Post subject: Reply with quote

The current song can be retrieved from the xsl page, that has always been available to you. The last N metadata updates is not available yet via the web interface only from the log file that is written. I am looking into allowing per-mount playlist logs just like I have done with access logs in kh19 but that is not complete yet.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
themarty



Joined: 08 Jan 2010
Posts: 3

PostPosted: Mon Jan 11, 2010 8:30 am    Post subject: Reply with quote

is the xsl file the only one that is available through the web? i guess the source of the xsl file is an xml file?
I've tried searching the documentation to see if this xml file is also accessible, but i could only find references to /etc folders (which i guess are not web-accessible).

It would be cool if there was also a status.xml, since xml is much easier to parse then html Wink
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Mon Jan 11, 2010 1:09 pm    Post subject: Reply with quote

The xsl is a template so the output can be what you want, xml, text, html or something else. since 2.3.2 you can even isolate a specific mountpoint with say /mypage.xsl?mount=/mystream.ogg

Whether that is an xml and csv is completely up to you. The /admin/stats.xml page will give you an idea of what tag are available to you.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Dev Branches All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber