[Icecast] ezstream question
larry at acbradio.org
Wed Feb 10 04:39:23 PST 2016
Thanks Geoff, I will give it a try.
I am reencoding all files to a 128K mp3, 44100 sample rate stereo stream
So yes I have the decode and encode lines in the xml file as you outlined.
I will check out sox and see how it does.
I am also exploring mp3gain to run across the entire library and see if
getting all files to the same level will help.
From: icecast-bounces at xiph.org [mailto:icecast-bounces at xiph.org] On Behalf
Of Geoff Shang
Sent: Wednesday, February 10, 2016 3:44 AM
To: Icecast streaming server user discussions <icecast at xiph.org>
Subject: Re: [Icecast] ezstream question
On Tue, 9 Feb 2016, Larry Turnbull wrote:
> One of the streams is an old time radio stream and I use ezstream to
> run the prerecorded shows.
> Is there a package or some sort of way I can apply dynamic compression
> to the stream?
Ezstream really isn't designed for this. It's primarily meant for streaming
files as they are, which is a very light-weight operation, with the ability
to reencode for the case where files aren't at the same bitrate/format.
Having said this, if you run it in reencode mode, it should be possible to
pipe through a compressor like's sox's compand effect on the way to the
If you're running in reencode mode, you should have something like this
example from the documentation in your config file:
Support for MP3 decoding via madplay, and encoding via
<!-- Note: madplay uses host byte order for raw samples. -->
<decode>madplay -b 16 -R 44100 -S -o raw:- "@T@"</decode>
<encode>lame --preset cbr 128 -r -s 44.1 --bitwidth 16 -
You could change the encode line to read something like this:
<encode>sox -t raw -r 44100 -c 2 -b 16 -e signed - -t raw - compand 0.3,1
6:-70,-60,-20 -5 -90 0.2 |lame --preset cbr 128 -r -s 44.1 --bitwidth 16
Or the shorter version:
<encode>sox -t raw -r44.1k -c2 -b16 -e signed - -t raw - compand 0.3,1
6:-70,-60,-20 -5 -90 0.2 |lame -r -</encdec>
For the shorter version, 128 kbps CBR is default MP3 output format, and raw
input defaults to 44.1kHz 16-bit stereo signed, so can be omitted if you
want to use these values but must be specified if you want something else.
If you hear loud static instead of the expected audio, you'll need to use
the -x switch with either sox or lame, depending on which one isn't getting
the bit order it expects.
Note that I just grabbed this compand example from the sox manpage, you may
want to tweek it to get the sound you want. I tried it on what I believe to
be the stream in question and it did seem to make a difference without it
being obvious, so maybe it will work nicely as is.
You will need to install the sox and libsox-fmt-mp3 packages, or at least
that's what they're called in Debian.
finally, if you're not actually using reencode mode at the moment, this will
consume significantly more CPU than your current setup.
It's never occured to me to do this, I'd be interested to know how well it
Icecast mailing list
Icecast at xiph.org
More information about the Icecast