Where can I find alaw, ulaw, gsm, g729 formats for native music on hold? I have some mp3 files and I have tried to transcode them to above, but it seams that SOX can't do that. Please, tell me where to download some MOH files (in above formats) or how to transcode mp3? Thank you for your time! -- Tomislav Parcina tparcina#lama.hr
Tomislav Par?ina wrote:> Where can I find alaw, ulaw, gsm, g729 formats for native music on hold? > > I have some mp3 files and I have tried to transcode them to above, but it seams that SOX can't do that. Please, tell me where to download some MOH files (in above formats) or how to transcode mp3? > > Thank you for your time!You need to use mpg123 to convert the mp3 files to wav files first. mpg123 -w out.wav in.mp3 sox out.wav -r 8000 out.gsm
sox -V foo.mp3 -t au -r 8000 -U -b -c 1 foo.ulaw resample -ql Chris ----- Original Message ----- From: "Tomislav Par?ina" <tparcina@lama.hr> To: "Asterisk Users Mailing List - Non-Commercial Discussion" <asterisk-users@lists.digium.com> Sent: Wednesday, March 01, 2006 11:58 AM Subject: [Asterisk-Users] MOH native files> Where can I find alaw, ulaw, gsm, g729 formats for native music on hold? > > I have some mp3 files and I have tried to transcode them to above, but it > seams that SOX can't do that. Please, tell me where to download some MOH > files (in above formats) or how to transcode mp3? > > Thank you for your time! > > > -- > Tomislav Parcina > tparcina#lama.hr > > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
In article <44060BD0.7080303@asric.com>, asric@asric.com says...> You need to use mpg123 to convert the mp3 files to wav files first. > > mpg123 -w out.wav in.mp3This one works. Thank you!> sox out.wav -r 8000 out.gsmI have problem with this command. It runs fine, but when I play that file it is twice long as it should be and double slow as it should be. So wav file that was 2 min long becomes 4 min long gsm file. How can I fix that? -- Tomislav Parcina tparcina#lama.hr
In article <005401c63dd3$7c317e50$037ba8c0@kite>, jacs@gnome.co.uk says...> sox -V foo.mp3 -t au -r 8000 -U -b -c 1 foo.ulaw resample -ql > > ChrisThis is what happens. [root@pbx mohmp3]# ls fpm-calm-river.mp3 fpm-sunshine.mp3 fpm-world-mix.mp3 [root@pbx mohmp3]# sox -V fpm-calm-river.mp3 -t au -r 8000 -U -b -c 1 fpm-calm- river.ulaw resample -ql sox: resample opts: Kaiser window, cutoff 0.940000, beta 16.000000 sox: Failed reading fpm-calm-river.mp3: Do not understand format type: mp3 Have I done anything wrong? -- Tomislav Parcina tparcina#lama.hr
You need to install either libmad or libmp3lame. Sox checks for this on startup. Chris ----- Original Message ----- From: "Tomislav Par?ina" <tparcina@lama.hr> To: "Asterisk Users Mailing List - Non-Commercial Discussion" <asterisk-users@lists.digium.com> Sent: Thursday, March 02, 2006 10:46 AM Subject: [Asterisk-Users] Re: MOH native files> In article <005401c63dd3$7c317e50$037ba8c0@kite>, jacs@gnome.co.uk says... >> sox -V foo.mp3 -t au -r 8000 -U -b -c 1 foo.ulaw resample -ql >> >> Chris > > This is what happens. > > [root@pbx mohmp3]# ls > fpm-calm-river.mp3 fpm-sunshine.mp3 fpm-world-mix.mp3 > [root@pbx mohmp3]# sox -V fpm-calm-river.mp3 -t au -r 8000 -U -b -c 1 > fpm-calm- > river.ulaw resample -ql > sox: resample opts: Kaiser window, cutoff 0.940000, beta 16.000000 > > sox: Failed reading fpm-calm-river.mp3: Do not understand format type: mp3 > > Have I done anything wrong? > > > -- > Tomislav Parcina > tparcina#lama.hr > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
Tomislav Par?ina wrote:>>sox out.wav -r 8000 out.gsm >> >> > >I have problem with this command. It runs fine, but when I play that file it is twice long as it should be and double slow as it should be. So wav file that was 2 min long becomes 4 min long gsm file. > >How can I fix that? > >Tomislav, From the sox man page: ===========================================================Audio data can usually be totally described by four characteristics: rate The sample rate is in samples per second. For example, CD sample rates are at 44100. data size The precision the data is stored in. Most popular are 8-bit bytes or 16-bit words. data encoding What encoding the data type uses. Examples are u-law, ADPCM, or signed linear data. channels How many channels are contained in the audio data. Mono and Stereo are the two most common. =========================================================== In order to get the proper encoding for Asterisk, you must provide the correct values for each of these characteristics. In your case, they are as follows: rate = 8000 data size = 8-bit (byte) data encoding = gsm channels = 1 (mono) Therefore, the command you would use to create your native MOH files is: sox in.wav -t gsm -r 8000 -b -c 1 out.gsm I *believe* that will work, but we convert all of our MOH files to u-Law since all of our calls use the u-Law codec. Your mileage may vary with GSM so please post your results to the list. Here are the characteristics of the native MOH files we produce and the sox command we use to do so: rate = 8000 data size = 8-bit (byte) data encoding = u-Law channels = 1 (mono) sox in.wav -t ul -r 8000 -b -c 1 out.pcm Hope that helps, Matthew Roth InterMedia Marketing Solutions Software Engineer and Systems Developer
In article <006901c63deb$15de7ff0$037ba8c0@kite>, jacs@gnome.co.uk says...> You need to install either libmad or libmp3lame. > > Sox checks for this on startup.This is what I get when I enter yum install libmp3lame or libmad Parsing package install arguments No Match for argument: libmp3lame Nothing to do Parsing package install arguments No Match for argument: libmad Nothing to do Is something wrong with my repository or you have provide me wrong packet names? -- Tomislav Parcina tparcina#lama.hr
SoX needs that libid3tag, libmad and madplay are installed before it can read mp3 files and convert them into some other format. Zach A -----Original Message----- From: Chris Stenton [mailto:jacs@gnome.co.uk] Sent: Thursday, March 02, 2006 3:30 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [Asterisk-Users] MOH native files sox -V foo.mp3 -t au -r 8000 -U -b -c 1 foo.ulaw resample -ql Chris
On Thursday, March 02, 2006 11:47 AM Tomislav Parcina wrote:> sox: Failed reading fpm-calm-river.mp3: Do not understand format > type: mp3 > > Have I done anything wrong?Well your sox does not understand mp3 since the support is not compiled in. Compile your own suitable version of sox. Regards, JP -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3104 bytes Desc: not available Url : http://lists.digium.com/pipermail/asterisk-users/attachments/20060306/6ac93778/smime.bin