audio codec family [mpg123] (afm=mpg123) not available

This message can occur while listening to a webradio with mplayer. Here is a more detailed message :

Requested audio codec family [mpg123] (afm=mpg123) not available.
Enable it at compilation.
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, floatle, 96.0 kbit/3.40% (ratio: 12000->352800)
Selected audio codec: [ffmp3float] afm: ffmpeg (FFmpeg MPEG layer-3 audio)

To use this codec without compiling mplayer again, install the following Debian package :

root@localhost:~#apt-get install libmpg123-0

Then, enable the use of this codec within your own mplayer configuration file :

fool@localhost:~$echo “afm=mp3lib” >> ~/.mplayer/config

This option will force mplayer to use mpg123 codec instead of ffmp3float.

More information on mpg123 by Thomas Orgis from the official mpg123 website  :

You need libmpg123 for the mpg123 codec in MPlayer, but the mp3lib codec is an internal fork of mpg123 code that fully resides in MPlayer.

So, if you want to use mp3lib, you can just say that in your ~/.mplayer/config … if you want mpg123, you need the lib and also MPlayer must be built with the codec enabled. Note that mp3lib will vanish sometime in favour of mpg123 usage (or ffmp3float, but I naturally hope the former;-), after some quirks have been settled.”

Advertisements

7 thoughts on “audio codec family [mpg123] (afm=mpg123) not available

  1. You are confusing mpg123 and mp3lib there: You need libmpg123 for the mpg123 codec in MPlayer, but the mp3lib codec is an internal fork of mpg123 code that fully resides in MPlayer.

    So, if you want to use mp3lib, you can just say that in your ~/.mplayer/config … if you want mpg123, you need the lib and also MPlayer must be built with the codec enabled. Note that mp3lib will vanish sometime in favour of mpg123 usage (or ffmp3float, but I naturally hope the former;-), after some quirks have been settled.

  2. If I pass the parameter -afm mp3lib to mplayer from the command line it plays back ok but either the config file is ignored or it’s not reading it (the curly quotes above notwithstanding). My config file reads:

    afm=mp3lib

    [extension.mp4]
    demuxer=mov

    [extension.mkv]
    demuxer=mkv

  3. you need to put “afm=mp3lib” in /etc/mplayer/mplayer.conf not ~/.mplayer/conf

    echo “afm=mp3lib” >> /etc/mplayer/mplayer.conf

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s