Reputation: 63
i have successfully set up liquidsoap with icecast2 and everything is working fine in my configuration at 12.00 I want to play "minute of silence" and national anthem (they are both combined in single file) the matter is if song is playing while time switches to 12.00 so icecast is waiting current song to finish and then plays the anthem. question is how can I interrupt live stream exactly at 12.00 and the play as usual?
here's my liquidsoap config:
#!/root/.opam/default/bin/liquidsoap
set("init.allow_root",true)
out = output.icecast(host = "127.0.0.1",port = 8082,user = "source",password = "passforsource",name = "Streamcast",genre = "Various",url = "https://stackoverflow.com",encoding = "UTF-8")
set("server.telnet.bind_addr","127.0.0.1")
set("server.telnet",true)
dir = "/var/www/html/public/storage/radio"
music_dir = "#{dir}/music"
jingles_dir = "#{dir}/jingles"
set("log.file.path","#{dir}/radio.log")
set("log.level", 3)
jingles = playlist(reload=86400,"#{jingles_dir}")
music = playlist(reload=86400,"#{music_dir}")
national_anthem = single("/var/www/html/public/storage/radio/special-playlists/silence_then_anthem.ogg")
radio = switch([(predicate.activates({ 12h-12h3m }), national_anthem), ({ true }, rotate(weights = [15, 1],[music,jingles]))])
radio = mksafe(radio)
radio = crossfade(smart=true,duration=2.00,fade_out=1.25,fade_in=1.00,radio)
out(
%vorbis.abr(samplerate = 44100, channels = 2, bitrate = 128, max_bitrate = 192, min_bitrate = 96),
description = "Average vorbis 96-128-192 Kbps",
mount = "stream",
mksafe(radio)
)
Upvotes: 1
Views: 574
Reputation: 63
i was so lame when wrote this, only thing that must be done here is adding "track_sensitive=false" so the final code will be:
radio = switch(track_sensitive=false,[(predicate.activates({ 12h-12h3m }), national_anthem), ({ true }, rotate(weights = [15, 1],[music,jingles]))])
Upvotes: 1