.wav vs .gsm file sizes for recording calls.
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...
Wes, it's because you are confusing 2 things. GSM is a codec, so it's a sound format. WAVE is a kind of container (like MKV) that can contain various codecs. In your case, you probably did a mistake using sox (it's not an easy tool), so you ended up with a wav which is still GSM audio inside. You have to tell sox which exact output format you want. AFAIR, you have to use the -s option (for signed linear). David Ponzone Direction Technique email: david.ponzone@ipeva.fr tel: 01 74 03 18 97 gsm: 06 66 98 76 34 Service Client IPeva tel: 0811 46 26 26 www.ipeva.fr - www.ipeva-studio.com Ce message et toutes les pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisée est interdite. Tout message électronique est susceptible d'altération. IPeva décline toute responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié. Si vous n'êtes pas destinataire de ce message, merci de le détruire immédiatement et d'avertir l'expéditeur. Le 24/06/2011 à 23:26, Wes a écrit :
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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
A gentle warning when using GSM codecs Every codec compress voice at the cost of quality. And some codecs like GSM and G.729 are not a nice combination. If you use GSM to save disk space and play it back using G.729 the resulting voice might contain some added noise due to algorithmic incompatibility. jan _____ From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of David Ponzone Sent: 24. juni 2011 23:42 To: FreeSWITCH Users Help Subject: Re: [Freeswitch-users] .wav vs .gsm file sizes for recording calls. Wes, it's because you are confusing 2 things. GSM is a codec, so it's a sound format. WAVE is a kind of container (like MKV) that can contain various codecs. In your case, you probably did a mistake using sox (it's not an easy tool), so you ended up with a wav which is still GSM audio inside. You have to tell sox which exact output format you want. AFAIR, you have to use the -s option (for signed linear). David Ponzone Direction Technique email: david.ponzone@ipeva.fr tel: 01 74 03 18 97 gsm: 06 66 98 76 34 Service Client IPeva tel: 0811 46 26 26 www.ipeva.fr <BLOCKED::http://www.ipeva.fr/> - www.ipeva-studio.com <BLOCKED::http://www.ipeva-studio.com/> Ce message et toutes les pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisée est interdite. Tout message électronique est susceptible d'altération. IPeva décline toute responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié. Si vous n'êtes pas destinataire de ce message, merci de le détruire immédiatement et d'avertir l'expéditeur. Le 24/06/2011 à 23:26, Wes a écrit : 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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Practically any conversion of a low bit rate codec to another low bit rate codec gives horrible results. Even low bit rate codec -> linear -> the same low bit rate codec can be pretty horrible, unless the two compression steps are synchronised. A lot of the complaints you will find about the horrible sound from some codec has little to do with the codec's performance. Someone has tried the codec with audio that had already been compressed by some other low bit rate codec. Steve On 06/25/2011 05:53 AM, Jan Berger wrote:
A gentle warning when using GSM codec’s
Every codec compress voice at the cost of quality. And some codec’s like GSM and G.729 are not a nice combination. If you use GSM to save disk space and play it back using G.729 the resulting voice might contain some added noise due to algorithmic incompatibility.
jan
------------------------------------------------------------------------
*From:*freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *David Ponzone *Sent:* 24. juni 2011 23:42 *To:* FreeSWITCH Users Help *Subject:* Re: [Freeswitch-users] .wav vs .gsm file sizes for recording calls.
Wes,
it's because you are confusing 2 things.
GSM is a codec, so it's a sound format.
WAVE is a kind of container (like MKV) that can contain various codecs.
In your case, you probably did a mistake using sox (it's not an easy tool), so you ended up with a wav which is still GSM audio inside.
You have to tell sox which exact output format you want.
AFAIR, you have to use the -s option (for signed linear).
David Ponzone Direction Technique
email: david.ponzone@ipeva.fr <mailto:david.ponzone@ipeva.fr>
tel: 01 74 03 18 97
gsm: 06 66 98 76 34
Service ClientIPeva
tel: 0811 46 26 26
_www.ipeva.fr <BLOCKED::http://www.ipeva.fr/>_- _www.ipeva-studio.com <BLOCKED::http://www.ipeva-studio.com/>_
/Ce message et toutes les pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisée est interdite. Tout message électronique est susceptible d'altération. *IPeva* décline toute responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié. Si vous n'êtes pas destinataire de ce message, merci de le détruire immédiatement et d'avertir l'expéditeur./
__
Le 24/06/2011 à 23:26, Wes a écrit :
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@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Wav is just a standard file format, the size is decided by the contents. The first format is PCM which is 8000 bytes samples per sec The second is GSM which is compressed voice - so in short you changed the file format, but is was and still is GSM inside. To convert from PCM to GSM you need an application that can do so - WavePad etc. can be recommended. Jan -----Original Message----- From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Wes Sent: 24. juni 2011 23:26 To: FreeSWITCH Users Help Subject: [Freeswitch-users] .wav vs .gsm file sizes for recording calls. 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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
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@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
I guess part of my confusion here was due to the term "raw data" mentioned in conjunction with the .gsm extension on the wiki page below... but actually gsm is a compressed format. http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_record_session So, what is the best "compressed" format to use for recording voice (that is available as a direct recording format inside freeswitch)? There are tons of formats listed when I do "show file", but I tried a few and they are also giving me large files like the wav extension did. (au, for example) Even though the PCM/Wave format is preferred for voice quality, when we're talking about a 10:1 compression ratio, if the sound quality is still acceptable, I'd rather just record directly into the compressed format. We're talking about ~10- 20 minute recordings that will need to be transferred over the internet to a third party. On 6/24/2011 6:31 PM, Michael Collins wrote:
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@499x.com <mailto:wes-fs@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@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
You should really consider recording in SLIN, and then, batch compressing that later (during off-peak hours) to MP3 if you really need it to be smaller. Any efficient compression takes CPU, and you may want to avoid doing that live on your server. David Ponzone Direction Technique email: david.ponzone@ipeva.fr tel: 01 74 03 18 97 gsm: 06 66 98 76 34 Service Client IPeva tel: 0811 46 26 26 www.ipeva.fr - www.ipeva-studio.com Ce message et toutes les pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisée est interdite. Tout message électronique est susceptible d'altération. IPeva décline toute responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié. Si vous n'êtes pas destinataire de ce message, merci de le détruire immédiatement et d'avertir l'expéditeur. Le 27/06/2011 à 21:43, Wes a écrit :
I guess part of my confusion here was due to the term "raw data" mentioned in conjunction with the .gsm extension on the wiki page below... but actually gsm is a compressed format.
http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_record_session
So, what is the best "compressed" format to use for recording voice (that is available as a direct recording format inside freeswitch)? There are tons of formats listed when I do "show file", but I tried a few and they are also giving me large files like the wav extension did. (au, for example)
Even though the PCM/Wave format is preferred for voice quality, when we're talking about a 10:1 compression ratio, if the sound quality is still acceptable, I'd rather just record directly into the compressed format. We're talking about ~10- 20 minute recordings that will need to be transferred over the internet to a third party.
On 6/24/2011 6:31 PM, Michael Collins wrote:
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@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
I'm sorry, but what is the SLIN format? I tried that extension and it's invalid. I searched the wiki and found nothing. On 6/27/2011 3:29 PM, David Ponzone wrote:
You should really consider recording in SLIN, and then, batch compressing that later (during off-peak hours) to MP3 if you really need it to be smaller. Any efficient compression takes CPU, and you may want to avoid doing that live on your server.
David Ponzone Direction Technique email: david.ponzone@ipeva.fr <mailto:david.ponzone@ipeva.fr> tel: 01 74 03 18 97 gsm: 06 66 98 76 34
Service ClientIPeva tel: 0811 46 26 26 www.ipeva.fr <BLOCKED::http://www.ipeva.fr/> - www.ipeva-studio.com <BLOCKED::http://www.ipeva-studio.com/>
/Ce message et toutes les pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisée est interdite. Tout message électronique est susceptible d'altération. /*/IPeva/*/ décline toute responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié. Si vous n'êtes pas destinataire de ce message, merci de le détruire immédiatement et d'avertir l'expéditeur./ / /
Le 27/06/2011 à 21:43, Wes a écrit :
I guess part of my confusion here was due to the term "raw data" mentioned in conjunction with the .gsm extension on the wiki page below... but actually gsm is a compressed format.
http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_record_session
So, what is the best "compressed" format to use for recording voice (that is available as a direct recording format inside freeswitch)? There are tons of formats listed when I do "show file", but I tried a few and they are also giving me large files like the wav extension did. (au, for example)
Even though the PCM/Wave format is preferred for voice quality, when we're talking about a 10:1 compression ratio, if the sound quality is still acceptable, I'd rather just record directly into the compressed format. We're talking about ~10- 20 minute recordings that will need to be transferred over the internet to a third party.
On 6/24/2011 6:31 PM, Michael Collins wrote:
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 <http://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@499x.com <mailto:wes-fs@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 <http://www.cluecon.com/> 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org <http://www.freeswitch.org/>
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
On Mon, Jun 27, 2011 at 1:45 PM, Wes <wes-fs@499x.com> wrote:
** I'm sorry, but what is the SLIN format? I tried that extension and it's invalid. I searched the wiki and found nothing.
http://en.wikipedia.org/wiki/Linear_pulse-code_modulation There's lots of names for it. Just think of SLIN as "the format normally stored in a .wav file." (That's an imperfect definition but it will help you get over the mental hump.) In summary, just record to .wav files and x-code later when there are more system resources available. You could also use "nice" or something like that to prevent the x-coding process from grabbing all your system resources. -MC
On 6/27/2011 3:29 PM, David Ponzone wrote:
You should really consider recording in SLIN, and then, batch compressing that later (during off-peak hours) to MP3 if you really need it to be smaller. Any efficient compression takes CPU, and you may want to avoid doing that live on your server.
David Ponzone Direction Technique email: david.ponzone@ipeva.fr tel: 01 74 03 18 97 gsm: 06 66 98 76 34
Service Client IPeva tel: 0811 46 26 26 www.ipeva.fr - www.ipeva-studio.com
*Ce message et toutes les pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisée est interdite. Tout message électronique est susceptible d'altération. **IPeva** décline toute responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié. Si vous n'êtes pas destinataire de ce message, merci de le détruire immédiatement et d'avertir l'expéditeur.* * *
Le 27/06/2011 à 21:43, Wes a écrit :
I guess part of my confusion here was due to the term "raw data" mentioned in conjunction with the .gsm extension on the wiki page below... but actually gsm is a compressed format.
http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_record_session
So, what is the best "compressed" format to use for recording voice (that is available as a direct recording format inside freeswitch)? There are tons of formats listed when I do "show file", but I tried a few and they are also giving me large files like the wav extension did. (au, for example)
Even though the PCM/Wave format is preferred for voice quality, when we're talking about a 10:1 compression ratio, if the sound quality is still acceptable, I'd rather just record directly into the compressed format. We're talking about ~10- 20 minute recordings that will need to be transferred over the internet to a third party.
On 6/24/2011 6:31 PM, Michael Collins wrote:
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@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicagohttp://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicagohttp://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing listFreeSWITCH-users@lists.freeswitch.orghttp://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-usershttp://www.frees...
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Its not just voice quality. It's also CPU. If you're using a compressed format, you're doing transcoding step. FS needs to decompress the file to L16 so it can compress it to the codec. Storing as wav containing l16 would avoid that. You can also use mod_native_file to compress the audio file to each codec format so that you don't need to transcode at all at the time because it's already done, although that does mean a file for each codec so more space needed. Steve on iPhone On 27 Jun 2011, at 20:43, Wes <wes-fs@499x.com> wrote:
I guess part of my confusion here was due to the term "raw data" mentioned in conjunction with the .gsm extension on the wiki page below... but actually gsm is a compressed format.
http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_record_session
So, what is the best "compressed" format to use for recording voice (that is available as a direct recording format inside freeswitch)? There are tons of formats listed when I do "show file", but I tried a few and they are also giving me large files like the wav extension did. (au, for example)
Even though the PCM/Wave format is preferred for voice quality, when we're talking about a 10:1 compression ratio, if the sound quality is still acceptable, I'd rather just record directly into the compressed format. We're talking about ~10- 20 minute recordings that will need to be transferred over the internet to a third party.
On 6/24/2011 6:31 PM, Michael Collins wrote:
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@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Steven, AFAIR, one of the recording app (not sure which) does not support mod_native_file, meaning for instance you can't dump your call using codec XXX to a raw file. That's a quite old limitation, so perhaps it's not an issue anymore. David Ponzone Direction Technique email: david.ponzone@ipeva.fr tel: 01 74 03 18 97 gsm: 06 66 98 76 34 Service Client IPeva tel: 0811 46 26 26 www.ipeva.fr - www.ipeva-studio.com Ce message et toutes les pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisée est interdite. Tout message électronique est susceptible d'altération. IPeva décline toute responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié. Si vous n'êtes pas destinataire de ce message, merci de le détruire immédiatement et d'avertir l'expéditeur. Le 28/06/2011 à 00:10, Steven Ayre a écrit :
Its not just voice quality. It's also CPU.
If you're using a compressed format, you're doing transcoding step. FS needs to decompress the file to L16 so it can compress it to the codec. Storing as wav containing l16 would avoid that. You can also use mod_native_file to compress the audio file to each codec format so that you don't need to transcode at all at the time because it's already done, although that does mean a file for each codec so more space needed.
Steve on iPhone
On 27 Jun 2011, at 20:43, Wes <wes-fs@499x.com> wrote:
I guess part of my confusion here was due to the term "raw data" mentioned in conjunction with the .gsm extension on the wiki page below... but actually gsm is a compressed format.
http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_record_session
So, what is the best "compressed" format to use for recording voice (that is available as a direct recording format inside freeswitch)? There are tons of formats listed when I do "show file", but I tried a few and they are also giving me large files like the wav extension did. (au, for example)
Even though the PCM/Wave format is preferred for voice quality, when we're talking about a 10:1 compression ratio, if the sound quality is still acceptable, I'd rather just record directly into the compressed format. We're talking about ~10- 20 minute recordings that will need to be transferred over the internet to a third party.
On 6/24/2011 6:31 PM, Michael Collins wrote:
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@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@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
You're right I think. :) Was talking about playback... guess it was pretty late. -Steve On 28 June 2011 00:28, David Ponzone <david.ponzone@ipeva.fr> wrote:
Steven,
AFAIR, one of the recording app (not sure which) does not support mod_native_file, meaning for instance you can't dump your call using codec XXX to a raw file. That's a quite old limitation, so perhaps it's not an issue anymore.
David Ponzone Direction Technique email: david.ponzone@ipeva.fr tel: 01 74 03 18 97 gsm: 06 66 98 76 34
Service Client IPeva tel: 0811 46 26 26 www.ipeva.fr - www.ipeva-studio.com
*Ce message et toutes les pièces jointes sont confidentiels et établis à l'intention exclusive de ses destinataires. Toute utilisation ou diffusion non autorisée est interdite. Tout message électronique est susceptible d'altération. **IPeva** décline toute responsabilité au titre de ce message s'il a été altéré, déformé ou falsifié. Si vous n'êtes pas destinataire de ce message, merci de le détruire immédiatement et d'avertir l'expéditeur.* * *
Le 28/06/2011 à 00:10, Steven Ayre a écrit :
Its not just voice quality. It's also CPU.
If you're using a compressed format, you're doing transcoding step. FS needs to decompress the file to L16 so it can compress it to the codec. Storing as wav containing l16 would avoid that. You can also use mod_native_file to compress the audio file to each codec format so that you don't need to transcode at all at the time because it's already done, although that does mean a file for each codec so more space needed.
Steve on iPhone
On 27 Jun 2011, at 20:43, Wes <wes-fs@499x.com> wrote:
I guess part of my confusion here was due to the term "raw data" mentioned in conjunction with the .gsm extension on the wiki page below... but actually gsm is a compressed format.
<http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_record_session> http://wiki.freeswitch.org/wiki/Misc._Dialplan_Tools_record_session
So, what is the best "compressed" format to use for recording voice (that is available as a direct recording format inside freeswitch)? There are tons of formats listed when I do "show file", but I tried a few and they are also giving me large files like the wav extension did. (au, for example)
Even though the PCM/Wave format is preferred for voice quality, when we're talking about a 10:1 compression ratio, if the sound quality is still acceptable, I'd rather just record directly into the compressed format. We're talking about ~10- 20 minute recordings that will need to be transferred over the internet to a third party.
On 6/24/2011 6:31 PM, Michael Collins wrote:
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> 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@499x.com>wes-fs@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/>http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list <FreeSWITCH-users@lists.freeswitch.org> FreeSWITCH-users@lists.freeswitch.org <http://lists.freeswitch.org/mailman/listinfo/freeswitch-users> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:<http://lists.freeswitch.org/mailman/options/freeswitch-users> http://lists.freeswitch.org/mailman/options/freeswitch-users <http://www.freeswitch.org/>http://www.freeswitch.org
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago <http://www.cluecon.com/>http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list <FreeSWITCH-users@lists.freeswitch.org>FreeSWITCH-users@lists.freeswitch.org <http://lists.freeswitch.org/mailman/listinfo/freeswitch-users>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE: <http://lists.freeswitch.org/mailman/options/freeswitch-users>http://lists.freeswitch.org/mailman/options/freeswitch-users <http://www.freeswitch.org/>http://www.freeswitch.org
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Join us at ClueCon 2011, Aug 9-11, Chicago http://www.cluecon.com 877-7-4ACLUE
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (6)
-
David Ponzone
-
Jan Berger
-
Michael Collins
-
Steve Underwood
-
Steven Ayre
-
Wes