mpg123

Quoted from the homepage:

"mpg123 is a real time MPEG 1.0/2.0/2.5 audio player for layers 1,2 and 3 (MPEG 1.0 layer 3 aka MP3 most commonly tested). Among others working with Linux, MacOSX, FreeBSD, SunOS4.1.3, Solaris 2.5, HPUX 9.x, SGI Irix and Cygwin. It is free software licensed under LGPL."

Homepage of MPG123

mpg123 version 0.59r is known to work with Asterisk, but is outdated an has some bugs.Please use the updated version and
read what the maintainer tells us about it:


As current maintainer of the mpg123 project (yes - it _is_ active again; officially since two years now), I from time to time get requests from asterisk users on how to set up mp3 decoding for music-on-hold (I guess) with mpg123. For several years, there prevailed a really unfortunate situation in that respect:

  • The official mpg123 was dead, the old version 0.59r in debian worked, but was confined to the non-free section
  • The slightly fresher pre0.59s (in gentoo, for example) had trouble with the downsampling to 8000Hz due to the MMX accelerated decoder.
  • Then there was/is the sort-of replacement mpg321 masquerading as mpg123 in many GNU/Linux distributions. It has the main functionality of mpg123, but misses quite a number of goodies — like the downsampling to 8000Hz. Besides, it is also a dead project since 2002 or so...

Now, enter 2008! Thanks to the hard work of the mpg123 team, there is a current successor to the venerable 0.59 that
  • fixes all known security bugs (overflows, etc.)
  • fix all known playback problems of specific files
  • is Free under the LGPL, thus able to re-replace mpg321 again in distributions
  • since version 1.0 offers the decoder as a library

The revived mpg123 is entering standard distibutions at moderate pace... version 0.67 is in debian lenny, gentoo has 1.3 and 1.4 . Pkgsrc-wip is working on a current version. Clearly, there is still some work to do to make it known better and this posting is part of that. Also, personally, I would like to lower (to zero;-) the number of people who ask me about troubles they have with asterisk and some outdated mpg123 or even the faking mpg321.

So the first major message I would like to give to the asterisk community is that there is a current, active mpg123 and that the old way of calling it in a pipe to produce 8kHz pcm audio from MPEG files works just fine, provided you use a current one. The second message is: In case you want to avoid the trouble of external programs, that may even call themselves mpg123 although they aren't mpg123, you can use the libmpg123 that is provided by mpg123 since version 1.0 for an asterisk input module. There is API documentation on http://mpg123.org/api

Alrighty then,

Thomas Orgis, mpg123 maintainer.



Further information and source is available at:




Do not install or use mpg321 on the linux-System because it does not do the necessary converting of the frequency.
So e.g. if your music on hold sounds odd on the phone, most likely there is a problem with the codec/player.

INSTALLING THE CORRECT VERSION
If you are *EVER* unsure that mpg123 is correctly installed (correct verison etc), you can enter the asterisk source tree, and type 'make mpg123' (without quotes), and mpg123 v0.59r will be download ed, unpacked, and built for you, and then a simple make install will install asterisk AND mpg123 in one smooth motion.
-Josh

Also see format_mp3 from asterisk-addons. This can be used as a replacement for a external mp3 decoder.
See Asterisk MusicOnHold Configuration for more info.

See Also

Quoted from the homepage:

"mpg123 is a real time MPEG 1.0/2.0/2.5 audio player for layers 1,2 and 3 (MPEG 1.0 layer 3 aka MP3 most commonly tested). Among others working with Linux, MacOSX, FreeBSD, SunOS4.1.3, Solaris 2.5, HPUX 9.x, SGI Irix and Cygwin. It is free software licensed under LGPL."

Homepage of MPG123

mpg123 version 0.59r is known to work with Asterisk, but is outdated an has some bugs.Please use the updated version and
read what the maintainer tells us about it:


As current maintainer of the mpg123 project (yes - it _is_ active again; officially since two years now), I from time to time get requests from asterisk users on how to set up mp3 decoding for music-on-hold (I guess) with mpg123. For several years, there prevailed a really unfortunate situation in that respect:

  • The official mpg123 was dead, the old version 0.59r in debian worked, but was confined to the non-free section
  • The slightly fresher pre0.59s (in gentoo, for example) had trouble with the downsampling to 8000Hz due to the MMX accelerated decoder.
  • Then there was/is the sort-of replacement mpg321 masquerading as mpg123 in many GNU/Linux distributions. It has the main functionality of mpg123, but misses quite a number of goodies — like the downsampling to 8000Hz. Besides, it is also a dead project since 2002 or so...

Now, enter 2008! Thanks to the hard work of the mpg123 team, there is a current successor to the venerable 0.59 that
  • fixes all known security bugs (overflows, etc.)
  • fix all known playback problems of specific files
  • is Free under the LGPL, thus able to re-replace mpg321 again in distributions
  • since version 1.0 offers the decoder as a library

The revived mpg123 is entering standard distibutions at moderate pace... version 0.67 is in debian lenny, gentoo has 1.3 and 1.4 . Pkgsrc-wip is working on a current version. Clearly, there is still some work to do to make it known better and this posting is part of that. Also, personally, I would like to lower (to zero;-) the number of people who ask me about troubles they have with asterisk and some outdated mpg123 or even the faking mpg321.

So the first major message I would like to give to the asterisk community is that there is a current, active mpg123 and that the old way of calling it in a pipe to produce 8kHz pcm audio from MPEG files works just fine, provided you use a current one. The second message is: In case you want to avoid the trouble of external programs, that may even call themselves mpg123 although they aren't mpg123, you can use the libmpg123 that is provided by mpg123 since version 1.0 for an asterisk input module. There is API documentation on http://mpg123.org/api

Alrighty then,

Thomas Orgis, mpg123 maintainer.



Further information and source is available at:




Do not install or use mpg321 on the linux-System because it does not do the necessary converting of the frequency.
So e.g. if your music on hold sounds odd on the phone, most likely there is a problem with the codec/player.

INSTALLING THE CORRECT VERSION
If you are *EVER* unsure that mpg123 is correctly installed (correct verison etc), you can enter the asterisk source tree, and type 'make mpg123' (without quotes), and mpg123 v0.59r will be download ed, unpacked, and built for you, and then a simple make install will install asterisk AND mpg123 in one smooth motion.
-Josh

Also see format_mp3 from asterisk-addons. This can be used as a replacement for a external mp3 decoder.
See Asterisk MusicOnHold Configuration for more info.

See Also

Created by: Yosh, Last modification: Wed 04 of Jun, 2008 (10:19 UTC) by sty
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+