[MPlayer-users] audio filters drain the cpu
Fredrik Eriksson
feffese at yahoo.se
Wed Dec 14 21:22:26 CET 2005
playing a audiofile like
mplayer music.mp3
works just fine, without any notable cpu usage. However, trying to use a
audiofilter, like
mplayer -af sub music.mp3
or
mplayer -af surround music.mp3
the cpu usage goes up to over 90% (amd64 3500+). This happens both with
pre7 and the cvs. I'm starting to think this is a alsa problem, but I
would like to know if anyone has any idea about what is happening.
Adding -af channels=2:2:0:0:1:1 together with -channels 2 doesn't use
any cpu, if I omit -channels 2 mplayer will (for whatever reason) use
the surround device, and the cpu usage is up again. This is not a
problem with the surround device itself, since playing dvds with 5.1
audio works just fine, so there must be something wrong with the routing.
for whoever feels like reading, here is a -v output (who knows, it might
be relevant) ;)
$ mplayer-cvs -af channels=6:6:0:0:1:1:0:2:1:3:0:4:1:4 -v Within\
Temptation\ -\ Ice\ Queen.mp3
MPlayer dev-CVS-051214-01:00-3.4.4 (C) 2000-2005 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
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE SSE2
get_path('codecs.conf') -> '/home/winterbird//.mplayer/codecs.conf'
Reading /home/winterbird//.mplayer/codecs.conf: Can't open
'/home/winterbird//.mplayer/codecs.conf': No such file or directory
Reading /usr/local/etc/mplayer/codecs.conf: Can't open
'/usr/local/etc/mplayer/codecs.conf': No such file or directory
Using built-in default codecs.conf.
CommandLine: '-af' 'channels=6:6:0:0:1:1:0:2:1:3:0:4:1:4' '-v' 'Within
Temptation - Ice Queen.mp3'
init_freetype
/usr/X11R6/share/fonts/TTF/arialuni.ttf doesn't look like a font
description, ignoring.
Cannot load font: /usr/X11R6/share/fonts/TTF/arialuni.ttf
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
Linux RTC init error in ioctl (rtc_irqp_set 1024): Permission denied
Try adding "echo 1024 > /proc/sys/dev/rtc/max-user-freq" to your system
startup scripts.
Using nanosleep() timing
get_path('input.conf') -> '/home/winterbird//.mplayer/input.conf'
Can't open input config file /home/winterbird//.mplayer/input.conf: No
such file or directory
Can't open input config file /usr/local/etc/mplayer/input.conf: No such
file or directory
Falling back on default (hardcoded) input config
get_path('Within Temptation - Ice Queen.mp3.conf') ->
'/home/winterbird//.mplayer/Within Temptation - Ice Queen.mp3.conf'
Playing Within Temptation - Ice Queen.mp3.
get_path('sub/') -> '/home/winterbird//.mplayer/sub/'
[file] File size is 6414757 bytes
STREAM: [file] Within Temptation - Ice Queen.mp3
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
Checking for YUV4MPEG2
ASF_check: not ASF guid!
Checking for NuppelVideo
Checking for REAL
Checking for SMJPEG
Searching demuxer type for filename Within Temptation - Ice Queen.mp3
ext: .mp3
Trying demuxer 17 based on filename extension
==> Found audio stream: 0
demux_audio: seeking from 0x61E1A5 to start pos 0x0
demux_audio: audio data 0x0 - 0x61E125
Audio file file format detected.
Clip info:
Title: Ice Queen
Artist: Within Temptation
Album: Mother Earth
Year: 2002
Comment:
Track: 2
Genre: Metal
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
dec_audio: Allocating 4608 + 65536 = 70144 bytes for output buffer.
mp3lib: using generic C decore!
MP3lib: init layer2&3 finished, tables done
MPEG 1.0, Layer III, 44100 Hz 160 kbit Stereo, BPF: 522
Channels: 2, copyright: No, original: Yes, CRC: No, emphasis: 0
AUDIO: 44100 Hz, 2 ch, s16le, 160.0 kbit/11.34% (ratio: 20000->176400)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
Building audio filter chain for 44100Hz/2ch/s16le -> 0Hz/0ch/??...
[libaf] Adding filter channels
[channels] Routing from channel 0 to channel 0
[channels] Routing from channel 1 to channel 1
[channels] Routing from channel 0 to channel 2
[channels] Routing from channel 1 to channel 3
[channels] Routing from channel 0 to channel 4
[channels] Routing from channel 1 to channel 4
alsa-init: requested format: 44100 Hz, 6 channels, 9
alsa-init: compiled for ALSA-1.0.10
alsa-init: device set to surround51
alsa-init: 1 soundcard found, using: surround51
alsa-init: pcm opend in block-mode
alsa-init: chunksize set to 1024
alsa-init: fragcount=16
alsa-init: got buffersize=196608
alsa: 44100 Hz/6 channels/12 bpf/196608 bytes buffer/Signed 16 bit
Little Endian
AO: [alsa] 44100Hz 6ch s16le (2 bytes per sample)
AO: Description: ALSA-0.9.x-1.x audio output
AO: Author: Alex Beregszaszi, Zsolt Barat <joy at streamminister.de>
AO: Comment: under developement
Building audio filter chain for 44100Hz/2ch/s16le -> 44100Hz/6ch/s16le...
Video: no video
Freeing 0 unused video chunks.
Starting playback...
alsa-space: free space = 196608, prepared --
[libaf] Reallocating memory in module channels, old len = 0, new len = 65548
Thank you.
Fredrik Eriksson
More information about the MPlayer-users
mailing list