OpenWrt Forum Archive

Topic: mpg123 support in OpenWRT

The content of this topic has been archived on 22 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Does OpenWRT 15.05.1 includes mpg123 package (TARGET='ramips/mt7688')?
I haven't found one using "opkg update; opkg install mpg123".

root@mylinkit:~# opkg install mpg123
Unknown package 'mpg123'.
Collected errors:
* opkg_install_cmd: Cannot install package mpg123.

Also I've cross compiled mpg123 for my platform, but when launched error is displayed:
root@mylinkit:~# mpg123 output.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
    version 1.25.0; written and copyright by Michael Hipp and others
    free software (LGPL) without any warranty but with best wishes
[src/libout123/module.c:185] error: Failure getting module directory! (Perhaps set MPG123_MODDIR?)
[src/libout123/libout123.c:451] error: Found no driver out of [oss] working with device <default>.
main: [src/mpg123.c:308] error: out123 error 3: failure loading driver module

What can be the reason of failure?

Looks like you did not compile in ALSA driver, or it could not find the OSS / ALSA library.

Of course to play music your router needs a sound device and ALSA installed.  Make sure you can play a wav file (uncompressed) through it with aplay.

ALSA is installed. I can play WAV and MP3 using aplay and play (SOX).

The main reason why I need exactly mpg123 is to play sound file returned by Amazon AVS (Amazon Alexa).
This file is encoded with MPEG, channels: 1 @ 16-bit, Samplerate: 24000Hz.
Neither of above mentioned players correctly handles this file.
But mpg123 (on my desktop Ubuntu) does fine. Thus I want to install mpg123 to OpenWRT too.

Another option is to install some additional MP3 codec, but I do not know how.

Could you please elaborate on "Looks like you did not compile in ALSA driver, or it could not find the OSS / ALSA library."

Your build of mpg123 is complaining that it doesn't have a driver, so can't open the output stream.

The discussion might have continued from here.