LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 01-30-2010, 05:48 PM   #1
Chili.Willy
LQ Newbie
 
Registered: Jul 2007
Location: Stevens Point, Wisconsin, USA
Distribution: Debian Bookworm, Raspbian. Also Mint, SliTaz, Sparky, Xubuntu.
Posts: 28

Rep: Reputation: 1
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.

Thanks for any ideas.
 
Old 01-31-2010, 12:28 AM   #2
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 49
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.
 
Old 01-31-2010, 05:03 PM   #3
Chili.Willy
LQ Newbie
 
Registered: Jul 2007
Location: Stevens Point, Wisconsin, USA
Distribution: Debian Bookworm, Raspbian. Also Mint, SliTaz, Sparky, Xubuntu.
Posts: 28

Original Poster
Rep: Reputation: 1
Thanks, Lugoteehalt.

I should have mentioned, mpg123 used to work just fine. I installed it about a year ago with apt-get. I

And I can now say, removing and re-installing mpg123 did not help.
 
Old 01-31-2010, 07:41 PM   #4
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 49
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?
 
Old 01-31-2010, 10:18 PM   #5
Chili.Willy
LQ Newbie
 
Registered: Jul 2007
Location: Stevens Point, Wisconsin, USA
Distribution: Debian Bookworm, Raspbian. Also Mint, SliTaz, Sparky, Xubuntu.
Posts: 28

Original Poster
Rep: Reputation: 1
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!
 
Old 02-01-2010, 12:16 AM   #6
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 49
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.
 
Old 02-04-2010, 10:02 PM   #7
Chili.Willy
LQ Newbie
 
Registered: Jul 2007
Location: Stevens Point, Wisconsin, USA
Distribution: Debian Bookworm, Raspbian. Also Mint, SliTaz, Sparky, Xubuntu.
Posts: 28

Original Poster
Rep: Reputation: 1
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.
 
Old 02-05-2010, 06:00 AM   #8
lugoteehalt
Senior Member
 
Registered: Sep 2003
Location: UK
Distribution: Debian
Posts: 1,215
Blog Entries: 2

Rep: Reputation: 49
Quote:
Originally Posted by Chili.Willy View Post
"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.
 
Old 03-17-2010, 12:13 PM   #9
stevexyz
LQ Newbie
 
Registered: Apr 2008
Location: Hampshire, UK
Distribution: None
Posts: 27

Rep: Reputation: 16
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error message when trying to output to a52 alsa module. thejims Slackware 9 07-07-2009 06:40 PM
Xine freezes. Related to ALSA. mooreted Linux - Software 39 06-28-2006 03:42 PM
Run mpg123: system("mpg123"); How to know what PID it gets? And a Emacs highlightin q kornerr Programming 10 08-06-2005 10:17 AM
ALSA install error - 'Can't locate module snd-au8830 Foxy Linux - Hardware 10 07-07-2004 11:15 AM
when i try to play a sound file with mpg123 or mpg321 i get an error VioLaToR Linux - Software 5 02-24-2004 12:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration