Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 123841 - media-video/mplayer-1.0.20060217 doesn't work w/ alsa
Summary: media-video/mplayer-1.0.20060217 doesn't work w/ alsa
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Media-video project
URL:
Whiteboard:
Keywords:
: 123894 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-02-23 11:11 UTC by David Watzke
Modified: 2006-11-07 06:08 UTC (History)
10 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Watzke 2006-02-23 11:11:01 UTC
Hi. With new MPlayer 1.0.20060217 I can't play divx, mpeg (and maybe others) movies. When I run it, then:

$ mplayer down/static-x_-_the_only.mpeg
MPlayer dev-CVS-060217-11:46-3.4.5 (C) 2000-2006 MPlayer Team
CPU: Advanced Micro Devices Athlon 64 Newcastle,Winchester,San Diego,Venice; Sempron Palermo (Family: 15, Stepping: 0)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Přeloženo pro CPU x86 s rozš
Comment 1 David Watzke 2006-02-23 11:11:01 UTC
Hi. With new MPlayer 1.0.20060217 I can't play divx, mpeg (and maybe others) movies. When I run it, then:

$ mplayer down/static-x_-_the_only.mpeg
MPlayer dev-CVS-060217-11:46-3.4.5 (C) 2000-2006 MPlayer Team
CPU: Advanced Micro Devices Athlon 64 Newcastle,Winchester,San Diego,Venice; Sempron Palermo (Family: 15, Stepping: 0)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Přeloženo pro CPU x86 s rozšířeními: MMX MMX2 3DNow 3DNowEx SSE SSE2



91 audio & 206 video kodeků
/usr/share/fonts/TTF/ARIAL.TTF doesn't look like a font description, ignoring.
Nemohu načíst font: /usr/share/fonts/TTF/ARIAL.TTF
Přehrávám down/static-x_-_the_only.mpeg

Detekován formát souboru MPEG-PS.
VIDEO:  MPEG1  352x240  (aspect 12)  29.970 fps  1150.0 kbps (143.8 kbyte/s)
==========================================================================
Otevírám audio dekodér: [mp3lib] MPEG layer-2, layer-3
AUDIO: 44100 Hz, 2 ch, s16le, 224.0 kbit/15.87% (ratio: 28000->176400)
Vybrán audio kodek: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
==========================================================================
Otevírám video dekodér: [mpegpes] MPEG 1/2 Video passthrough
VDek: Požadovaná konfigurace vo - 352 x 240 (preferovaný barevný prostor: Mpeg PES)
Nemohu nalézt společný barevný prostor - zkouším to znovu s -vf scale...
Otevírám video filtr: [scale]
Vybrané video_out zařízení je nekompatibilní s tímto kodekem.
Zkuste přidat filtr scale, čili -vf spp,scale namísto -vf spp.
Video dekodér - inicializace selhala :(
Otevírám video dekodér: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.4.0b
Vybrán video kodek: [mpeg12] vfm: libmpeg2 (MPEG-1 or 2 (libmpeg2))
==========================================================================
alsa-init: 1 soundcard found, using: default
alsa: 44100 Hz/2 channels/4 bpf/60208 bytes buffer/Signed 16 bit Little Endian
AO: [alsa] 44100Hz 2ch s16le (2 bytes per sample)
Začínám přehrávat...
VDek: Požadovaná konfigurace vo - 352 x 240 (preferovaný barevný prostor: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Poměr stran obrazu filmu je 1.33:1 - škáluji na správný poměr.
VO: [xv] 352x240 => 352x264 Planar YV12
alsa-play: write error: Broken pipe0.000   1/  1 ??% ??% ??,?% 0 0 30%
alsa-play: trying to reset soundcard
alsa-play: write error: Broken pipe0.032  13/ 13 ??% ??% ??,?% 5 0 51%
alsa-play: trying to reset soundcard
alsa-play: write error: Broken pipe0.058  24/ 24 30%  0%  0.8% 10 0 52%
alsa-play: trying to reset soundcard
alsa-play: write error: Broken pipe0.076  35/ 35 21%  0%  0.8% 15 0 53%
alsa-play: trying to reset soundcard
alsa-play: write error: Broken pipe0.092  46/ 46 16%  0%  0.8% 19 0 63%
alsa-play: trying to reset soundcard

and that alsa-play throwing for((;;)) this errors. Film runs very fast (10x faster then is normal for ppl from Earth) with horrible sounds. When I mask 20060217 and emerge 20060102, it is OK again. Tried to delete MPlayer's config, but w/o success...

[ebuild   R   ] media-video/mplayer-1.0.20060217-r1  USE="X alsa cdparanoia custom-cflags dga directfb dts dvd dvdread encode fbcon gif gtk i8x0 ipv6 jpeg mad matroska nls nvidia openal opengl png sdl theora truetype utf8 vorbis xv xvid -aac -aalib -arts -bidi -bindist -bl -cpudetection -debug -doc -dv -dvb -edl -esd -ggi -jack -joystick -libcaca -lirc -live -livecd -lzo -matrox -musepack -nas -oss -real -rtc -samba -tga -v4l -v4l2 -xanim -xinerama -xmms -xvmc" 0 kB

Portage 2.1_pre4-r1 (default-linux/amd64/2006.0, gcc-3.4.5, glibc-2.3.6-r3, 2.6.16-rc4 x86_64)
=================================================================
System uname: 2.6.16-rc4 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.12.0_pre16
ccache version 2.4 [enabled]
dev-lang/python:     2.4.2-r1
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O3 -march=athlon64 -mtune=athlon64 -fomit-frame-pointer -pipe -mmmx -msse3 -m3dnow"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/share/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O3 -march=athlon64 -mtune=athlon64 -fomit-frame-pointer -pipe -mmmx -msse3 -m3dnow"
DISTDIR="/portage/distfiles"
FEATURES="autoconfig ccache distlocks noman sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.linux.cz/pub/linux/gentoo http://mirror.gentoo.sk/pub http://distfiles.gentoo.org/"
LANG="cs_CZ.UTF-8"
LC_ALL="cs_CZ.UTF-8"
LINGUAS="cs"
MAKEOPTS="-j3"
PKGDIR="/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/portage"
PORTDIR_OVERLAY="/overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X acpi adns alsa apm audiofile avi bash-completion bitmap-fonts bzip2 caps cdparanoia cdr css cups curl curlwrappers dbus dga dio directfb divx4linux dts dvd dvdr dvdread emboss encode fbcon ffmpeg flac flash foomaticdb fortran ftp gdbm gif gpm hal i8x0 icq id3 id3v2 imagemagick imlib innodb ipv6 jabber javascript jpeg kde kdeenablefinal lame lcms lzw lzw-tiff mad matroska mbox mikmod mime mp3 mpeg mplayer mysqli ncurses nls nowebdav nptl nptlonly nvidia ogg oggvorbis openal opengl osc oscar pcntl pcre pdflib perl php pic png posix ppds python qt quicktime readline sdl session sftplogging skey sockets speex ssl subversion svg symlink theora tiff truetype truetype-fonts type1-fonts unicode usb userlocales utf8 vcd vorbis xine xml xml2 xpm xv xvid zlib elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux linguas_cs userland_GNU video_cards_nvidia"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LDFLAGS

System is ~amd64 (as you can see) and up-to-date (newest alsa and friends).
Comment 2 David Watzke 2006-02-23 11:12:30 UTC
By the way, audio in OGG it plays OK, but MP3 not.
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2006-02-24 02:02:24 UTC
*** Bug 123894 has been marked as a duplicate of this bug. ***
Comment 4 Clemens Ladisch 2006-02-24 05:44:25 UTC
What sound card are you using? (see /proc/asound/cards)
Comment 5 David Watzke 2006-02-24 06:11:21 UTC
$ cat /proc/asound/cards
 0 [CK804          ]: NFORCE - NVidia CK804
                      NVidia CK804 with ALC850 at 0xfebfd000, irq 21
Comment 6 Mister Woody 2006-02-24 07:03:59 UTC
Similar here:

0 [CK8S           ]: NFORCE - NVidia CK8S
                     NVidia CK8S with ALC655 at 0xe8002000, irq 16
Comment 7 Clemens Ladisch 2006-03-01 04:25:34 UTC
Any error messages in the system log?
Does it work with "-ao alsa:device=plughw"?
Comment 8 David Watzke 2006-03-01 05:07:47 UTC
In log (messages, dmesg) is nothing about it, but with that option it works nice!
Comment 9 Clemens Ladisch 2006-03-01 09:43:43 UTC
So it is a problem with the dmix plugin.

Which version of the alsa-lib package are you using?
Comment 10 David Watzke 2006-03-01 09:50:27 UTC
1.0.11_rc3. Now I tried to remove ~/.asoundrc, but it was not help.
Comment 11 David Watzke 2006-03-03 04:59:51 UTC
Same with new 1.0.20060302.
Comment 12 Ivan Novick 2006-03-04 11:00:50 UTC
Same sound card here, on AMD64 

0 [CK804          ]: NFORCE - NVidia CK804
                     NVidia CK804 with ALC850 at 0xd3103000, irq 225

Reverting to mplayer-1.0.20060102 from mplayer-1.0.20060217 fixed the problem for me.
Comment 13 David Watzke 2006-03-04 11:09:53 UTC
Ivan, you can use the new versions, just add to ~/.mplayer/config line:
ao=alsa:device=plughw
Comment 14 Maxxer 2006-03-07 00:19:17 UTC
(In reply to comment #12)
> Ivan, you can use the new versions, just add to ~/.mplayer/config line:
> ao=alsa:device=plughw

I had the same problem, on AMD64 (Asus A6K) with the following card:

 0 [SI7012         ]: ICH - SiS SI7012
                      SiS SI7012 with ALC650F at 0xe400, irq 17

and media-video/mplayer-1.0.20060302.

David Watzke's suggestion solved my problem.
Comment 15 Maxxer 2006-03-07 00:21:45 UTC
> David Watzke's suggestion solved my problem.

Ahem... Just to thank the right person, the suggestion was from Clemens Ladisch :-)
Comment 16 Clemens Ladisch 2006-03-07 10:17:07 UTC
This doesn't actually solve the problem, it's just a workaround.

However, this looks like a problem in ALSA.
Comment 17 Luca Barbato gentoo-dev 2006-03-07 14:47:35 UTC
mplayer is working for me on all of my systems, could you please tell me if they have alsa misconfigurations or something more strange?
Comment 18 Ken 2006-03-09 06:46:31 UTC
0 [CK804          ]: NFORCE - NVidia CK804
                     NVidia CK804 with ALC850 at 0xf6103000, irq 217

I have the same problem.  If I use -ao sdl, it works fine, even though SDL should be using ALSA.  I also receive music.raw files in my home directory when I use certain ALSA apps, though I don't know if that is related.  
Comment 19 Kelly Price 2006-03-13 00:02:19 UTC
I also run into this bug myself.

Using -ao sdl is a work around, as well as using mplayer-bin (32-bit version).  Something's off there.  I'll check the -ao alsa:device=plughw patch in a bit.
Comment 20 Greg Surbey 2006-03-14 19:10:03 UTC
this looks to be a dupe of bug 123236
Comment 21 Raphael 2006-03-26 23:23:17 UTC
mplayer-bin fails with alsa for me. Apparently this is related to dmix bugs in newer alsa versions in portage.


I get 
alsa-init: 1 soundcard found, using: default
ALSA lib pcm_dmix.c:1136:(_snd_pcm_dmix_open) Unknown field variable_buffer_size
alsa-init: playback open error: Invalid argument
Could not open/initialize audio device -> no sound.


when I use mplayer-bin but

alsa-init: using device default
alsa: 48000 Hz/1 channels/2 bpf/32768 bytes buffer/Signed 16 bit Little Endian
AO: [alsa] 48000Hz 1ch s16le (2 bytes per sample)

in mplayer.


-ao alsa:device=plughw from comment 12 fixes it.

Raphael
Comment 22 David Watzke 2006-04-19 22:15:49 UTC
Seems to be fixed in new snapshots...
Comment 23 Richard 2006-11-07 06:08:45 UTC
(In reply to comment #21)
I can watch a DVD in 5.1 surround with all the channels going to the correct speakers. It will play all the way through without any problems. However, if I attempt to skip forwards or backwards (using the right/left arrow keys) or use "-ss <time>" to start playback somewhere other than the start of the movie, I get:
alsa-lib: pcm.c:6250:(snd_pcm_mmap_commit) commit offset (0) doesn't match with appl_ptr (98577) % buf_size (16384)
alsa-play: write error: Broken pipe
alsa-play: trying to reset soundcard
This is repeated very fast and - I think - endlessly.
The command I am using is as follows:
mplayer-bin dvd:// -channels 6 -ao alsa -af channels=6:6:0:0:1:4:2:1:3:2:4:3:5:5
(The same problem occurs without "-af cha...")
Some possibly relevant lines from mplayer's output immediately after running this command are:
AC3: 5.1 (3f+2r+lfe)  48000 Hz  448.0 kbit/s
alsa-init: using device surround51
alsa: 48000 Hz/6 channels/12 bpf/196608 bytes buffer/Signed 16 bit Little Endian
AO: [alsa] 48000Hz 6ch s16le (2 bytes per sample)

If I use "mplayer-bin dvd:// -channels 6 -ao alsa:device=plughw" then I can skip forwards/backwards to my heart's content, but I don't have any vocal track (center front) coming from any speaker.
Using "mplayer-bin dvd:// -channels 6 -aid 128 -vo null" (oss) again I can skip but I don't have any vocal track.
All my volume levels are up, and as I said I CAN get the output I want, but I can only stop or pause the movie, and I can't start playback anywhere other than at the start.
The software I'm using is as follows:
media-libs/alsa-lib version 1.0.13
media-sound/alsa-utils version ^^
media-sound/alsa-headers version ^^
media-libs/alsa-oss version 1.0.12
media-video/mplayer-bin 1.0_pre8

$cat /proc/asound/cards 
 0 [Audigy2        ]: Audigy2 - Audigy 2 Platinum [SB0240P]
                      Audigy 2 Platinum [SB0240P] (rev.4, serial:0x10021102) at 0x9000, irq 217

I might seem like I'm being very picky, but if you can have 5.1 surround working properly on any DVD you own, but you can't rewind/fastforward without endless broken pipe messages (and a subsequently frozen movie) then you are quite restricted in what you can do.