On 22.2.2009, at 20.38, Jonas Smedegaard wrote:
On Fri, Feb 20, 2009 at 04:08:15PM +0200, [email protected] wrote:Possible work-arounds: 1) adjust source-timeout in icecast.xml 2) use encoder in managed bit rate mode (set a minimum bit rate)Which of the workarounds would you consider best?
Difficult to say. I used the source-timeout adjustment for my local uses (source is on the same box). I adjusted it to 30 minutes (obscenely high), but I tested further and I believe 50-60 seconds would be enough. The drawback: a timed-out source can't reconnect during the timeout period.
The managed bit rate work-around... legend says that it degrades the audio quality slightly, the encoder uses more cpu, and it's a waste of bandwidth.
Feel free to experiment yourself: # create 10 minutes of silence dd if=/dev/zero bs=44100 count=2400 | oggenc -r -o silence.ogg - # stream it <silence.ogg oggfwd localhost 8000 hackme /test.ogg (Also play with the managed bit rate options of oggenc)
Could you perhaps provide a proposed patch?
I believe that's a job for the upstream.Nevertheless, I created a patch. It doesn't disconnect if there are still bytes left in the queue (I have *no* idea if this counter goes to zero on a regular timeout). I don't know how it affects the timeout behaviour of real-world situations.
source-timeout.patch
Description: Binary data

