Hi Udo, we had a similar problem in the past and worked around by a simple solution: just use a single static HTTP input stream source and change the URL dynamically by an external script.
We use the telnet interface to externally control http stream input. you can just update the URL to check/reconnect or do the stream switch. you can also ask the URL to check the state (polling, connected, etc.) from our experience, We use this approach to schedule the active stream from multiple stream sources of independent studios. (Additionally there could be a fallback, e.g. a second static stream source if a source becomes unavailable.) you can check the code http://dev.radiopiloten.de/dokuwiki/doku.php/liquidsoap:scheduler a stripped down liq file looks like #enable telnet server set("server.telnet", true) set("server.telnet.port",8001) set("server.telnet.bind_addr","127.0.0.1") #define two stations, station2 is fallback stream for station1 radio= input.http(id="station1", "http://init/liquidsoap") radio=mksafe(radio) #output stream - http://localhost:8000/radio output.harbor( protocol="http", port=8000, mount="/radio", format="audio/ogg", %vorbis.cbr(samplerate=44100, channels=2, bitrate=160), radio ) #avoid buffer overruns output.dummy(fallible=true, radio); The stripped down stream switch works like if ((defined $url) &&( $url=~/^https?\:\/\//) ){ #get current url my $playing_url=liquidsoap_cmd('radio.url'); if ($url ne $playing_url){ #switch liquidsoap_cmd('radio.stop'); #direct set after stop did not always work in the past, so wait a moment (buffers will continuing playing output) sleep(1); liquidsoap_cmd('radio.url '.$url); liquidsoap_cmd('radio.start'); } }else{ #mute channel liquidsoap_cmd(radio.url http://warning/invalid_url'); liquidsoap_cmd(radio.stop'); my $playing_url=liquidsoap_cmd('radio.url'); } where liquidsoap_cmd basically writes command to telnet and reads the command's output This is to be called frequently. It will check if the current played url is the one to be played and stop the output, and set the new URL. in case no valid URL is given, the output will be stopped. We use this for several years without any problems. BR, peter Am 09.06.2014 um 18:33 schrieb udo noll: > hello, > i'd like to experiment with multiple live inputs, which are > mounted on an icecast server, on defined mountpoints. i'd have > to pull these streams with input.http, harbour isn't possible. > ideally i'd want to create a start/stop telnet command, e.g. > dyn_source_1.stop / dyn_source_1.start etc.. that works fine > for manually defined input.http, but i'd need some hints how > to do that dynamcally. ideas apprechiated, thanks, udo > > ------------------------------------------------------------------------------ > HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions > Find What Matters Most in Your Big Data with HPCC Systems > Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. > Leverages Graph Analysis for Fast Processing & Easy Data Exploration > http://www.hpccsystems.com > _______________________________________________ > Savonet-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/savonet-users > ------------------------------------------------------------------------------ Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk _______________________________________________ Savonet-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/savonet-users
