#!/usr/bin/liquidsoap def clean_and_check (filename) ts = string.split(separator='/', filename) ts = int_of_string(list.hd(string.split(separator='\.', list.nth(ts, list.length(ts)-1)))) integrity_check (ts) clean_old_pige (ts) end def clean_and_check (filename) end def integrity_check(filename) if ts mod 60 != 0 then log.important("#{filename} is to fix") end end # Mux input1 = mksafe(input.harbor("direct.ogg",port=8000,password="JsCabjWJUZXrrrKCaaRZma5wD4YKj5LQLXv6f")) # Direct mp3 output.icecast( %mp3(bitrate=128, samplerate=22050, stereo=false), mount="/direct.mp3", host="icecast", port=8000, password="JsCabjWJUZXrrrKCaaRZma5wD4YKj5LQLXv6f", input1) # Radioking #output.icecast( # %mp3(bitrate=128, samplerate=22050, stereo=false), # mount="/test355", # host="live.radioking.com", port=80, user="", password="", # input) # Direct ogg output.icecast( %vorbis(samplerate=44100, channels=1, quality=0.2), mount="/direct.ogg", host="icecast", port=8000, password="JsCabjWJUZXrrrKCaaRZma5wD4YKj5LQLXv6f", input1) # Pige output.file(%vorbis(samplerate=44100, channels=1, quality=0.2), {"/soundbase/pige/#{int_of_float(time())}.ogg"}, input1, reopen_when={0s}, reopen_delay=1.0, on_close=clean_and_check)