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 

Metadata Question again

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





PostPosted: Wed Mar 05, 2008 10:43 am    Post subject: Metadata Question again Reply with quote

hey i wanted to ask how is the refresh intervall of ices2 if it reads metadata from a file?

i want to allways set just 1 metadata pair of artist and title in a textfile where ices2 gets the information from and update that file with a perl script but i dont know how and when will ices get the new information since im not using a playlist.
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Wed Mar 05, 2008 1:39 pm    Post subject: Reply with quote

The documentation indicates that the metadata is reread when it starts streaming and when a USR1 signal is received.

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





PostPosted: Wed Mar 05, 2008 1:57 pm    Post subject: Reply with quote

yea thats what i found also but 1st what us an USR1 signal and 2nd i need to get ices to read it again when i update the file with my perl script else i see no chance to have correcct title and artist information when a song changes because i stream them live via line-in but in an fixed order
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Wed Mar 05, 2008 2:24 pm    Post subject: Reply with quote

kill -USR1 <pid of ices>

That will send the signal and ices will catch it and process the metadata file. How you initiate the kill is up to you, it could it via a song change plugin or a web page link. Ideally you want it occuring just after the new contents are written to the metadata file.

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





PostPosted: Wed Mar 05, 2008 2:27 pm    Post subject: Reply with quote

but USR1 will foce ices to restart right? wont i drop my listeners then? or wont there be a time of sinlence then?
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Wed Mar 05, 2008 2:31 pm    Post subject: Reply with quote

no, USR1 will tell ices to reissue a new logical stream which is what has to happen for new metadata. The connection is not dropped.

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





PostPosted: Wed Mar 05, 2008 2:43 pm    Post subject: Reply with quote

ok cool i started to code my script and it looks like this for the moment :
Quote:
#!/usr/local/bin/perl
open (MYFILE, 'playlist.txt');
while (<MYFILE>)
{
$alles = $_;
@alles = split(',',$alles);
system("echo \"artist=@alles[0]\" > /home/streaming/metadata.txt");
system("echo \"title=@alles[1]\" >> /home/streaming/metadata.txt");
sleep(@alles[2]);
}
close (MYFILE);

so i have to use this kill -USR1 ices2 in the end of the loop to get the updated metadatas huh?

EDIT

oh for your information the file i get the stuff from looks like:

<artist>,<title>,<length in seconds>
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Wed Mar 05, 2008 3:55 pm    Post subject: Reply with quote

That sort of thing, obviously a kill takes a pid which can be from the pidfile written by ices. A killall will take a name but if you have more than one ices process then all of them will get a USR1

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





PostPosted: Wed Mar 05, 2008 4:07 pm    Post subject: Reply with quote

oh thats good im not using more than 1 ices so i can easyly take killall thx very much im gonna try it very soon and give a feedback.

sofar thx for the great help Smile
Back to top
Anonymous
Guest





PostPosted: Thu Mar 06, 2008 11:49 am    Post subject: Reply with quote

wow it works pretty fine but obviosly i have to start my mp3 player and the script at the same time Wink but nevermind btw the scipt posted above was wrong so i gonna post the new one soon maybe sum1 else could need it (even though i am absolutly new to this materia but nevertheless its funny) Smile
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Source Clients 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