Hi Users, I have a problem with some of my mp3 files. they crash the system (Asterisk 1.6.2.14 on a x86_64 running Fedora 13 ) when it tries to play them. Unfortunately the logs do not give me a clear fault or cause of crash but i can clearly see that ts because of the MP3 files. Its the way some files are encoded. Is there a way I can make it skip the files that can be played? I use the Playback() and Background() Applications (Not MP3Player) Has anyone experienced this before? I searched the archives but the few posts are all for way back in 2003, so they are not so helpful. I also tried converting the files to wav or sln but there is severe music quality loss. Anyone knows a relieable way of converting the files? Thank you! Tim
On Fri, 4 Feb 2011, Timothy Smith wrote:> I have a problem with some of my mp3 files. they crash the system > (Asterisk 1.6.2.14 on a x86_64 running Fedora 13 ) when it tries to > play them. Unfortunately the logs do not give me a clear fault or > cause of crash but i can clearly see that ts because of the MP3 files.Read up on how to create a crash dump and submit a bug report. A 'bad' file shouldn't crash Asterisk.> I also tried converting the files to wav or sln but there is severe > music quality loss.By converting to MP3, some would say the 'music quality' has already been lost :) I convert MP3s with the following: mpg123 -q -w example.mp3.wav example.mp3 sox example.mp3.wav -c 1 -s -w -r 8000 example.wav normalize example.wav If this doesn't help, can you post links to the MP3 and the WAV? -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000
On Friday 04 Feb 2011, Timothy Smith wrote:> Hi Users, > > I have a problem with some of my mp3 files. they crash the system > (Asterisk 1.6.2.14 on a x86_64 running Fedora 13 ) when it tries to > play them.Some distros used to use mpg321 instead of mpg123 (early versions of which used to suffer from non-free licence restrictions, but newer versions are LGPL) and the installer created a symbolic link so it could be invoked as mpg123. This was known to cause problems for Asterisk, which preferred the original mpg123. Try running $ mpg123 with no arguments, and note the author's name which appears in the output. If you see "Michael Hipp", then it really is mpg123. If you see "Joe Drew" then this is really mpg321. For confirmation try $ ls -l /usr/bin/mpg123 If you see a symbolic link (cyan and permissions start with lower-case "l") then this is the problem. You can always build the "proper" mpg123 from the Source Code (if you aren't used to doing this, you may have to install the -devel versions of any packages which you have installed but the configure script thinks you haven't, is all). When you run `make install` it probably will install itself in /usr/local/bin/mpg123 . Most distros have a default path set to look in /usr/local/bin/ before looking in /usr/bin/ ; but if you really want to make sure, then you can just copy the binary over the top of the existing symbolic link; # cp /usr/local/bin/mpg123 /usr/bin/ You might need to repeat this step last if you ever re-install mpg321 from an RPM package. -- AJS Answers come *after* questions.
(Putting everything back into the right order, and stripping out unnecessary bits, for the sake of anybody searching the archives in future.) On Friday 04 Feb 2011, Timothy Smith wrote:> On Fri, Feb 4, 2011 at 5:37 PM, A J Stiles > <asterisk_list at earthshod.co.uk> wrote: > > Try running > > $ mpg123 > > with no arguments, and note the author's name which appears in the > > output. > > Thank you for the pointers. > > I have checked my system, I seem to have the real mpg123. see below. > [root at ivr2 en]# mpg123 > You made some mistake in program usage... let me briefly remind you: > > High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3 > version 1.13.0; written and copyright by Michael Hipp and others > free software (LGPL/GPL) without any warranty but with best wishesHmm ..... That's the "real" mpg123 alright.> [root at ivr2 en]# which mpg123 > /usr/local/bin/mpg123 > I also think I installed it using yum, however, i can still install a > version from sources, just to be sure. Could you please give me the > exact URLwhere I can download a version that works well with asterisk?If it's in /usr/local/bin/ then it almost certainly was built from Source Code. Our working installation (on Debian Lenny) is Asterisk 1.6.2.9 (built from source) with mpg123 version 1.4.3 (installed from a .deb). More tests to try: Can you listen to an mp3 file through the Asterisk server's own sound card (if it has one; if not, use the -w option to write to a .wav file, and test that by copying it to another machine which has a sound card), by invoking mpg123 from the command line? Try $ file $(which asterisk) $ file /usr/local/bin/mpg123 and make sure both are compiled for the same architecture ("ELF 64-bit LSB executable" or "ELF 32-bit LSB executable"). If one is 32-bit and the other is 64-bit, you *will* get problems. -- AJS Answers come *after* questions.