[Icecast] audio sample rates

Vieri rentorbuy at yahoo.com
Mon Feb 14 14:01:20 UTC 2011


I have an Icecast server and an Asterisk dialplan containing a call to ICES(/my/ices.xml).

So Asterisk launches "ices /my/ices.xml" where /my/ices.xml contains:

<input>
  <module>stdinpcm</module>
  <param name="rate">8000</param>
  <param name="channels">1</param>
</input>

and

<encode>
  <samplerate>8000</samplerate>
  <channels>1</channels>
</encode>

If I place a call through Asterisk so that ICES is spawned, I can talk on the phone and here myself clearly on a shout client like VideoLan's VLC connected to my Icecast URL.

However, if Icecast is configured to use another stream (or the Asterisk stream) as a "fallback-mount" and the sample rates are not identical, audio on the client is crippled.
However, if I stop the VLC client and reconnect to the Icecast URL, audio is OK, whether listening to one or the other stream source with different rates.
So is it just a client bug or an expected behavior? I guess the client can't tell if there's a sample rate change unless it reconnects so it may not be a client bug.
I suppose I must make sure the sampe rates are identical in the fallback stream.

Does anyone know how I can achieve this?
Changing /my/ices.xml's <encode> samplerate to 44100 doesn't seem to work or is unsupported.

Can reencoding be done externally by another command-line program before sending it to Icecast?

Thanks,

Vieri



      



More information about the Icecast mailing list