LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 05-11-2003, 10:38 AM   #1
csDraco_
Member
 
Registered: Feb 2002
Location: Canada
Distribution: Fedora / CentOS
Posts: 93

Rep: Reputation: 15
Unhappy mpg321 in console (Slack9) problem


In slack 9 I can play mp3s using mpg321 once in KDE, but without startx'ing, issuing the very same command gives me this error:

"
libao - OSS cannot set rate to 44100 [02:35.97],
Can't find a suitable libao driver. (Is device in use?)
"

But I did " ldd `which mpg321` " and libao is linked correctly, just the same as when in KDE.
However I can get working mpg321 if I just send the output to dsp device, like so:
"
mpg123 -s Music/FAKK2/HeavyMetalFire.mp3 > /dev/dsp
"

This means that /dev/dsp is not in use, so why can't the libao driver be found, if ldd says that it is linked?

Perhaps its something common to Slack 9, since in Slack 8.1 I didn't have that problem.
 
Old 05-11-2003, 02:54 PM   #2
oot
Member
 
Registered: Dec 2002
Distribution: Slackware 12.0
Posts: 240

Rep: Reputation: 30
mpg321 -o oss file.mp3

If you don't want the extra options every time you run it, add an alias line to ~/.bashrc along the lines of
alias mpg321="mpg321 -o oss"
 
Old 05-11-2003, 03:50 PM   #3
csDraco_
Member
 
Registered: Feb 2002
Location: Canada
Distribution: Fedora / CentOS
Posts: 93

Original Poster
Rep: Reputation: 15
ahhh ... that works: "oss - the Linux Open Sound System;"

Thanks for the reply oot
 
Old 09-22-2003, 10:06 PM   #4
initself
Member
 
Registered: Feb 2003
Location: Lake Forest, CA
Distribution: Slackware 10.2, Ubuntu 6.06 LTS
Posts: 38

Rep: Reputation: 16
Still not getting it....

music@mb:~$ mpg123 -o oss /mnt/firewire/test.mp3 > /dev/audio2
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2, and 3.
Version 0.59q (2002/03/23). Written and copyrights by Joe Drew.
Uses code from various people. See 'README' for more!
THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
Title : I Don't Owe You Anything Artist: The Smiths
Album : The Smiths Year : 1984
Comment: Track 10 Genre : Rock

Directory: /mnt/firewire/
Playing MPEG stream from test.mp3 ...
MPEG 1.0 layer III, 128 kbit/s, 44100 Hz joint-stereo
libao - OSS cannot set rate to 44100
unsupported playback rate: 44100
Audio device open for 44.1Khz, stereo, 16bit failed
Trying 44.1Khz, 8bit stereo.
unsupported playback rate: 44100
Audio device open for 44.1Khz, stereo, 8bit failed
Trying 48Khz, 16bit stereo.
/home/music/.esd_auth: Permission denied
Can't find a suitable libao driver. (Is device in use?)
music@mb:~$

I've set the group for /dev/audio2 to music and added the user music to that group, setting the permission to 066:

music@mb:~$ ls -l /dev/audio2
-rw-rw---- 1 root music 0 Sep 22 19:57 /dev/audio2

music:x:102:root,music,initself,web

I can't get anyone to play mp3 sound from the command line, except root which works perfectly! Anyone?

mb
 
Old 09-25-2003, 06:53 AM   #5
csDraco_
Member
 
Registered: Feb 2002
Location: Canada
Distribution: Fedora / CentOS
Posts: 93

Original Poster
Rep: Reputation: 15
initself change the permissions of your dsp first "chmod o+w /dev/dsp" and then try this as a user

mpg123 -s mp3_file.mp3 > /dev/dsp
or
mpg123 -o oss -s mp3_file.mp3 > /dev/dsp
 
Old 11-14-2003, 02:39 AM   #6
initself
Member
 
Registered: Feb 2003
Location: Lake Forest, CA
Distribution: Slackware 10.2, Ubuntu 6.06 LTS
Posts: 38

Rep: Reputation: 16
Success? Maybe not.

Quote:
Originally posted by csDraco_
initself change the permissions of your dsp first "chmod o+w /dev/dsp" and then try this as a user

mpg123 -s mp3_file.mp3 > /dev/dsp
or
mpg123 -o oss -s mp3_file.mp3 > /dev/dsp
The first command worked, however, it was very loud and wretched digital noise. Maybe now I solved the permissions problem and i have to send the .mp3 to the right device or use the right driver? I could not get the second command to do anything. It sticks here:

music@mb:~$ mpg123 -o oss Orbetron.mp3 > /dev/dsp
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2, and 3.
Version 0.59q (2002/03/23). Written and copyrights by Joe Drew.
Uses code from various people. See 'README' for more!
THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!

Playing MPEG stream from Orbetron.mp3 ...
MPEG 1.0 layer III, 128 kbit/s, 44100 Hz joint-stereo

music@mb:~$ mpg123 -o oss Orbetron.mp3 > /dev/dsp
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2, and 3.
Version 0.59q (2002/03/23). Written and copyrights by Joe Drew.
Uses code from various people. See 'README' for more!
THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!

Playing MPEG stream from Orbetron.mp3 ...
MPEG 1.0 layer III, 128 kbit/s, 44100 Hz joint-stereo



Any ideas?

mb

Last edited by initself; 11-14-2003 at 02:44 AM.
 
Old 11-17-2003, 02:33 AM   #7
initself
Member
 
Registered: Feb 2003
Location: Lake Forest, CA
Distribution: Slackware 10.2, Ubuntu 6.06 LTS
Posts: 38

Rep: Reputation: 16
Talking Fixed: Problem was with Permissions on /dev/audio

My problem was inevitably fixed by adding the user to the the group assigned to the devices in /dev that the sound card needs to access. In Slackware 9.0, /dev/audio is in the 'sys' group. After adding the user to the 'sys' group, I was able to run mpg123 -o oss mp3file.mp3 and hear sound!

mb
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
problem N slack9.1 huno Slackware 5 11-04-2006 04:00 PM
slack9 install problem phishintrip Slackware 5 07-26-2003 11:51 AM
slack9 install problem ginster Slackware 6 06-01-2003 05:14 PM
mpg321 problem slacking Slackware 7 12-05-2002 11:24 AM
mpg321 problem slacking Linux - Software 1 12-02-2002 05:32 AM


All times are GMT -5. The time now is 04:29 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration