Patrick, I also think you might need to change metadata_url="http://www.borris.me/weatherjerk.php" to metadata_url= ref "http://www.borris.me/weatherjerk.php"
result=http.get(metadata_url) to result=http.get(!metadata_url) Note the ! Nick On Fri, Nov 13, 2015 at 11:47 PM, Patrick Perdue <[email protected]> wrote: > Hi all: > > I have a very basic configuration using a Raspberry Pi that streams a > live alsa input to two icecast servers (one mp3, one ogg flac,) and I > want to update the stream metadata once every 60 seconds from a URL that > provides weather conditions. > Here's my script. The result is: > Line 25, char 6 before "=": Parse error! > Probably something incredibly obvious that I've overlooked, and I'm not > sure if this method would even work anyway. Most examples I could find > referred to updating metadata after some other event happened for > non-live input sources, such as changing tracks in playlists, etc. > Suggestions appreciated. > Full script follows: > > <script start> > #!/usr/bin/liquidsoap -v > # for Alsa, explicitly define input parameters to make sure the audio > interface isn't being stupid > # set("frame.size",1024) > set("frame.channels", 2) > set("frame.samplerate", 44100) > # Generate metadata > metadata_url="http://www.borris.me/weatherjerk.php" > def stream_metadata(track) = > result=http.get(metadata_url) > [("title", snd(result))] > end > test = input.alsa(device="hw:1,0") > output.icecast(%ogg(%flac(samplerate=44100, channels=2, compression=0, > bits_per_sample=16) ), > host="localhost", > port=9600, password="HackMyFaceOff", genre="test", > description="This better work!", mount="/test.ogg", > name="Nothing Useful At All", user="source", > url="http://www.borris.me", > output.icecast(%mp3(stereo=true, bitrate=192, samplerate=44100), > > host="localhost", > > port=9600, password="HackMyFaceOff", genre="stuff", > > description="This better work!", mount="/test", > > name="Nothing Useful At All", user="source", > > url="http://www.borris.me", test) > test=switch([({0s},map_metadata(update=false, stream-metadata, test) > <script end> > > So, again, what obvious thing did I break here, and is there a better > way of doing this, assuming that isn't the proper way to go about this? > Maybe using delay and having that function call itself or something else? > > Thanks. > > > ------------------------------------------------------------------------------ > _______________________________________________ > Savonet-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/savonet-users >
------------------------------------------------------------------------------
_______________________________________________ Savonet-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/savonet-users
