vibroscopio/scripts/prober.liq
2023-08-21 09:43:27 +02:00

44 lines
770 B
Text

#!/usr/bin/liquidsoap
in = mksafe(single("/srv/assets/sample.mp3"))
def vibroscopio(path) =
# out = process.read.lines(
# "/home/me/path/to/beet random -f '$path' #{arg}"
# )
# log(out)
# )
log(path)
end
output.file(
%wav(
mono=true,
channels=1,
duration=30.
),
"/srv/stage/source/%H.%M.%S.wav",
reopen_when = {0s or 30s},
reopen_delay = 20.,
on_close = vibroscopio,
in
)
output.file(
%wav(
mono=true,
channels=1,
duration=60.
),
"/srv/stage/target/%H.%M.%S.wav",
reopen_when = {0s},
reopen_delay = 10.,
on_close = vibroscopio,
in
)
# thread.run(every=3600.,
# fun () -> (),
# process.read.lines("find /srv/stage/* -type f -mmin +2 -delete")
# )