Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Debian Bookworm, Raspbian. Also Mint, SliTaz, Sparky, Xubuntu.
Posts: 28
Rep:
mpg123 error, related to alsa module
When I try to play a .mp3 file with mpg123, e.g. with this command:
mpg123 someCoolTune.mpg
I get these error messages.
[module.c:110] error: Failed to open module alsa: file not found
[module.c:110] error: Failed to open module oss: file not found
[module.c:110] error: Failed to open module esd: file not found
[module.c:110] error: Failed to open module jack: file not found
[module.c:110] error: Failed to open module pulse: file not found
[module.c:110] error: Failed to open module nas: file not found
[module.c:110] error: Failed to open module arts: file not found
[audio.c:179] error: Unable to find a working output module in this list: alsa,oss,esd,jack,pulse,nas,arts
[audio.c:463] error: Failed to open audio output module
[mpg123.c:757] error: Failed to initialize output, goodbye.
GUI audio players like Rhythmbox and Totem work just fine. I believe all of the audio on my computer depends on alsa. Another command that works just fine is aplay, as in
aplay -q /usr/lib/openoffice/basis3.1/share/gallery/sounds/cow.wav
and aplay definitely uses alsa.
My only other clue is, when I shut the machine down, one of the messages printed to the console during shutdown was something about /etc/default/timidity.
Timidity is something that converts MIDI to WAV, and it may have nothing to do with my mpg123 problem.
I am running Debian Lenny.
How can I troubleshoot mpg123? Or would it be likely to help if I simply uninstall and reinstall mpg123? That might be easier than troubleshooting.
Timidity is a software midi player and almost certainly has nothing to do with it. At a guess mpg123 is simply unable to find the relevant stuff, like it says. Did you install it from source, in which case that will often happen if p's and q's are not religiously observed, or is it a deb file, in which case it is more mysterious?
If it were me I'd just forget it and use, say, mplayer which, as long as you get it set up properly - from debian multimedia - will play anything and give you huge flexibility.
I'm using Lenny, it is a backport but it is not obvious, at least to me, why that should make a difference. So used apt-get install mpg123 to install said program. Then got this when tried to use it:
Code:
lugo@fido:~$ mpg123 /home/lugo/Politics/Chomsky/dn2008-1124-1.mp3
[module.c:110] error: Failed to open module oss: file not found
[audio.c:179] error: Unable to find a working output module in this list: oss
[audio.c:464] error: Failed to open audio output module
[mpg123.c:767] error: Failed to initialize output, goodbye.
lugo@fido:~$ artsdsp mpg123 /home/lugo/Politics/Chomsky/dn2008-1124-1.mp3
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
version 1.5.1; written and copyright by Michael Hipp and others
free software (LGPL/GPL) without any warranty but with best wishes
Directory: /home/lugo/Politics/Chomsky/
Playing MPEG stream 1 of 1: dn2008-1124-1.mp3 ...
Title: Democracy Now! Monday, November 24, 2008
Artist: Democracy Now!
Album: Democracy Now!
Year: 2008
Then the file played. (Could have equally used artsdsp mplayer filename) So it seems vaguely similar to your problem and it was resolved by putting 'artsdsp' in front of the command.
artsdsp tells the program to use the arts sound server which is used by KDE; you using KDE?
Distribution: Debian Bookworm, Raspbian. Also Mint, SliTaz, Sparky, Xubuntu.
Posts: 28
Original Poster
Rep:
Interesting. I have Gnome, not KDE. I'm not sure what you mean by "it is a backport". Lenny is? mpg123 is?
I'm pretty sure I don't have the arts sound ... um, module, I guess the term is.
I tried
alsadsp mpg123 myCoolTune.mp3 and
alsa mpg123 myCoolTune.mp3, but both gave "command not found".
Checked out man -k alsa and it listed a program called mpg123-alsa. It does have a man page that appears to be the plain old mpg123 man page. Here's what happens if I invoke mpg123-alsa:
>mpg123-alsa myCoolTune.mp3
[module.c:110] error: Failed to open module alsa: file not found
[audio.c:179] error: Unable to find a working output module in this list: alsa
[audio.c:463] error: Failed to open audio output module
[mpg123.c:757] error: Failed to initialize output, goodbye.
Evidently mpg123-alsa is simply mpg123, but instead of looking for whatever sound module might be available, it looks only for alsa.
When you (Lugoteehalt) invoke mpg123, it seems to look only for oss. I wonder why that is, when my mpg123 looks for seven different sound modules. More to the point, I wonder how mpg123 normally finds the modules. Because, remember the error message is
Failed to open module alsa: file not found
Anyway, thanks for your interest & it would be great if you have any further ideas!
Had a look at its manual and there's various stuff that might work.
Code:
--list-modules
Might give something interesting. It might play by converting its output to .wav and putting its output to standard output using '-' and pipeing that into aplay, if that's the .wav thing.
Code:
mpg123 -w - | aplay -
I tend to get that sort of command wrong but it should be something like that.
Tried later command and it just printed to the screen.
Perhaps try shutting off the Gnome sound server.
Last edited by lugoteehalt; 02-01-2010 at 12:54 AM.
Distribution: Debian Bookworm, Raspbian. Also Mint, SliTaz, Sparky, Xubuntu.
Posts: 28
Original Poster
Rep:
SOLVED: mpg123 error, related to alsa module
Lugoteehalt, thank you very much for your ideas.
I found the answer from a member of Debian User Forums.
Apparently mpg123 was looking for the following files in /usr/lib, when in fact they were in /usr/lib/mpg123.
These are the files I mean:
output_alsa.la output_arts.la output_dummy.la output_esd.la output_jack.la output_nas.la output_oss.la output_pulse.la
output_alsa.so output_arts.so output_dummy.so output_esd.so output_jack.so output_nas.so output_oss.so output_pulse.so
"aspnair" on Debian User Forums suggested that I issue this command:
export LD_LIBRARY_PATH=/usr/lib:/usr/lib/mpg123
The first time I tried it, it didn't help. Then I rebooted, and mpg123 still wouldn't work. Then I ran the export command again, and after that, mpg123 worked perfectly.
This doesn't make any sense to me, because if the files were simply in /usr/lib/mpg123 and mpg123 was looking for them in a different directory, how would rebooting make any difference? All I know is what happened.
"aspnair" on Debian User Forums suggested that I issue this command:
export LD_LIBRARY_PATH=/usr/lib:/usr/lib/mpg123
The first time I tried it, it didn't help. Then I rebooted, and mpg123 still wouldn't work. Then I ran the export command again, and after that, mpg123 worked perfectly.
This doesn't make any sense to me, because if the files were simply in /usr/lib/mpg123 and mpg123 was looking for them in a different directory, how would rebooting make any difference? All I know is what happened.
It was probably just that mpg123 was still running and therefore used the data it had already got, not the new library path, something like that.
Thanks for posting the solution. These threads get looked up and it is very frustrating if the answers aren't there.
I had the same error messages. My libtool and ltdl were rather old; after installing libtool 2.2.6b and rebuilding mpg123 everything works just fine. Steve
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.