Lenz wrote:

Hello list,
after the last time that mpg123 wen ballistic on our production system, we decided to skip mp3 playback altogether and to go for raw files. After half an hour playing with mpg123 and sox parameters in order to translate a mp3 file to a wav file that can be streamed back through * with no need for an mp3 decoder, I thought I'd post the result to the list to avoid wasting time in the future:

The correct paramater set seems to be:

mpg123 -s --rate 44100 --mono /src/mp3/fpm-sunshine.mp3 > fpm-sunshine.raw
sox -r 44100 -w -s -c 1 fpm-sunshine.raw -r 8000 -c 1 fpm-sunshine.wav

I have also prepared a small tutorial explaining how to setup the whole thing (you can find it at http://www.oinko.net/astrecipes/index.php?n=152 - feel free to add or modify it if you think it's necessary).

Thanks
l.

Lenz,

This method is referred to as file-based or native MOH, and I have some additional information regarding it. First, a short post on why we moved from the rawplayer method to native MOH on our production box, with a quote from Kevin Fleming regarding the impact the change would have on scalability.

- http://lists.digium.com/pipermail/asterisk-users/2006-February/141180.html

Second, I *believe* (please correct me if I'm wrong) that in order to get the full benefits of native MOH, the music files should be converted to the codec that the calls will be in. This allows Asterisk to play MOH without performing any transcoding, which lowers the resource utilization on the box. Here is a guide for converting WAV files to the desired codec, which addresses the four characteristics that describe audio data.

- http://lists.digium.com/pipermail/asterisk-users/2006-March/142108.html

Please feel free to add any of this information to your site and don't hesitate to contact me if you spot any mistakes.

Thank you,

Matthew Roth
InterMedia Marketing Solutions
Software Engineer and Systems Developer
_______________________________________________
--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

Reply via email to