name=kinofm" desc="Best music for you" set("harbor.bind_addr","0.0.0.0") live=input.harbor(id="lives",port=8003,password="pass") set("server.telnet",true) set("log.level",4) set("log.file.path","/home/fm/log/liq.log") jingles = playlist("/home/fm/music/jingles") music = playlist(reload=600, "/home/fm/music/music/*") music = mksafe(music) music = crossfade( fade_out = 7.0, fade_in = 7.0, start_next = 7.0, music ) radion = smooth_add(normal=music,special=switch([({ 00m0s or 8m0s }, jingles)]) radio = fallback([live,radion]) output.icecast(%vorbis,mount="kinoFm", host="localhost",,name=name, description=desc, port=8005, password="********",radio) #
#!/usr/bin/liquidsoap
#!/usr/local/bin/liquidsoap
radio = fallback([live,radion])
#!/usr/local/bin/liquidsoap -d # Log dir set("log.file.path","/home/taras/ls/basic.log") set("init.daemon",true) set("init.daemon.pidfile",false) set("server.telnet",true) set("log.stdout",false) set("harbor.bind_addr","0.0.0.0") live = input.harbor("live",port=9000,password="****") def crossfade2(a,b) add(normalize=false, [ sequence([ blank(duration=5.), fade.initial(duration=10.,b) ]), fade.final(duration=10.,a) ]) end def my_request_function() = # Get the first line of my external process log = log(label="rotator") log("Getting song") result = list.hd( get_process_lines("/home/taras/ls/rotator.pl")) log("Got answer: #{result}") # Create and return a request using this result request.create(result) end def lastfm(m) = log = log(label="LastFM") log("#{m['artist']} - #{m['title']}") system("/home/taras/ls/lastfm.py #{quote(m['artist'])} #{quote(m['title'])} 300 & >/dev/null") end def queue_upd(m) = log = log(label="Queue") log("Queue update") system("/home/taras/ls/queue-history.pl & >/dev/null") end myplaylist = request.dynamic(my_request_function) queue = request.queue(id="queue", length=0.5) myplaylist = mksafe(fallback([queue, myplaylist])) myplaylist = compress(gain=3.,ratio=2.,threshold=-15.,myplaylist) list = crossfade(start_next=5.,fade_out=3.,fade_in=1.,myplaylist) radio = mksafe(fallback(track_sensitive=false, transitions=[crossfade2],[live, list])) radio = on_metadata(queue_upd, radio) radio = on_metadata(lastfm, radio) radio = register_flow( radio="Dead Radio", website="http://deadradio.org.ua", description="", genre="Black Metal", streams=[("mp3/256k","http://deadradio.org.ua:666/;stream.nsv")], radio) output.shoutcast(%mp3(stereo=true, samplerate=44100, bitrate=256), id="stream", fallible = true, icy_metadata="true", icq="400055993", format="audio/mpeg", public=true, host="deadradio.org.ua", port=3214, password="*****", name="Dead Radio", genre="Black metal", url="http://deadradio.org.ua", radio)