Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[FIXED]No Audio when trying new Mplayer
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
breakerfall
Guru
Guru


Joined: 02 Aug 2003
Posts: 509
Location: Manchester, UK

PostPosted: Wed Aug 25, 2004 4:42 pm    Post subject: [FIXED]No Audio when trying new Mplayer Reply with quote

Hi... I have been able to use Mplayer 1.0 pre3 just fine but recently I wanted to upgrade to pre5. I download and compile it and bam - it won't play audio with a video clip. I'm given the error message "Could not open/initialize audio device -> no sound".

I've seen other people with the same error message, but nobody in the same circumstances. Either they don't have alsa working properly and can't access alsa sound at all, or they can't access it at all. But I can run mplayer as root and it works fine. :x

This is pretty frustrating. I ran >mplayer -ao help and ALSA is listed there. I ran mplayer as root and audio worked, but I'm not sure what's causing the problem at all. A small while ago, I made the switch from devfs to udev - could that be an issue? If so, how do I fix it?

Thanks. :)


Last edited by breakerfall on Thu Aug 26, 2004 12:08 pm; edited 1 time in total
Back to top
View user's profile Send private message
Tarball
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jun 2002
Posts: 142
Location: Cheshire, UK

PostPosted: Wed Aug 25, 2004 5:26 pm    Post subject: Reply with quote

Sounds like a permissons issue! I suspect normal users don't have permission to read/write to audio devices.

IIRC (corrections welcome) check the permissions in /etc/security/console.perms search for audio.
Back to top
View user's profile Send private message
breakerfall
Guru
Guru


Joined: 02 Aug 2003
Posts: 509
Location: Manchester, UK

PostPosted: Wed Aug 25, 2004 5:32 pm    Post subject: Reply with quote

Well, my first thought was that it could be a permissions problem, but I don't see how - considering XMMS uses AlSA and all other sound works fine in usermode and I had sound working fine with the older version of Mplayer.

I checked that file you mentioned and searching for audio, came across:
Code:
# device classes -- these are shell-style globs
<sound>=/dev/dsp* /dev/audio* /dev/midi* \
        /dev/mixer* /dev/sequencer* \
        /dev/sound/* /dev/snd/* /dev/beep \
        /dev/admm* \
        /dev/adsp* /dev/aload* /dev/amidi* /dev/dmfm* \
        /dev/dmmidi* /dev/sndstat

and
Code:
# permission definitions
<console>  0600 <sound>      0600 root.audio

Hmmm :|

Any other ideas?
Back to top
View user's profile Send private message
Tarball
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jun 2002
Posts: 142
Location: Cheshire, UK

PostPosted: Wed Aug 25, 2004 6:03 pm    Post subject: Reply with quote

Has something else got the sound device open already?

Does your sound card do hardware mixing?
Back to top
View user's profile Send private message
breakerfall
Guru
Guru


Joined: 02 Aug 2003
Posts: 509
Location: Manchester, UK

PostPosted: Wed Aug 25, 2004 10:38 pm    Post subject: Reply with quote

Nothing else takes the sound, it has hardware mixing capabilities (creative audigy) and like I said, it worked fine with the older version and also with the new version when running through SU / Root.

That's why I have to believe it may have something to do with the change to udev, although, being honest, I'm not well read-up in the area of udev. :oops:
Back to top
View user's profile Send private message
Tarball
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jun 2002
Posts: 142
Location: Cheshire, UK

PostPosted: Wed Aug 25, 2004 11:21 pm    Post subject: Reply with quote

breakerfall wrote:
and like I said, it worked fine with the older version and also with the new version when running through SU / Root.


Just so I am clear, can you get any applications to output sound as a non-root user? Or it is that you can only get if you run an application as root?

If you can only get sound when you run apps as root then it could well be your /etc/security/console.perms file
Code:

# permission definitions
<console>  0600 <sound>      0600 root.audio


This entry in console.perms would cause all the devices in /dev/sound/ to be read/write by root only.

In my console.perms I have:
Code:

<console>  0660 <sound>      0660 root.audio


i.e. root and users in the group audio have read/write access to the devices in /dev/sound/

Code:

bash-2.05b# ls -l /dev/sound
total 0
crw-rw----  1 root audio 14, 12 Apr 19 01:33 adsp
crw-rw----  1 root audio 14,  4 Apr 19 01:33 audio
crw-rw----  1 root audio 14,  3 Apr 19 01:33 dsp
crw-rw----  1 root audio 14,  0 Apr 19 01:33 mixer
crw-rw----  1 root audio 14,  1 Jul  2 18:29 sequencer
crw-rw----  1 root audio 14,  8 Jul  2 18:29 sequencer2
Back to top
View user's profile Send private message
breakerfall
Guru
Guru


Joined: 02 Aug 2003
Posts: 509
Location: Manchester, UK

PostPosted: Wed Aug 25, 2004 11:53 pm    Post subject: Reply with quote

Yip... I can get sounds in all applications using my regular username, which belongs to the audio group. I use the XMMS ALSA plugin and don't use any other kind of sound server (except occasionally JACK).

So, for clarification... I can playback audio fine, I only have this problem when I compile the new version of Mplayer.

Here's an idea: do you know if the build in portage actually configures and enables the GUI for mplayer? If so, then I'll give the release in portage a try and see if I still get the same problem.
Back to top
View user's profile Send private message
Tarball
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jun 2002
Posts: 142
Location: Cheshire, UK

PostPosted: Thu Aug 26, 2004 12:16 am    Post subject: Reply with quote

I don't mean to ask stupid questions but is it using the correct USE flags?

what do you get if you type
Code:

ACCEPT_KEYWORDS="~x86" emerge mplayer -vp
Back to top
View user's profile Send private message
breakerfall
Guru
Guru


Joined: 02 Aug 2003
Posts: 509
Location: Manchester, UK

PostPosted: Thu Aug 26, 2004 12:59 am    Post subject: Reply with quote

Sorry, I should have made it clear from the beginning... I didn't emerge mplayer. I downloaded and compiled it from source, just as I did with the older version 1.0 pre3.

Maybe I should try the version held in portage. Do you know if the GUI is enabled in the portage release?
Back to top
View user's profile Send private message
Tarball
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jun 2002
Posts: 142
Location: Cheshire, UK

PostPosted: Thu Aug 26, 2004 9:35 am    Post subject: Reply with quote

Yeah, I think the GUI is enabled in portage (if you have the GTK use flag set).

I emerged mplayer-1_0-pre5-r3 (IIRC) last night and I had no problems. I am also using ALSA with a SB Live 5.1 and UDEV.

It's worth doing the previous emerge command I stated cos there are helluva lot of USE flags that affect Mplayer!!!
Back to top
View user's profile Send private message
Roptaty
Apprentice
Apprentice


Joined: 12 May 2002
Posts: 184
Location: Norway

PostPosted: Thu Aug 26, 2004 10:00 am    Post subject: Reply with quote

What is the contents of your ~/.mplayer/config? What is the ao variable set to? Earlier releases of mplayer used alsa1x, but the current version uses alsa.

Does mplayer -ao alsa your-videofile give you any sound?
_________________
This signature will selfdestruct in ten seconds...
ten - nine - eight - seven - six - five - four - three - two - one - BSOD (System crashed, please restart the self-destruct sequence)
Back to top
View user's profile Send private message
breakerfall
Guru
Guru


Joined: 02 Aug 2003
Posts: 509
Location: Manchester, UK

PostPosted: Thu Aug 26, 2004 12:03 pm    Post subject: Reply with quote

Hmmm... I ran the command gmplayer -ao alsa and now I hear sound, however I have another error message which flashes constantly, making the video un-watchable:

Quote:
alsa-control: mixer attach /dev/mixer error: No such file of directory


This happens with "alsa" set as the variable in gui.cong within ~/.mplayer/

I think we're getting somewhere. Any other ideas? :D

[edit]
SUCCESS! I deleted the local home dir for mplayer and now it works fine... I just feel stupid for not having tried this simple course of action sooner. Shame on me. :|

Thanks for your assistance though guys - much appreciated. :)
Back to top
View user's profile Send private message
riksta
n00b
n00b


Joined: 16 Apr 2004
Posts: 73
Location: Manchester, UK

PostPosted: Sun Aug 29, 2004 4:38 am    Post subject: Reply with quote

In my version of mplayer i managed to finally get the sound working, i had to replace

Code:

ao=alsa9:default


with

Code:

ao=alsa1x:default



im using gentoo-dev-sources
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum