This is what script I have written long ago does. If you connect to port 8001 mountpoint /live, the music stream will be interrupted. Beware, some lines are really deprecated. And music tracks aren't being crossfaded. The jingle isn't inserted exactly every 4 tracks but randomized: playing music track is 4 times more likely than playing jingle. Replace "random" with "rotate" if you want to change this.
Also, have a look at official tutorial: http://savonet.sourceforge.net/doc-svn/quick_start.html http://savonet.sourceforge.net/doc-svn/complete_case.html Happy hacking! adiblol #!/usr/bin/liquidsoap ############################################################### ## No Copyright (!C) 2011-2014 1Tbps.org ## ## ## Live_stream(input_Icecast-compatible) ## \ _ C ## Music >- fallback_with_transition /| L ## \ / \ / I ## >- RANDOMization >- fallback --> Icecast2 ---> E ## / / \ N ## Jingle White_noise _\| T ## S ## ############################################################### set("log.file.path", "/var/log/liquidsoap/radio_test.log") set("harbor.bind_addr", "0.0.0.0") #set("harbor.port", 8001) #set("harbor.password", "x") set("log.stdout", true) #set("log.level", 6) #playlist_url = "http://api.jamendo.com/get2/id+stream/track/xspf/?n=100&order=random_desc&streamencoding=ogg2&tag_idstr=rock+grunge" playlist_url = "/var/lib/mpd/music/" default = amplify(0.25, noise()) # should never be needed jingle = audio_to_stereo(single(id="jingle", "/home/radio/jingle.flac")) music = playlist(id="music", playlist_url, mode="random") live = input.harbor(id="live_in", port=8001, password="x", buffer=5., "/live") music = stream_in def cross_sources(a,b) add(normalize=false, [ sequence([ fade.initial(duration=5.,b) ]), fade.final(duration=5.,a) ] ) end radio = music radio = random(weights=[1, 4], [jingle, radio]) radio = fallback(track_sensitive=false, transitions=[cross_sources, cross_sources], [live, radio]) radio = fallback(track_sensitive=false, [radio, default]) radio = audio_to_stereo(radio) # output.harbor(mount="/radio", port=8001, %ogg(%flac), radio) # FLAC output, at the time of writing this script Icecast didn't support FLAC. # fm trasmitter experiment: #radiofm = sky(radio) #radiofm = limit(attack=1., release=100., ratio=32., gain=6., threshold=-7., rms_window=0.01, radiofm) # this sucks, I should have used LADSPA "Fast Lookahead Limiter" instead #output.alsa(device="front:CARD=Intel,DEV=0", radiofm) # uncomment to manipulate dynamics... #radio = sky(radio) #radio = nrj(radio) output.icecast.vorbis(host="localhost", port=8000, password="x", mount="radio_test.ogg", quality=3., description="x", url="http://example.com/", radio) W dniu 2014-03-06 13:48, Tim napisaĆ(a): > I am new to Liquidsoap. I need help with a simple script. I want to > play all > the mp3's in a specified folder 24 hours a day and add jingles every > 4 songs. > I also want to be able to interupt and take over the radio live using > mixxx > or sam broadcaster. So when I connect via my mixxx it fades off the > auto > stream and when i log off mixxx the auto playlist will take over > again. > > I am a scriptor just trying to learn the syntax for the liquidsoap > scripts. > If you can just point me to a similar script i can tweak it. > > Thanks > > Tim > > > > ------------------------------------------------------------------------------ > Subversion Kills Productivity. Get off Subversion & Make the Move to > Perforce. > With Perforce, you get hassle-free workflows. Merge that actually > works. > Faster operations. Version large binaries. Built-in WAN optimization > and the > freedom to use Git, Perforce or both. Make the move to Perforce. > > http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk > _______________________________________________ > Savonet-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/savonet-users ------------------------------------------------------------------------------ Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. With Perforce, you get hassle-free workflows. Merge that actually works. Faster operations. Version large binaries. Built-in WAN optimization and the freedom to use Git, Perforce or both. Make the move to Perforce. http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk _______________________________________________ Savonet-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/savonet-users
