I'd like to use native moh instead of with mpg123... for some reason the processes never bloody die. For native moh to not spawn an external player, I'd need to convert the default supplied moh sound files in /var/lib/asterisk/mohmp3 to ulaw and g729 format. Anyone know of a free, easy way to convert them? Thanks, Doug.
I don't know for sure about the formats, but I'd try sox. I'm pretty sure pcm/ulaw is built in... Bob McDowell -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Douglas Garstang Sent: Tuesday, March 21, 2006 11:03 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [Asterisk-Users] Native MOH - Convert mp3 to ulaw I'd like to use native moh instead of with mpg123... for some reason the processes never bloody die. For native moh to not spawn an external player, I'd need to convert the default supplied moh sound files in /var/lib/asterisk/mohmp3 to ulaw and g729 format. Anyone know of a free, easy way to convert them? Thanks, Doug. _______________________________________________ --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
Tried it. It doesn't seem to like converting to ulaw, unless I'm doing something wrong. The man page mentions ulaw briefly, but doesn't say HOW to convert to it. Doug.> -----Original Message----- > From: Bob McDowell [mailto:bmcdowell@federalprotection.com] > Sent: Tuesday, March 21, 2006 12:58 PM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: RE: [Asterisk-Users] Native MOH - Convert mp3 to ulaw > > > > I don't know for sure about the formats, but I'd try sox. I'm pretty > sure pcm/ulaw is built in... > > > Bob McDowell > > > -----Original Message----- > From: asterisk-users-bounces@lists.digium.com > [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Douglas > Garstang > Sent: Tuesday, March 21, 2006 11:03 AM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: [Asterisk-Users] Native MOH - Convert mp3 to ulaw > > I'd like to use native moh instead of with mpg123... for some > reason the > processes never bloody die. > > For native moh to not spawn an external player, I'd need to > convert the > default supplied moh sound files in /var/lib/asterisk/mohmp3 > to ulaw and > g729 format. Anyone know of a free, easy way to convert them? > > Thanks, > Doug. > _______________________________________________ > --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 > > > > _______________________________________________ > --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 >
I tried that earlier today... found it somewhere online... This is what I get... [root@bil-pdev-5 mp3]# 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> -----Original Message----- > From: Doug Lytle [mailto:Support@drdos.info] > Sent: Tuesday, March 21, 2006 1:28 PM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [Asterisk-Users] Native MOH - Convert mp3 to ulaw > > > Douglas Garstang wrote: > > Tried it. It doesn't seem to like converting to ulaw, > unless I'm doing something wrong. The man page mentions ulaw > briefly, but doesn't say HOW to convert to it. > > > > Doug. > > > > > >> -----Original Message----- > >> From: Bob McDowell [mailto:bmcdowell@federalprotection.com] > >> Sent: Tuesday, March 21, 2006 12:58 PM > >> To: Asterisk Users Mailing List - Non-Commercial Discussion > >> Subject: RE: [Asterisk-Users] Native MOH - Convert mp3 to ulaw > >> > >> > >> > >> I don't know for sure about the formats, but I'd try sox. > I'm pretty > >> sure pcm/ulaw is built in... > >> > I use the following script. Make sure there are no spaces in > the filenames: > > cat convert.sh > > #!/bin/sh > > for filename in *mp3 > > do > > eval filename=`echo $filename | cut -f1 -d.` > > echo Converting $filename > > sox -V $filename.mp3 -t au -r 8000 -U -b -c 1 $filename.ulaw > resample -ql > > > > Doug > > _______________________________________________ > --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 >
> From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users- > bounces@lists.digium.com] On Behalf Of Douglas Garstang > > I tried that earlier today... found it somewhere online... This is what I > get... > > [root@bil-pdev-5 mp3]# 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: mp3Convert the MP3 file to a WAV file first. After installing lame, this is what I use: # lame --decode fpm-calm-river.mp3 fpm-calm-river.wav # sox -V fpm-calm-river.wav -v .2 -r 8000 -c 1 -w fpm-calm-river.raw # mv fpm-calm-river.raw /var/lib/asterisk/mohraw I use the -v .2 to drop the volume on the file. Way too loud for our SIP and PRI connections. Regards, --- Gavin
Good grief. Considering all the libraries and requirements, it'd almost be easier to find some windows software to do this.> -----Original Message----- > From: Doug Lytle [mailto:Support@drdos.info] > Sent: Tuesday, March 21, 2006 1:55 PM > To: Asterisk Users Mailing List - Non-Commercial Discussion > Subject: Re: [Asterisk-Users] Native MOH - Convert mp3 to ulaw > > > Douglas Garstang wrote: > > I tried that earlier today... found it somewhere online... > This is what I get... > > > > [root@bil-pdev-5 mp3]# 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 > > > > > > I believe you also need libmp3. Under Mandrake it's called libgmp3. > > Doug > > _______________________________________________ > --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 >
Koopmann, Jan-Peter
2006-Mar-22 01:09 UTC
[Asterisk-Users] Native MOH - Convert mp3 to ulaw
On Tuesday, March 21, 2006 9:36 PM Douglas Garstang wrote:> I tried that earlier today... found it somewhere online... This is > what I get... > > [root@bil-pdev-5 mp3]# 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: mp3Not all SOX versions support mp3. Some distros (at least Suse) compile sox without mp3 support. Either compile your own version with mp3 or convert the files to wav first. 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/20060322/ff63ce40/smime.bin