[MPlayer-users] AAC 5.1 and -af pan= (5.1ch->2ch)

LLoyd Bates LLoydBates at gmx.de
Fri Feb 18 11:44:04 CET 2005


Am Freitag, den 18.02.2005, 01:19 -0800 schrieb Loren Merritt: 
> On Fri, 18 Feb 2005, LLoyd Bates wrote:
> 
> > Hi there,
> > This message goes out to the people that use the pan filter and know
> > exactly what they are doing.
> >
> > Up to now i wasn't able to fully enjoy a video encoded with 5.1 aac
> > since mplayer did not downmix to Stereo. After some time i found the pan
> > filter and played with it some time.
> > This is what i found working: '-af
> > pan=6:1:0:1:0:0:1:1:0:0.5:0.5:0.5:0.5'
> >
> > BUT, since i don't know exactly how to handle the pan filter the
> > resulting Stereo output is less than optimal. Anyone out there that can
> > give a better line for
> > 5.1ch -> 2ch Stereo downmixing?
> >
> > (iirc this is only needed with aac 5.1. if the audio is ac3 or ogg
> > vorbis mplayer will downmix automatically)
> > and sorry for the bad english.
> 
> I use -af pan=6:.32:.39:.06:.17:-.17:.33:.32:.06:.39:-.17:.17:.33
> I got the coefficients from MatrixMixer. I can't vouch for any theoretical 
> basis, but they sound fine to me.
> (You can see that my matrix is not normalized; I had to scale down the 
> coefficients to avoid clipping.)

to be more specific ...
this is what mplayer  tells me 
$ mplayer -v -af pan=6:.32:.39:.06:.17:-.17:.33:.32:.06:.39:-.17:.17:.33
a_file.mkv 
MPlayer 1.0pre6-3.3.5 (C) 2000-2004 MPlayer Team
CPU: Advanced Micro Devices Athlon MP/XP Thoroughbred (Family: 6,
Stepping: 1)
Detected cache-line size is 64 bytes
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE



73 audio & 180 video codecs
CommandLine: '-v' '-af'
'pan=6:.32:.39:.06:.17:-.17:.33:.32:.06:.39:-.17:.17:.33' 'a_file'
init_freetype
get_path('font/font.desc') -> '/home/my_user/.mplayer/font/font.desc'
Font /home/my_user/.mplayer/font/font.desc loaded successfully! (206
chars)
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
Using Linux hardware RTC timing (1024Hz).
get_path('input.conf') -> '/home/my_user/.mplayer/input.conf'
Parsing input config file /home/my_user/.mplayer/input.conf
Input config file /home/my_user/.mplayer/input.conf parsed: 54 binds
get_path('a_file.conf') -> '/home/my_user/.mplayer/a_file.conf'
Playing a_file.
[file] File size is 237293091 bytes
STREAM: [file] a_file
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
CACHE_PRE_INIT: 0 [0] 0  pre:0  eof:6258688  
Cache fill: 18,65% (6258688 bytes)    Checking for YUV4MPEG2
ASF_check: not ASF guid!
Checking for Nullsoft Streaming Video
Checking for NuppelVideo
Checking for REAL
Checking for SMJPEG
[mkv] Found the head...
[mkv] + a segment...
[mkv] /---- [ parsing seek head ] ---------
[mkv] /---- [ parsing seek head ] ---------
[mkv] \---- [ parsing seek head ] ---------
[mkv] /---- [ parsing cues ] -----------
[mkv] \---- [ parsing cues ] -----------
[mkv] \---- [ parsing seek head ] ---------
[mkv] |+ segment information...
[mkv] | + duration: 1430,766s
[mkv] |+ segment tracks...
[mkv] | + a track...
[mkv] |  + Track number: 1
[mkv] |  + Track type: Video
[mkv] |  + Codec ID: V_MS/VFW/FOURCC
[mkv] |  + CodecPrivate, length 40
[mkv] |  + Default duration: 41,708ms ( = 23,976 fps)
[mkv] |  + Default flag: 1
[mkv] |  + Language: eng
[mkv] |  + Video track
[mkv] |   + Pixel width: 640
[mkv] |   + Pixel height: 480
[mkv] |   + Display width: 640
[mkv] |   + Display height: 480
[mkv] | + a track...
[mkv] |  + Track number: 2
[mkv] |  + Track type: Audio
[mkv] |  + Codec ID: A_AAC/MPEG4/LC/SBR
[mkv] |  + Default duration: 46,440ms ( = 21,533 fps)
[mkv] |  + Default flag: 1
[mkv] |  + Language: eng
[mkv] |  + Audio track
[mkv] |   + Sampling frequency: 22050,000000
[mkv] |   + Channels: 6
[mkv] | + a track...
[mkv] |  + Track number: 3
[mkv] |  + Track type: Audio
[mkv] |  + Codec ID: A_AAC/MPEG4/LC/SBR
[mkv] |  + Default duration: 46,440ms ( = 21,533 fps)
[mkv] |  + Default flag: 0
[mkv] |  + Language: jpn
[mkv] |  + Audio track
[mkv] |   + Sampling frequency: 22050,000000
[mkv] |   + Channels: 6
[mkv] | + a track...
[mkv] |  + Track number: 4
[mkv] |  + Track type: Subtitle
[mkv] |  + Codec ID: S_TEXT/UTF8
[mkv] |  + Default flag: 1
[mkv] |  + Language: eng
[mkv] | + a track...
[mkv] |  + Track number: 5
[mkv] |  + Track type: Subtitle
[mkv] |  + Codec ID: S_VOBSUB
[mkv] |  + CodecPrivate, length 348
[mkv] |  + Default flag: 0
[mkv] |  + Language: eng
[mkv] |+ found cluster, headers are parsed completely :)
[mkv] Track ID 1: video (V_MS/VFW/FOURCC), -vid 0
[mkv] Track ID 2: audio (A_AAC/MPEG4/LC/SBR), -aid 0, -alang eng
[mkv] Track ID 3: audio (A_AAC/MPEG4/LC/SBR), -aid 1, -alang jpn
[mkv] Track ID 4: subtitles (S_TEXT/UTF8), -sid 0, -slang eng
[mkv] Track ID 5: subtitles (S_VOBSUB), -sid 1, -slang eng
==> Found video stream: 1
[mkv] Aspect: 1,333333
[mkv] Will play video track 1
==> Found audio stream: 3
[mkv] Will play audio track 3
[mkv] VobSub size: 720x480
[mkv] VobSub forced subs: 0
[mkv] VobSub palette:
3759df,4af05a,008080,fc8080,942235,67ddca,c6a41f,564991,7b8080,df8080,24b66e,48525c,c5a21f,42cb68,8ab23b,32ada3
[mkv] VobSub custom colors: OFF
[mkv] VobSub colors: 000000,000000,000000,000000
[mkv] Will display subtitle track 4
Matroska file format detected.
VIDEO:  [DX50]  640x480  24bpp  23,976 fps    0,0 kbps ( 0,0 kbyte/s)
[V] filefmt:31  fourcc:0x30355844  size:640x480  fps:23,98
ftime:=0,0417
get_path('sub/') -> '/home/my_user/.mplayer/sub/'
get_path('default.sub') -> '/home/my_user/.mplayer/default.sub'
==========================================================================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
dec_audio: Allocating 4608 bytes for input buffer.
dec_audio: Allocating 49152 + 65536 = 114688 bytes for output buffer.
FAAD: Decoder init done (0Bytes)!
FAAD: Negotiated samplerate: 44100Hz  channels: 6
FAAD: compressed input bitrate missing, assuming 128kbit/s!
AUDIO: 44100 Hz, 6 ch, 16 bit (0x10), ratio: 16000->529200 (128,0 kbit)
Selected audio codec: [faad] afm:faad (FAAD AAC (MPEG2/MPEG4 Audio)
decoder)
==========================================================================
X11 opening display: :0.0
vo: X11 color mask:  FFFFFF  (R:FF0000 G:FF00 B:FF)
vo: X11 running at 1152x864 with depth 24 and 32 bpp (":0.0" => local
display)
[x11] Detected wm supports NetWM.
[x11] Detected wm supports FULLSCREEN state.
[x11] Detected wm supports ABOVE state.
[x11] Detected wm supports BELOW state.
[x11] Current fstype setting honours FULLSCREEN ABOVE BELOW X atoms
Disabling DPMS
DPMSDisable stat: 1
Opening video filter: [pp]
[vo] query(Planar YV12) -> 3
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
INFO: libavcodec init OK!
Selected video codec: [ffodivx] vfm:ffmpeg (FFmpeg MPEG-4)
==========================================================================
[PP] Using external postprocessing filter, max q = 6.
AutoQ: setting quality to 6.
Checking audio filter chain for 44100Hz/6ch/16bit ->
44100Hz/2ch/16bit...
[libaf] Adding filter pan 
[pan] Pan level from channel 0 to channel 0 = 0,000000
[libaf] Adding filter format 
[format] Changing sample format from 16bit little endian signed int to
32bit little endian float  
AF_pre: af format: 4 bps, 6 ch, 44100 hz, little endian float 
AF_pre: 44100Hz 6ch Floating Point
alsa-init: requested format: 44100 Hz, 2 channels, Floating Point
alsa-init: compiled for ALSA-1.0.7
alsa-init: setup for 1/2 channel(s)
alsa-init: got device=0, subdevice=0
alsa-init: 1 soundcard found, using: default
alsa-init: pcm opend in block-mode
alsa-init: chunksize set to 1024
alsa-init: fragcount=16
alsa-init: got buffersize=131072
alsa: 44100 Hz/2 channels/8 bpf/131072 bytes buffer/Float 32 bit Little
Endian
AO: [alsa] 44100Hz 2ch Floating Point (4 bps)
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/6ch/16bit ->
44100Hz/2ch/32bit...
[format] Changing sample format from 16bit little endian signed int to
32bit little endian float  
[libaf] Adding filter channels 
[channels] Changing number of channels to 2
[format] Changing sample format from 16bit little endian signed int to
32bit little endian float  
Starting playback...
alsa-space: free space = 131072, prepared --
[libaf] Reallocating memory in module format, old len = 0, new len =
131076
[libaf] Reallocating memory in module pan, old len = 0, new len = 131088
[libaf] Reallocating memory in module channels, old len = 0, new len =
43704
[ffmpeg] aspect_ratio: 1,333333
VDec: vo config request - 640 x 480 (preferred csp: Planar YV12)
[PP] Using external postprocessing filter, max q = 6.
Trying filter chain: pp vo
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1,33:1 - prescaling to correct movie aspect.
VO Config (640x480->640x480,flags=0,'MPlayer',0x32315659)
REQ: flags=0x437  req=0x0  
VO: [xv] 640x480 => 640x480 Planar YV12 
VO: Description: X11/Xv
VO: Author: Gerd Knorr <kraxel at goldbach.in-berlin.de> and others
Xvideo image format: 0x32595559 (YUY2) packed
Xvideo image format: 0x32315659 (YV12) planar
Xvideo image format: 0x59565955 (UYVY) packed
Xvideo image format: 0x30323449 (I420) planar
using Xvideo port 105 for hw scaling
[xv] dx: 0 dy: 0 dw: 640 dh: 480
*** [pp] Allocating mp_image_t, 640x480x12bpp YUV planar, 460800 bytes
[xv] dx: 0 dy: 0 dw: 640 dh: 480
*** [pp] Allocating mp_image_t, 640x480x12bpp YUV planar, 460800
bytes                              
*** [vo] Allocating mp_image_t, 640x480x12bpp YUV planar, 460800 bytes
*** [pp] Allocating mp_image_t, 640x480x12bpp YUV planar, 460800
bytes                              
Uninit audio filters... 0,002 ct:  0,007  27/ 27  6% 17% 22,4% 0 6
99%                              
[libaf] Removing filter format 
[libaf] Removing filter pan 
[libaf] Removing filter channels 
uninit audio: faad
FAAD: Closing decoder!
uninit video: ffmpeg
Successfully enabled DPMS
alsa-uninit: pcm closed
vo: uninit ...

Exiting... (Quit)






More information about the MPlayer-users mailing list