[asterisk-users] Re: Configuring meetme recording quality (8kHz to 32kHz or higher)

Tony Mountifield tony at softins.clara.co.uk
Fri Aug 4 04:02:50 MST 2006


In article <44D31E68.1080902 at decisionworx.com>,
Jan du Toit <jan.du.toit at decisionworx.com> wrote:
> Hi.
> 
> At the moment we record our meetme conference to wav format, after which 
> we have a script in place converting the wav to mp3 format.
> 
> I need it to be encoded with MPEG1-layer3, so that I can play it back 
> via our application using the Java Media Framework, but the wave files 
> are encoded to MPEG2.5-Layer3. This is because asterisk records the 
> files at 8kHz. You can't encode a 8kHz wave file to MPEG1-layer 3, only 
> to MPEG2.5-Layer 3.
> 
> In order to encode a wave file to MPEG1-layer3 you need either 32, 44.1 
> or 48 kHz.
> 
> So my question is can you/how configure asterisk to record at 32kHz and 
> not 8kHz?

You can't. All you can do is convert it afterwards:

sox 8khzfile.wav -r32000 32khzfile.wav

If you compile up a version of sox that includes the LAME encoder and
decoder for MP3 files, you could probably do both operations at once.

However, upconverting to 32kHz doesn't give you any more information
and will probably make the files larger. I have found MP3 encoding of
voice conferences not very satisfactory. Much better results can be
achieved by converting to ADPCM-format WAV files:

sox 8khzfile.wav -a adpcmfile.wav

This gives a factor of 4 reduction, from 16 bits per sample to 4 bits
per sample, i.e. 4000 bytes per second, plus 44 byte header.

Cheers
Tony
-- 
Tony Mountifield
Work: tony at softins.co.uk - http://www.softins.co.uk
Play: tony at mountifield.org - http://tony.mountifield.org



More information about the asterisk-users mailing list