41 lines
1.2 KiB
Plaintext
41 lines
1.2 KiB
Plaintext
#!/usr/bin/liquidsoap
|
|
#
|
|
def integrity_check(filename)
|
|
log.important("Integrity check of #{filename}.")
|
|
ts = string.split(separator='/', filename)
|
|
ts = int_of_string(list.hd(string.split(separator='\.', list.nth(ts, list.length(ts)-1))))
|
|
if ts mod 60 == 0 then
|
|
log.important("#{filename} is ok")
|
|
else
|
|
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=integrity_check)
|
|
|