Welcome to WebmasterWorld Guest from

Forum Moderators: bakedjake

Message Too Old, No Replies

How to restart audio device

mpg123 restart audio device

4:21 pm on Apr 28, 2008 (gmt 0)

New User

10+ Year Member

joined:Sept 18, 2002
votes: 0


I use mpg123 to play Shoutcast music from the command line, with something like this:

mpg123 -C -b 4096 -@ "http://www.shoutcast.com/sbin/shoutcast-playlist.pls?rn=526&file=filename.pls"# [Pop Top 40 Dance Rock]

When I stop the program with CTRL-C, I'm unable to run it again, I get this error:

[root@ran ruben]# mpg123 -C -b 4096 -@ "http://www.shoutcast.com/sbin/shoutcast-playlist.pls?rn=526&file=filename.pls"# [Pop Top 40 Dance Rock] &
[root@ran ruben]# [oss.c:182] error: Can't open default sound device!
[audio.c:561] error: failed to open audio device
[audio.c:179] error: Unable to find a working output module in this list: oss
[audio.c:430] error: Failed to open audio output module.
[audio.c:474] error: Buffer process didn't initialize!
[mpg123.c:757] error: Failed to initialize output, goodbye.

How can I reinit the audio device?

What is the correct way to stop playback?

Many thanks.

6:03 pm on Apr 30, 2008 (gmt 0)

Full Member

10+ Year Member

joined:Feb 4, 2004
posts: 215
votes: 0

Is it possible to use a flag to set the mpg123 output to use ALSA instead of OSS? If that isn't possible, I would suggest using mplayer in interactive mode which will allow you to quit mplayer gracefully. It isn't a solution to your mpg123 issue but it should should solve the audio issue.

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members