Jørgen Elgaard Larsen
2004-Aug-06 14:23 UTC
[icecast] Server drops client - problem with IceS?
Geoff Shang wrote:> Does your playback match the sound that you are encoding? Perhaps share > your config file so we can help troubleshoot this.I would think so, but I might have missed something. <p>Here is my IceS2-config - with this one, the problem manifests after 2 minutes of playing, and the client is disconnected after 3 minutes. I have tried tweaking bitrate, quality, samplerates etc. While it does have _some_ effect on how long the client stays connected, it is not much. <p><?xml version="1.0"?> <ices> <background>1</background> <!-- run in background? --> <logpath>/var/log/icecast</logpath> <!-- where logs, etc go. --> <logfile>ices.log</logfile> <loglevel>4</loglevel> <!-- 1=error,2=warn,3=info,4=debug --> <consolelog>0</consolelog> <!-- set this to 1 to log to console of file above --> <pidfile>/var/run/ices.pid</pidfile> <stream> <!-- metadata used for stream listing (not currently used) --> <metadata> <name>Test of Icecast</name> <genre>Test</genre> <description>Testing 1,2,3</description> </metadata> <input> <module>alsa</module> <param name="rate">44100</param> <param name="channels">2</param> <!-- number of channels --> <param name="device">hw:0,0</param> <!-- audio device --> <param name="metadata">1</param> <param name="metadatafilename">/etc/icecast/meta</param> </input> <instance> <hostname>localhost</hostname> <port>9090</port> <password>xxxx</password> <mount>/test4.ogg</mount> <reconnectdelay>1</reconnectdelay> <reconnectattempts>50</reconnectattempts> <maxqueuelength>180</maxqueuelength> <encode> <managed>0</managed> <nominal-bitrate>128000</nominal-bitrate> <!-- bps. e.g. 64000 for 64 kbps --> <!-- bps. e.g. 32000 optimal for lesser cards --> <samplerate>44100</samplerate> <!-- 220500 optimal for older cards --> <channels>2</channels> <quality>3</quality> </encode> </instance> </stream> </ices> <p>Sincerely, <p>Jørgen Elgaard Larsen IT Manager University Radio of Copenhagen Denmark --- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: http://www.icecast.org/ To unsubscribe from this list, send a message to 'icecast-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
On Wed, 4 Feb 2004, Jørgen Elgaard Larsen wrote:> <managed>0</managed> > <nominal-bitrate>128000</nominal-bitrate> > <!-- bps. e.g. 64000 for 64 kbps --> > <!-- bps. e.g. 32000 optimal for lesser cards --> > <samplerate>44100</samplerate> > <!-- 220500 optimal for older cards --> > <channels>2</channels> > <quality>3</quality>hmmm. Wonder if specifying both nominal and quality is causing an issue somewhere? Geoff. <p>--- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: http://www.icecast.org/ To unsubscribe from this list, send a message to 'icecast-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Jørgen Elgaard Larsen
2004-Aug-06 14:23 UTC
[icecast] Server drops client - problem with IceS?
Geoff Shang wrote:> hmmm. Wonder if specifying both nominal and quality is causing an issue > somewhere?I don't think so. Using just one of them does not make the error go away. <p>I have, however, found the error (after some debugging): In the alsa imput module (placed in the source file im_alsa.c), the sample rate on the alsa device is set using the snd_pcm_hw_params_set_rate_near() call. Reading the ALSA API it was suddenly clear to me, that this means that if the sound card does not like the sample rate, you ask for, alsa will just pick the nearest samplerate. In my case, I asked for 44100, but the alsa driver was really initialised to 48000. No wonder there was too many samples when the encoder still thinks that it should use 44100 :-S I have made a patch to im_alsa.c so that you at least will be warned that it selects another sample rate than you ordered. I will post it to the developer list. <p>Had it not been for open source, I would never have found this one! <p><p>Sincerely, <p>Jørgen Elgaard Larsen IT Manager University Radio of Copenhagen Denmark --- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: http://www.icecast.org/ To unsubscribe from this list, send a message to 'icecast-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.