You are not logged in.

#1 2014-02-11 23:04:51

otto88
Banned
Registered: 2012-12-16
Posts: 82

mplyer sound doesn't work, instead amarok's sond work !!!

hi everyone, the problem is that mplayer's sound doesn't work.

the sound with Amarok and Firefox(e.g youtube) works, but with mpalyer no !!!
i've posted some commands:
thanks


/etc/mplayer/
codecs.conf   example.conf  input.conf

/etc/mplayer/example.conf 
#
# MPlayer configuration file
#
# Configuration files are read system-wide from /usr/local/etc/mplayer.conf
# and per-user from ~/.mplayer/config, where per-user settings override
# system-wide settings, all of which are overrriden by the command line.
#
# The configuration file settings are the same as the command line
# options without the preceding '-'.
#
# See the CONFIGURATION FILES section in the man page
# for a detailed description of the syntax.
#
# Profiles should be placed at the bottom of the configuration file to ensure
# that settings wanted as defaults are not restricted to specific profiles.


##################
# video settings #
##################

# Specify default video driver (see -vo help for a list).
#vo=xv

# Use SDL video with the aalib subdriver by default.
#vo = sdl:aalib

# FBdev driver:
#
# mode to use (read from fb.modes)
#fbmode = 640x480-120
#
# location of the fb.modes file                                                               
#fbmodeconfig = /etc/fb.modes                                                                 
                                                                                              
# Specify your monitor timings for the vesa and fbdev video output drivers.                   
# See /etc/X11/XF86Config for timings. Be careful; if you specify settings                    
# that exceed the capabilities of your monitor, you may damage it.                            
#
# horizontal frequency range (k stands for 1000)
#monitor-hfreq = 31.5k-50k,70k
#
# vertical frequency range
#monitor-vfreq = 50-90
#
# dotclock (or pixelclock) range (m stands for 1000000)
#monitor-dotclock = 30M-300M

# Start in fullscreen mode by default.
#fs=yes

# Change to a different videomode when going fullscreen.
#vm=yes

# Override the autodetected color depth, may need 'vm=yes' as well.
#bpp=0

# Enable software scaling (powerful CPU needed) for video output
# drivers that do not support hardware scaling.
#zoom=yes

# standard monitor size, with square pixels
#monitoraspect=4:3

# Use this for a widescreen monitor, non-square pixels.
#monitoraspect=16:9

# Keep the player window on top of all other windows.
#ontop=yes


##################
# audio settings #
##################

# Specify default audio driver (see -ao help for a list).
#ao=oss

# Use SDL audio driver with the esd subdriver by default.
#ao = sdl:esd

# Specify the mixer device.
#mixer = /dev/mixer

# Resample the sound to 44100Hz with the lavcresample audio filter.
#af=lavcresample=44100

# Output audio to S/PDIF
#ao=alsa:device=spdif
#ac=hwac3,hwdts,hwmpa,


##################
# other settings #
##################

# Pretend to be Window Media Player.
# Fixes playback when playlist and media file use the same URL.
#user-agent=NSPlayer/4.1.0.3856

# Pretend to be Quicktime
# Fixes playback for apple.com/trailers redirects
#user-agent="QuickTime"

# Pretend to be Realplayer SP
# Fixes playback for some video streaming sites
#user-agent=RMA/1.0

# Pretend to have lots of bandwidth
# Speeds up realmedia rtsp:// streams
#bandwidth=2000000

# Pretend to be Winamp
# Fixes playback of some NSV streams
#user-agent="Winamp NSV Player/5.12 (ultravox/2.0)"

# Drop frames to preserve audio/video sync.
#framedrop = yes

# Specify your preferred skin here (skins are searched for in
# /usr/local/share/mplayer/skins/<name> and ~/.mplayer/skins/<name>).
#skin = Abyss

# Resample the font alphamap.
# 0     plain white fonts
# 0.75  very narrow black outline (default)
# 1     narrow black outline
# 10    bold black outline
#ffactor = 0.75

# cache settings
#
# Use 8MB input cache by default.
#cache = 8192
#
# Prefill 20% of the cache before starting playback.
#cache-min = 20.0
#
# Prefill 50% of the cache before restarting playback after the cache emptied.
#cache-seek-min = 50

# DVD: Display English subtitles if available.
#slang = en

# DVD: Play English audio tracks if available.
#alang = en


############
# Profiles #
############

# The options declared as part of profiles override global default settings,
# but only take effect when the profile is active.

[protocol.dvdnav]
#vc=ffmpeg12,
#mouse-movements=yes
#nocache=yes

#[vo.vdpau]
#vc=ffmpeg12vdpau,ffwmv3vdpau,ffvc1vdpau,ffh264vdpau,ffodivxvdpau,
# Most video filters do not work with vdpau.
#vf-clr=yes


# OSD progress bar vertical alignment
#progbar-align=50

# You can also include other configuration files.
#include = /path/to/the/file/you/want/to/include
~/.mplayer/config 
# Write your default config options here!
# [default] viene applicata a ogni file
[default]
# usa il server grafico X come video output
vo=xv
# usa alsa per l'audio output
ao=alsa
# ao=oss # Use OSS4
# decodifica multithreaded H264/MPEG-1/2 (valido: 1-8)
lavdopts=threads=2
# impostare il canale audio preferito (in questo esempio il numero sei)
channels = 6
# scala i sottotitoli al 3% della dimensione dello schermo
subfont-text-scale = 3
# non usa fontconfig
nofontconfig = 1
# aggiunge bordi neri ai filmati che non hanno lo stesso aspetto di forma dello schermo
# per wide screen monitors
vf-add=expand=::::1:16/9:16
# per non wide screen traditional monitors
#vf-add=expand=::::1:4/3:16

#profilo di up-mixing da due canali audio a sei canali
# use -profile 2chto6ch to activate
[2chto6ch]
af-add=pan=6:1:0:.4:0:.6:2:0:1:0:.4:.6:2
 
#profilo di down-mixing da sei canali audio a due canali
# use -profile 6chto2ch to activate
[6chto2ch]
af-add=pan=2:0.7:0:0:0.7:0.5:0:0:0.5:0.6:0.6:0:0

# Disabilita screensaver
heartbeat-cmd="xscreensaver-command -deactivate &" # stop xscreensaver
stop-xscreensaver="yes" # stop gnome-screensaver

ls /etc/modprobe.d/
alsa-base.conf  snd-hda-intel.conf

etc/modprobe.d/alsa-base.conf 
options snd slots=snd_mia,snd_hda_intel
options snd_mia index=1
options snd_hda_intel index=0



/etc/modprobe.d/snd-hda-intel.conf 
options snd-hda-intel model=auto


cat /proc/asound/modules 
 0 snd_hda_intel
lsmod |grep snd
snd_hda_codec_hdmi     30162  1 
snd_hda_codec_conexant    36759  1 
snd_hda_intel          37000  2 
snd_hda_codec         150305  3 snd_hda_codec_hdmi,snd_hda_codec_conexant,snd_hda_intel
snd_hwdep               6340  1 snd_hda_codec
snd_pcm                77645  3 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel
snd_page_alloc          7210  2 snd_pcm,snd_hda_intel
snd_timer              18726  1 snd_pcm
snd                    59109  11 snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_hda_codec_conexant,snd_pcm,snd_hda_codec,snd_hda_intel
soundcore               5450  1 snd

Offline

#2 2014-02-12 00:35:07

ryanjacobs
Member
Registered: 2014-02-11
Posts: 18
Website

Re: mplyer sound doesn't work, instead amarok's sond work !!!

What does MPlayer output when you try to play something?

Offline

#3 2014-02-12 01:06:26

frank604
Member
From: BC, Canada
Registered: 2011-04-20
Posts: 1,219

Re: mplyer sound doesn't work, instead amarok's sond work !!!

Try to setup a basic sound configuration first.  Comment out your:

[6chto2ch]
af-add=pan=2:0.7:0:0:0.7:0.5:0:0:0.5:0.6:0.6:0:0
[2chto6ch]
af-add=pan=6:1:0:.4:0:.6:2:0:1:0:.4:.6:2
channels = 6

Not sure if this is the issue.  Are you using someone else's config?  Do you really have a 6 channel output?  After commenting, give it a go.  All you need to test audio is

ao=alsa

All other audio configs should be commented to isolate any issues.

Last edited by frank604 (2014-02-12 01:07:27)

Offline

#4 2014-02-12 17:14:00

otto88
Banned
Registered: 2012-12-16
Posts: 82

Re: mplyer sound doesn't work, instead amarok's sond work !!!

ryanjacobs wrote:

What does MPlayer output when you try to play something?

MPlayer SVN-r36498-snapshot-4.8.2 (C) 2000-2013 MPlayer Team
206 audio & 433 video codecs
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing /dati/Video/nge_07-.info.mp4.
libavformat version 55.19.104 (internal)
libavformat file format detected.
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (vorbis), -aid 0, -alang eng
[lavf] stream 2: audio (vorbis), -aid 1, -alang jpn
[lavf] stream 3: subtitle (subrip), -sid 0, -slang eng, SRT
VIDEO:  [H264]  448x336  0bpp  23.976 fps    0.0 kbps ( 0.0 kbyte/s)
Clip info:
 creation_time: 2008-05-06 03:08:56
Load subtitles in /dati/Video/
Could not find a UTF-8 locale, some keys will not be handled.
Opening video filter: [expand osd=1 aspect=16/9 round=16]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 1.777778, round: 16
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 55.39.100 (internal)
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, floatle, 0.0 kbit/0.00% (ratio: 0->384000)
Selected audio codec: [ffvorbis] afm: ffmpeg (FFmpeg Vorbis)
==========================================================================
[AO_ALSA] Playback open error: No such file or directory
Failed to initialize audio driver 'alsa'
Could not open/initialize audio device -> no sound.
Audio: no sound
Starting playback...
[VD_FFMPEG] Trying pixfmt=0.
[VD_FFMPEG] XVMC-accelerated MPEG-2.
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
[VD_FFMPEG] Trying pixfmt=0.
[VD_FFMPEG] XVMC-accelerated MPEG-2.
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 608x336 => 608x336 Planar YV12 
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
V:   1.6   0/  0  1%  0%  0.0% 0 0 

Exiting... (Quit)

Offline

#5 2014-02-12 20:50:49

otto88
Banned
Registered: 2012-12-16
Posts: 82

Re: mplyer sound doesn't work, instead amarok's sond work !!!

frank604 wrote:

Try to setup a basic sound configuration first.  Comment out your:

[6chto2ch]
af-add=pan=2:0.7:0:0:0.7:0.5:0:0:0.5:0.6:0.6:0:0
[2chto6ch]
af-add=pan=6:1:0:.4:0:.6:2:0:1:0:.4:.6:2
channels = 6

Not sure if this is the issue.  Are you using someone else's config?  Do you really have a 6 channel output?  After commenting, give it a go.  All you need to test audio is

ao=alsa

All other audio configs should be commented to isolate any issues.

i try, but dowsn't work !!!

i've not made another config.
i copied that file from the wiki, while i was trying to fix it

edit:

now i try with vlc to open a video file and the dialog output is

Audio output failed:
The audio device "default" could not be used:
No such file or directory.

Last edited by otto88 (2014-02-12 21:05:24)

Offline

#6 2014-02-13 13:08:13

ryanjacobs
Member
Registered: 2014-02-11
Posts: 18
Website

Re: mplyer sound doesn't work, instead amarok's sond work !!!

So, apparently, your system cannot find the ALSA output driver. I suggest that you use a different driver than ALSA.

otto88 wrote:
[AO_ALSA] Playback open error: No such file or directory
Failed to initialize audio driver 'alsa'
Could not open/initialize audio device -> no sound.
Audio: no sound

Try this command to list all of the available audio output drivers:

mplayer -ao help

How do your available drivers compare to mine?:

Available audio output drivers:
	oss	OSS/ioctl audio output
	alsa	ALSA-0.9.x-1.x audio output
	esd	EsounD audio output
	pulse	PulseAudio audio output
	jack	JACK audio output
	sdl	SDLlib audio output
	openal	OpenAL audio output
	mpegpes	DVB audio output
	v4l2	V4L2 MPEG Audio Decoder output
	null	Null audio output
	pcm	RAW PCM/WAVE file writer audio output

You can use a specific driver with this:

mplayer -ao <DRIVER>

I've always had no trouble playing audio using SDL:

mplayer -ao sdl file.mp3

Last edited by ryanjacobs (2014-02-13 13:19:32)

Offline

#7 2014-02-13 14:34:32

Neburski
Member
Registered: 2009-09-15
Posts: 118

Re: mplyer sound doesn't work, instead amarok's sond work !!!

ryanjacobs wrote:

So, apparently, your system cannot find the ALSA output driver. I suggest that you use a different driver than ALSA.

OP should first go through the wiki page of ALSA to ensure that his ALSA setup is working correctly. There aren't many sound setups that do not work under ALSA. If OP is relying on another sound setup then he should follow the appropriate wiki and tell us so.

@otto88: It would also help if you would try to explain what your intentions were. I'm assuming you merely want to have sound working and not configure some fancy setup. In that case you should just stick to a basic setup and follow the wiki step by step (don't skip any line and if you don't understand something, you figure that out or you ask people, don't just ignore it).

For instance I don't even have those /etc/modprobe.d/alsa-base.conf and /etc/modprobe.d/snd-hda-intel.conf even though I have 2 sound devices, while you seem to only have 1 sound device

otto88 wrote:
cat /proc/asound/modules 
 0 snd_hda_intel

So your /etc/modprobe.d/alsa-base.conf in that case is totally unnecessary, let alone that you don't even have the snd_mia module loaded so why do you even configure alsa to load it at index 1. You aren't supposed to simply copy and paste the configurations from the wiki. Those configurations are merely there to give you an idea on how to make your own configuration.

When you have ensured that your sound is been set up correctly then you can start with the most basic mplayer configuration. You keep the /etc/mplayer/example.cong configuration file totally commented out (like you have atm) and your ~/.mplayer/config should only contain

ao=alsa

Offline

#8 2014-02-15 20:00:25

otto88
Banned
Registered: 2012-12-16
Posts: 82

Re: mplyer sound doesn't work, instead amarok's sond work !!!

Neburski wrote:
ryanjacobs wrote:

So, apparently, your system cannot find the ALSA output driver. I suggest that you use a different driver than ALSA.

OP should first go through the wiki page of ALSA to ensure that his ALSA setup is working correctly. There aren't many sound setups that do not work under ALSA. If OP is relying on another sound setup then he should follow the appropriate wiki and tell us so.

@otto88: It would also help if you would try to explain what your intentions were. I'm assuming you merely want to have sound working and not configure some fancy setup. In that case you should just stick to a basic setup and follow the wiki step by step (don't skip any line and if you don't understand something, you figure that out or you ask people, don't just ignore it).

For instance I don't even have those /etc/modprobe.d/alsa-base.conf and /etc/modprobe.d/snd-hda-intel.conf even though I have 2 sound devices, while you seem to only have 1 sound device

otto88 wrote:
cat /proc/asound/modules 
 0 snd_hda_intel

So your /etc/modprobe.d/alsa-base.conf in that case is totally unnecessary, let alone that you don't even have the snd_mia module loaded so why do you even configure alsa to load it at index 1. You aren't supposed to simply copy and paste the configurations from the wiki. Those configurations are merely there to give you an idea on how to make your own configuration.

When you have ensured that your sound is been set up correctly then you can start with the most basic mplayer configuration. You keep the /etc/mplayer/example.cong configuration file totally commented out (like you have atm) and your ~/.mplayer/config should only contain

ao=alsa

ok i just followed the wiki and your advices and doesn't work, yet sad

mplayer -ao alsa /dati/Musica/StudyDue.mp3 
MPlayer SVN-r36498-snapshot-4.8.2 (C) 2000-2013 MPlayer Team
206 audio & 433 video codecs
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing /dati/Musica/StudyDue.mp3.
libavformat version 55.19.104 (internal)
Audio only file format detected.
Load subtitles in /dati/Musica/
==========================================================================
Opening audio decoder: [mpg123] MPEG 1.0/2.0/2.5 layers I, II, III
AUDIO: 22050 Hz, 2 ch, s16le, 32.0 kbit/4.54% (ratio: 4000->88200)
Selected audio codec: [mpg123] afm: mpg123 (MPEG 1.0/2.0/2.5 layers I, II, III)
==========================================================================
[AO_ALSA] Playback open error: No such file or directory
Failed to initialize audio driver 'alsa'
Could not open/initialize audio device -> no sound.
Audio: no sound
Video: no video


Exiting... (End of file)

Offline

#9 2014-02-16 02:14:23

ryanjacobs
Member
Registered: 2014-02-11
Posts: 18
Website

Re: mplyer sound doesn't work, instead amarok's sond work !!!

Did you try anything else besides ALSA?:

mplayer -ao alsa

Such as,

mplayer -ao sdl

And, did listing your available audio drivers even list ALSA?:

mplayer -ao help

Offline

#10 2014-02-16 03:19:58

Le Void
Member
Registered: 2011-04-23
Posts: 20

Re: mplyer sound doesn't work, instead amarok's sond work !!!

As a side note, check out mpv (https://wiki.archlinux.org/index.php/mpv), which is based on mplayer/mplayer2 but is newer/looks cleaner (really worth it).

Last edited by Le Void (2014-02-16 03:20:53)

Offline

#11 2014-02-16 08:24:04

otto88
Banned
Registered: 2012-12-16
Posts: 82

Re: mplyer sound doesn't work, instead amarok's sond work !!!

ryanjacobs wrote:

Did you try anything else besides ALSA?:

mplayer -ao alsa

Such as,

mplayer -ao sdl

And, did listing your available audio drivers even list ALSA?:

mplayer -ao help
mplayer -ao sdl /dati/Musica/StudyDue.mp3 
MPlayer SVN-r36498-snapshot-4.8.2 (C) 2000-2013 MPlayer Team
206 audio & 433 video codecs
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing /dati/Musica/StudyDue.mp3.
libavformat version 55.19.104 (internal)
Audio only file format detected.
Load subtitles in /dati/Musica/
==========================================================================
Opening audio decoder: [mpg123] MPEG 1.0/2.0/2.5 layers I, II, III
AUDIO: 22050 Hz, 2 ch, s16le, 32.0 kbit/4.54% (ratio: 4000->88200)
Selected audio codec: [mpg123] afm: mpg123 (MPEG 1.0/2.0/2.5 layers I, II, III)
==========================================================================
[AO SDL] Samplerate: 22050Hz Channels: Stereo Format s16le
[AO SDL] Unable to open audio: No available audio device
Failed to initialize audio driver 'sdl'
Could not open/initialize audio device -> no sound.
Audio: no sound
Video: no video


Exiting... (End of file)
 mplayer -ao help
MPlayer SVN-r36498-snapshot-4.8.2 (C) 2000-2013 MPlayer Team
206 audio & 433 video codecs
Available audio output drivers:
        oss     OSS/ioctl audio output
        alsa    ALSA-0.9.x-1.x audio output
        pulse   PulseAudio audio output
        jack    JACK audio output
        sdl     SDLlib audio output
        mpegpes DVB audio output
        v4l2    V4L2 MPEG Audio Decoder output
        null    Null audio output
        pcm     RAW PCM/WAVE file writer audio output

i don't understand, two days ago i tryed to use smplayer, and i changed the preserences in Audio => OutputDriver, from alsa to oss e for a second it worked, but then stopped it and was back to not work !!!
why mplayer and vlc don't work instead browser audio yes ???

Offline

#12 2014-02-16 19:38:16

ryanjacobs
Member
Registered: 2014-02-11
Posts: 18
Website

Re: mplyer sound doesn't work, instead amarok's sond work !!!

Yeah, I don't really know where to go from here.
But, you said that your browser can play audio. What browser are you using?

Offline

#13 2014-02-18 20:05:42

otto88
Banned
Registered: 2012-12-16
Posts: 82

Re: mplyer sound doesn't work, instead amarok's sond work !!!

firefox

Offline

#14 2014-02-18 23:48:04

ryanjacobs
Member
Registered: 2014-02-11
Posts: 18
Website

Re: mplyer sound doesn't work, instead amarok's sond work !!!

Just wondering, does this command play anything for you? (pick a real mp3 file instead of "some_random_song.mp3")

lame --decode some_random_song.mp3 - | aplay -t wav

Offline

#15 2014-02-22 18:42:15

otto88
Banned
Registered: 2012-12-16
Posts: 82

Re: mplyer sound doesn't work, instead amarok's sond work !!!

nothing.
this is the output

lame --decode /dati/Musica/StudyUno.mp3  - | aplay -t wav
input:  /dati/Musica/StudyUno.mp3  (22.05 kHz, 1 channel, MPEG-2 Layer III)
output: <stdout>  (16 bit, Microsoft WAVE)
skipping initial 529 samples (encoder+decoder delay)
Frame#    64/122290  32 kbps         aplay: main:722: audio open error: No such file or directory

Offline

#16 2014-02-23 05:41:11

ryanjacobs
Member
Registered: 2014-02-11
Posts: 18
Website

Re: mplyer sound doesn't work, instead amarok's sond work !!!

Sorry, I don't really know where to go from here. It's now obvious that ALSA is the problem here. All I would recommend to do, is read up on the beginner wiki for setting up ALSA; and, follow step by step.

Offline

#17 2014-02-26 20:47:16

otto88
Banned
Registered: 2012-12-16
Posts: 82

Re: mplyer sound doesn't work, instead amarok's sond work !!!

how do i do to clean up the system from ALSA ?

Offline

#18 2014-02-28 11:55:59

ryanjacobs
Member
Registered: 2014-02-11
Posts: 18
Website

Re: mplyer sound doesn't work, instead amarok's sond work !!!

Here's a decent troubleshooting guide that I found: http://en.wikibooks.org/wiki/Configurin … leshooting
And, heres Arch's guide to ALSA: https://wiki.archlinux.org/index.php/Ad … sound_card

Try listing your available sound cards with this command (if nothing shows up, then you are missing a kernel module):
Please, post whatever this command outputs.

aplay -l

And this error that you got:

aplay: main:722: audio open error: No such file or directory

Means that you are "targeting a non-existent or erroneous device." Which basically means that ALSA cannot locate your sound card.

Last edited by ryanjacobs (2014-02-28 12:04:31)

Offline

#19 2014-02-28 13:35:24

halimbo
Member
From: Krefeld, Germany
Registered: 2013-10-23
Posts: 74

Re: mplyer sound doesn't work, instead amarok's sond work !!!

When I have problems with sound, deleting /var/lib/asound.state and reboot often helps, it's worth giving a try

Offline

Board footer

Powered by FluxBB