From: David B. <dav...@en...> - 2010-06-06 21:02:20
|
Hi Cees, Here is how to adapt your script to SVN, using clocks to avoid that when icecast lags, no output is read from the soundcard, causing a gap in the backup. On Sun, May 30, 2010 at 2:44 PM, Cees van Egmond <cee...@gm...> wrote: > set("log.file",true) > set("log.file.path","/home/user/liquidsoap.log") > set("log.stdout",true) Same deal, but you need to remove root.sync=false. > input = input.oss() We change this as follows, allocating a dedicated clock for OSS (called wallclock_oss in the logs): input = clock(id="oss",sync=false, input.oss()) > output.icecast.mp3( > host="***", > port=80, > mount="***", > password="***", > restart=true, > bitrate=24, > samplerate=22050, > stereo=false, For the icecast output, use output.icecast(..) directly (not icecast.mp3) and package bitrate, samplerate and stereo parameters in a single parameter %mp3(bitrate=...). (See http://savonet.sourceforge.net/doc-svn/encoding_formats.html for details.) > mksafe(input)) Instead of input, pass buffer(input). This will allow the icecast output to be in a separate clock than the OSS input. You need mksafe because the buffer may empty if the other clock is too slow -- in practice, this shouldn't happen: icecast won't be significantly faster than your soundcard when the network is OK (it can happen because your soundcard internal clock could be faster than your computer's clock) and will be much slower when the network lags. > output.file.mp3( > "/home/user/backup/backup-%Y-%m-%d-%H-%M-%S.mp3", > input) Simply change output.file.mp3(..) into output.file(%mp3,...) and leave input as it is: this output will live in the OSS clock, never lagging (at least not because of loss of connectivity). Tell us how this goes! -- David |