2013/8/9 Akos Veres <firstname.lastname@example.org>
> Hi everyone,
> I'm having issues with output.file, here's my config:
> %mp3(stereo=true, bitrate=192, samplerate=44100, id3v2=true),
> "/MUSIC/RECORDINGS/Live_Auto_Recording/%Y-%m-%d/XTRadio-Live-%Y-%m-%d-%H_%M_%S.mp3", fallible=true, perm=509,
> The recording works fine, but the issue is that it creates an almost empty file if I restart liquidsoap, I get such files:
> -rwxrwxr-x 1 xt xt 626 Aug 9 11:32 XTRadio-Live-2013-08-09-11_32_55.mp3
> -rwxr-xr-x 1 xt xt 626 Aug 9 11:38 XTRadio-Live-2013-08-09-11_38_01.mp3
> In the logs I see:
> 2013/08/09 11:38:01 [/MUSIC/RECORDINGS/Live_Auto_Recording/%Y-%m-%d/XTRadio-Live-%Y-%m-%d-%H_%M_%S(dot)mp3:3] Source failed (no more tracks) stopping output...
> Is there any workaround for this?
> Also if I use input.harbor, it has a dumpfile, can I use %Y-%m-%d for the filename and/or directories? That seems to work fine, I do get it's for debugging purposes, but seems it's working better, than the above config.
Yeah, I'd recommend against using the dump option for that purpose.
What you observe is a combination of several issues:
* First, the recorded source goes temporarily down, which cause the file output to restart
* Second, the file name's variable are too restricted and lead to a new file opened after each restart
There are several things you may do to mitigate the situation:
* Have a less restricted filename, for instance only down to the hour and use the append option to make sure the new stream is added when the source restarts
* Find a way to make sure that the dumped source never goes down. You can use for instance a mksafe for that. However, if you go this route then you'll have to think about a way to make sure that the archive actually stops.
All this being said, I think I'd start by looking at why the source goes down. If that's a live source, it certainly indicates a gap in the audio data, which should not happen, regardless of the issue with dumping an archive of it..