[Icecast] audio sample rates

Geoff Shang geoff at QuiteLikely.com
Mon Feb 14 22:07:08 UTC 2011


On Mon, 14 Feb 2011, Vieri wrote:

> 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.

Since this is Ices2 and it's outputting Ogg Vorbis, I'dve thought this 
should work.  So maybe it is a client bug.  Certainly, if you were sending 
MP3, it would have to be the same sample/channels, but IMHO Ogg Vorbis 
players *should* deal with it.

> 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.

You can get Ices to reencode for you.  Put this somewhere in your stream 
instance (not sure if placement matters):

                         <resample>
                           <in-rate>8000</in-rate>
                           <out-rate>44100</out-rate>
                         </resample>

And use 44100 in your encode section.

Note that there's the downmix parameter to convert stereo to mono, but I 
don't see any way to go the other way.   Maybe you can just specify two 
channels to the encoder and it'll get it right.  I've also not tried 
up-sampling like this but it should work in theory.

Good luck!

Geoff.




More information about the Icecast mailing list