[Freeswitch-users] .wav vs .gsm file sizes for recording calls.

Michael Collins msc at freeswitch.org
Sat Jun 25 03:31:14 MSD 2011


I would caution you to consider adding disk space before you try to compress
all your recordings. The 16 bit SLIN that FS normally puts in your wave
files are pretty easy to handle, whether playing back in a FS session, or
encoding for playback on some other device.

An alternative might be to use lame to convert them to MP3's or ogg/vorbis
files. If you look on the main FS conf call page you'll see I have the
weekly recordings in multiple formats. (
http://wiki.freeswitch.org/wiki/Weekly_Conference_Call#Past_Calls)

Here are some stats for last Wednesday's call. Note that I record wave files
in 48kHz then use sox to downsample to 16kHz wave, then I convert that 16kHz
file into MP3 and Vorbis (in an ogg container). Here's what the results look
like:

<2831>:ls -1s conf_call_2011-06-15.*
 18736 conf_call_2011-06-15.mp3
 23044 conf_call_2011-06-15.ogg
199756 conf_call_2011-06-15.wav

<2832>:file conf_call_2011-06-15.mp3
conf_call_2011-06-15.mp3: MPEG ADTS, layer III, v2,  24 kBits, 16 kHz,
Monaural

<2833>:file conf_call_2011-06-15.ogg
conf_call_2011-06-15.ogg: Ogg data, Vorbis audio, mono, 16000 Hz, ~48000
bps, created by: Xiph.Org libVorbis I

<2834>:file conf_call_2011-06-15.wav
conf_call_2011-06-15.wav: RIFF (little-endian) data, WAVE audio, Microsoft
PCM, 16 bit, mono 16000 Hz

Note that the file sizes are in 1K blocks.

So, bottom line is this: if you have the disk space then use wave. If you
don't have disk space for wave then get some! :D If you REALLY need to use a
different format then choose something like MP3 or Vorbis for long-term
storage.

-MC

On Fri, Jun 24, 2011 at 2:26 PM, Wes <wes-fs at 499x.com> wrote:

> In my tests, if I record a call in .wav format, a 10 second file is
> about 177,000 bytes, while a 10 second .gsm file is 17,000 bytes.
>
> I  then used sox to convert the .gsm file to a .wav file, and it stayed
> at around 17,000 bytes.  So, is the default recording format for .wav
> using a higher sample rate? vs the default conversion format for the sox
> tool?
>
> checking the file type using "file" I see that the larger one is:
> RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 8000 Hz
>
> and the wav created by sox via the default conversion from .gsm is:
> RIFF (little-endian) data, WAVE audio, GSM 6.10, mono 8000 Hz
>
> So apparently the larger wav file is 16 bit... how are these recording
> parameters controlled?  Can I set it to record directly into the smaller
> wav format? Or will I have to run sox on every file...
>
> _______________________________________________
> Join us at ClueCon 2011, Aug 9-11, Chicago
> http://www.cluecon.com 877-7-4ACLUE
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20110624/ad6e1a70/attachment-0001.html 


More information about the FreeSWITCH-users mailing list