Hmm. Yeah, only just noticed that, though I figured it would have complained that the variable hadn't been previously defined. Guess it didn't get that far.
On 11/14/2015 11:42 AM, Nicholas Vrtis wrote: > Patrick, > > Not sure if it is the only problem,but in one place you have > stream-metadata (with a dash) and in the def you have stream_metadata > with an underscore. > > Nick > > On Fri, Nov 13, 2015 at 11:47 PM, Patrick Perdue <[email protected] > <mailto:[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] > <mailto:[email protected]> > https://lists.sourceforge.net/lists/listinfo/savonet-users > > ------------------------------------------------------------------------------ _______________________________________________ Savonet-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/savonet-users
