On Tue, Sep 18, 2012 at 7:21 PM, George Niculae <[email protected]> wrote:

> On Wed, Sep 19, 2012 at 1:35 AM, Jeff Pyle <[email protected]>
> wrote:
> > Hi George,
> >
> > Thanks for the quick reply!
> >
> > The record rate (sample rate) is no issue.  Through the web GUI I can
> choose
> > either 8khz or 16khz, as you indicate.  I'm referring to attributes
> unique
> > to MP3 creation, specifically, the bitrate.  This is related to the audio
> > compression in the MP3 encoding process.
> >
> > I don't have a file up in front of me but I seem to remember it
> compresses
> > at 16 kbps (not to be confused with the 16 kHz sample rate).  I'd like
> to at
> > least double that to 32 kbps, or as I mentioned, variable bitrate at a
> > selectable quality setting would be phenomenal.
> >
> > Does that make sense?  I'm trying to wring out some of the warble
> inherent
> > to a 16 kbps MP3.  Efficient with filesize, but you pay for it in audio
> > quality.
> >
>
> Yep, it does. There are options to add in
> /etc/sipxpbx/freeswitch/conf/autoload_configs/shout.conf.xml as
>
> <param name="encode-brate" value="32"/>
> <param name="encode-resample" value="44100"/>
> <param name="encode-quality" value="0"/>
>
> (support added with http://jira.freeswitch.org/browse/FS-1231)
>
> didn't play with them, please report back with findings


This is exactly what I was looking for.

mod_shout seems to use the Lame library so these options translate to lame
command line options, if one were familiar with those.

The "encode-brate" sets the encoder to use a fixed bitrate, specified in
kbps.  Equivalent to the "-b" option on the lame command line.  8 kHz
sources can use any value 8-64 kbps at multiples of 8, while 16 kHz sources
can use 8-160 kbps on the multiples.  I find 64 kbps to be an acceptable
improvement over the default for 16 kHz recordings.  Similarly, 32 kbps for
8 kHz is just fine.

The "encode-resample" value forces the encoder to resample at the specified
rate.  Equivalent to the "--resample" option on the command line.  If you
don't set this, the sample rate of the resulting MP3 will be whatever is
set in the sipX web GUI / sipxivr.xml.  Leaving it default makes sense to
me.

The "encode-quality" value sets the noise shaping and psycho-acoustic
algorithms of the encoder.  mod_shout's default is 2, equivalent to a "-h"
high-quality setting on the command line.  I don't see any reason to ever
change this.  Setting it to 1 might squeak out a touch more fidelity, but
lame warns that it's "...slow and may not produce significantly higher
quality [than the default]."  Point taken.

Unfortunately mod_shout doesn't appear support lame's variable bitrate
options.  Bummer, that would have been fun.

The bottom line?  I set the "Record rate" on the System -> Voicemail page
to 16000, and I added one line
to /etc/sipxpbx/freeswitch/conf/autoload_configs/shout.conf.xml:

  <param name="encode-brate" value="64"/>

Life is good.  A 64 kbps MP3 @ 16 kHz and a 32 kbps MP3 @ 8 kHz are a
quarter the size of their WAV equivalents with a quality high enough most
folks can't hear any compression artifacts at all.  Works for me.


- Jeff
_______________________________________________
sipx-users mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-users/

Reply via email to