[MPlayer-advusers] pcm audio - decoding bug

Alex McHugh onerios at gmail.com
Sat Nov 18 10:44:23 CET 2006


This has been mentioned by another user previously, in the user  
mailing list, but seems to have been buried amongst the noise.

http://lists.mplayerhq.hu/pipermail/mplayer-users/2006-October/ 
063321.html

I'm happy to provide additional information as required/requested.  
Suspect this is an issue with format conversion when the volume  
filter is inserted into the audio filter chain.

Issue:
On Mac OS X, under some circumstances, pcm audio is decoded at what  
sounds to be twice normal speed in one channel, the other channel  
plays static.

Affected Platforms and versions:
Only tested on OS X, both Power PC and Intel.
Tested latest CVS, problem also exists in r8 and rc1

Test Details
Using the sample file "newedition-coolitnow.24bit-lpcm.vob" sample  
file found at:
http:.//samples.mplayerhq.hu/A-codecs/pcm24/

Playback using MPlayer OSX (GUI) will result in fraction of a second  
of normal playback, then audio exhibits behaviour described above.

Playback using command line, will play fine - until the audio is  
muted and then unmuted via the M key, then exhibits identical  
behaviour to that described above. Identical behaviour occurs when  
changing volume levels during playback.

Issue is not limited to 24bit big endian PCM audio, I have a number  
of AVI files containing 8bit little endian mono PCM which exhibit the  
same behaviour. Cannot replicate on other audio formats, only PCM.

*****
Test 1
Output from MPlayer OS X (using -v flag)

MPlayer dev-SVN-r20996-4.0.1 (C) 2000-2006 MPlayer Team
CPU: Genuine Intel(R) CPU           T2500  @ 2.00GHz (Family: 6,  
Model: 14, Stepping: 8)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
get_path('codecs.conf') -> '/Applications/MPlayer OSX.app/Contents/ 
Resources/External_Binaries/mplayer.app/Contents/Resources/codecs.conf'
Reading /Applications/MPlayer OSX.app/Contents/Resources/ 
External_Binaries/mplayer.app/Contents/Resources/codecs.conf: Can't  
open '/Applications/MPlayer OSX.app/Contents/Resources/ 
External_Binaries/mplayer.app/Contents/Resources/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: '/Users/alex/Desktop/newedition-coolitnow.24bit- 
lpcm.vob' '-monitoraspect
' '1.6000' '-vo' 'macosx:shared_buffer' '-v' '-slave' '-identify'
init_freetype
get_path('font/font.desc') -> '/Applications/MPlayer OSX.app/Contents/ 
Resources/External_Binaries/mplayer.app/Contents/Resources/font/ 
font.desc'
font: can't open file: /Applications/MPlayer OSX.app/Contents/ 
Resources/External_Binaries/mplayer.app/Contents/Resources/font/ 
font.desc
Bitmap font /usr/local/share/mplayer/font/font.desc loaded  
successfully! (206 chars)
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
get_path('fonts') -> '/Applications/MPlayer OSX.app/Contents/ 
Resources/External_Binaries/mplayer.app/Contents/Resources/fonts'
Using Darwin accurate timing
Terminal type `unknown' is not defined.
get_path('input.conf') -> '/Users/alex/.mplayer/input.conf'
Parsing input config file /Users/alex/.mplayer/input.conf
Input config file /Users/alex/.mplayer/input.conf parsed: 2 binds
get_path('newedition-coolitnow.24bit-lpcm.vob.conf') -> '/ 
Applications/MPlayer OSX.app/Contents/Resources/External_Binaries/ 
mplayer.app/Contents/Resources/newedition-coolitnow.24bit-lpcm.vob.conf'
Playing /Users/alex/Desktop/newedition-coolitnow.24bit-lpcm.vob.
get_path('sub/') -> '/Applications/MPlayer OSX.app/Contents/Resources/ 
External_Binaries/mplayer.app/Contents/Resources/sub/'
[file] File size is 36612096 bytes
STREAM: [file] /Users/alex/Desktop/newedition-coolitnow.24bit-lpcm.vob
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 /Users/alex/Desktop/newe
dition-coolitnow.24bit-lpcm.vob ext: .vob
Trying demuxer 2 based on filename extension
system stream synced at 0xD (13)!
==> Found video stream: 0
==> Found audio stream: 160
MPEG Stream reached EOF
ds_fill_buffer: EOF reached (stream: video)
Searching for sequence header... OK!
VIDEO:  MPEG2  720x480  (aspect 2)  29.970 fps  8000.0 kbps (1000.0  
kbyte/s)
[V] filefmt:2  fourcc:0x10000002  size:720x480  fps:29.97  ftime:=0.0334
get_path('sub/') -
 > '/Applications/MPlayer OSX.app/Contents/Resources/ 
External_Binaries/mplayer.app/Contents/Resources/sub/'
======================================================================== 
==
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 720 x 480 (preferred colorspace: Mpeg PES)
Trying filter chain: vo
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
SwScale params: -1 x -1 (-1=no scaling)
Trying filter chain: scale vo
VDecoder init failed :(
Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2- 
v0.4.0b
Selected video codec: [mpeg12] vfm: libmpeg2 (MPEG-1 or 2 (libmpeg2))
======================================================================== 
==
======================================================================== 
==
Opening audio decoder: [dvdpcm] Uncompressed DVD/VOB LPCM audio decoder
dec_audio: Allocating 2048 + 65536 = 67584 bytes for output buffer.
AUDIO: 48000 Hz, 2 ch, s24be, 2304.0 kbit/100.00% (ratio: 288000- 
 >288000)
Selected audio codec: [dvdpcm] afm: dvdpcm (Uncompressed DVD/VOB LPCM)
======================================================================== 
==
Building audio filter chain for 48000Hz/2ch/s24be -> 0Hz/0ch/??...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 48000Hz/2ch/s24be
[dummy] Was reinitialized: 48000Hz/2ch/s24be
AO: [macosx] source:  48000.0Hz 24bit [lpcm] int BE S packed
AO: [macosx] using    71 chunks of 4096 bytes (buffer len 294912 bytes)
AO: [macosx] 48000Hz 2ch s24be (3 bytes per sample)
AO: Description: Darwin/Mac OS X native audio output
AO: Author: Timothy J. Wood & Dan Christiansen & Chris Roccati
Building audio filter chain for 48000Hz/2ch/s24be -> 48000Hz/2ch/ 
s24be...
[dummy] Was reinitialized: 48000Hz/2ch/s24be
[dummy] Was reinitialized: 48000Hz/2ch/s24be
Starting playback...
VDec: vo config request - 720 x 480 (preferred colorspace: Planar YV12)
Trying filter chain: vo
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
SwScale params: -1 x -1 (-1=no scaling)
Trying filter chain: scale vo
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
VO Config (720x480->720x540,flags=0,'MPlayer',0x32315659)
REQ: flags=0x37  req=0x0
VO: [macosx] 720x480 => 720x540 Packed YUY2
VO: Description: Mac OSX Core Video
VO: Author: Nicolas Plourde <nicolas.plourde at gmail.com>
*** [scale] Allocating mp_image_t, 720x480x12bpp YUV planar, 518400  
bytes
[Mixer] No hardware mixing, inserting volume filter.
[libaf] Adding filter volume
[libaf] Adding filter format
[format] Changing sample format from big-endian 24-bit signed int to  
little-endian 16-bit signed int
[dummy] Was reinitialized: 48000Hz/2ch/s16le
[libaf] Reallocating memory in module format, old len = 0, new len =  
43692
*** [scale] Allocating mp_image_t, 720x480x12bpp YUV planar, 518400  
bytes
*** [vo] Allocating mp_image_t, 720x480x16bpp YUV packed, 691200 bytes
*** [scale] Allocating mp_image_t, 720x480x12bpp YUV planar, 518400  
bytes
Exiting... (Quit)


2006-11-18 01:57:43.755 MPlayer OSX[28311] =====================  
MPlayer OSX Started =====================
2006-11-18 01:57:53.040 MPlayer OSX[28311] Path to MPlayer: / 
Applications/MPlayer OSX.app/Contents/Resources/External_Binaries/ 
mplayer.app/Contents/MacOS/mplayer
2006-11-18 01:57:53.040 MPlayer OSX[28311] Arg: /Users/alex/Desktop/ 
newedition-coolitnow.24bit-lpcm.vob
2006-11-18 01:57:53.040 MPlayer OSX[28311] Arg: -monitoraspect
2006-11-18 01:57:53.040 MPlayer OSX[28311] Arg: 1.6000
2006-11-18 01:57:53.040 MPlayer OSX[28311] Arg: -vo
2006-11-18 01:57:53.040 MPlayer OSX[28311] Arg: macosx:shared_buffer
2006-11-18 01:57:53.040 MPlayer OSX[28311] Arg: -v
2006-11-18 01:57:53.040 MPlayer OSX[28311] Arg: -slave
2006-11-18 01:57:53.040 MPlayer OSX[28311] Arg: -identify
2006-11-18 01:57:53.163 MPlayer OSX[28311] *** Assertion failure in - 
[NSTextFieldCell _objectValue:forString:errorDescription:],  
AppKit.subproj/NSCell.m:1298
2006-11-18 01:57:53.164 MPlayer OSX[28311] Exception raised during  
posting of notification.  Ignored.  exception: Invalid parameter not  
satisfying: aString != nil
The selected video_out device is incompatible with this codec.
Try adding the scale filter, e.g. -vf spp,scale instead of -vf spp.
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 1
SwScaler: reducing / aligning filtersize 5 -> 4
SwScaler: BICUBIC scaler, from yuv420p to yuyv422 using MMX2
SwScaler: using 4-tap MMX scaler for horizontal luminance scaling
SwScaler: using 4-tap MMX scaler for horizontal chrominance scaling
SwScaler: using n-tap MMX scaler for vertical scaling (BGR)
SwScaler: 720x480 -> 720x480

*****
Test 2 - output from mplayer run from command line (also using -v flag)

MPlayer dev-SVN-r20996-4.0.1 (C) 2000-2006 MPlayer Team
CPU: Genuine Intel(R) CPU           T2500  @ 2.00GHz (Family: 6,  
Model: 14, Stepping: 8)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
get_path('codecs.conf') -> '/Users/alex/.mplayer/codecs.conf'
Reading /Users/alex/.mplayer/codecs.conf: Can't open '/Users/ 
alex/.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: '/Users/alex/Desktop/newedition-coolitnow.24bit- 
lpcm.vob' '-v'
init_freetype
get_path('font/font.desc') -> '/Users/alex/.mplayer/font/font.desc'
font: can't open file: /Users/alex/.mplayer/font/font.desc
Bitmap font /usr/local/share/mplayer/font/font.desc loaded  
successfully! (206 chars)
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
get_path('fonts') -> '/Users/alex/.mplayer/fonts'
Using Darwin accurate timing
get_path('input.conf') -> '/Users/alex/.mplayer/input.conf'
Parsing input config file /Users/alex/.mplayer/input.conf
Input config file /Users/alex/.mplayer/input.conf parsed: 2 binds
get_path('newedition-coolitnow.24bit-lpcm.vob.conf') -> '/Users/ 
alex/.mplayer/newedition-coolitnow.24bit-lpcm.vob.conf'

Playing /Users/alex/Desktop/newedition-coolitnow.24bit-lpcm.vob.
get_path('sub/') -> '/Users/alex/.mplayer/sub/'
[file] File size is 36612096 bytes
STREAM: [file] /Users/alex/Desktop/newedition-coolitnow.24bit-lpcm.vob
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 /Users/alex/Desktop/newedition- 
coolitnow.24bit-lpcm.vob ext: .vob
Trying demuxer 2 based on filename extension
system stream synced at 0xD (13)!
==> Found video stream: 0
==> Found audio stream: 160
MPEG Stream reached EOF
ds_fill_buffer: EOF reached (stream: video)
MPEG-PS file format detected.
Searching for sequence header... OK!
VIDEO:  MPEG2  720x480  (aspect 2)  29.970 fps  8000.0 kbps (1000.0  
kbyte/s)
[V] filefmt:2  fourcc:0x10000002  size:720x480  fps:29.97  ftime:=0.0334
get_path('sub/') -> '/Users/alex/.mplayer/sub/'
======================================================================== 
==
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 720 x 480 (preferred colorspace: Mpeg PES)
Trying filter chain: vo
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
SwScale params: -1 x -1 (-1=no scaling)
Trying filter chain: scale vo
The selected video_out device is incompatible with this codec.
Try adding the scale filter, e.g. -vf spp,scale instead of -vf spp.
VDecoder init failed :(
Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2- 
v0.4.0b
Selected video codec: [mpeg12] vfm: libmpeg2 (MPEG-1 or 2 (libmpeg2))
======================================================================== 
==
======================================================================== 
==
Opening audio decoder: [dvdpcm] Uncompressed DVD/VOB LPCM audio decoder
dec_audio: Allocating 2048 + 65536 = 67584 bytes for output buffer.
AUDIO: 48000 Hz, 2 ch, s24be, 2304.0 kbit/100.00% (ratio: 288000- 
 >288000)
Selected audio codec: [dvdpcm] afm: dvdpcm (Uncompressed DVD/VOB LPCM)
======================================================================== 
==
Building audio filter chain for 48000Hz/2ch/s24be -> 0Hz/0ch/??...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 48000Hz/2ch/s24be
[dummy] Was reinitialized: 48000Hz/2ch/s24be
AO: [macosx] source:  48000.0Hz 24bit [lpcm] int BE S packed
AO: [macosx] using    71 chunks of 4096 bytes (buffer len 294912 bytes)
AO: [macosx] 48000Hz 2ch s24be (3 bytes per sample)
AO: Description: Darwin/Mac OS X native audio output
AO: Author: Timothy J. Wood & Dan Christiansen & Chris Roccati
Building audio filter chain for 48000Hz/2ch/s24be -> 48000Hz/2ch/ 
s24be...
[dummy] Was reinitialized: 48000Hz/2ch/s24be
[dummy] Was reinitialized: 48000Hz/2ch/s24be
Starting playback...
VDec: vo config request - 720 x 480 (preferred colorspace: Planar YV12)
Trying filter chain: vo
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
SwScale params: -1 x -1 (-1=no scaling)
Trying filter chain: scale vo
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
VO Config (720x480->720x540,flags=0,'MPlayer',0x32315659)
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 4
SwScaler: reducing / aligning filtersize 1 -> 1
SwScaler: reducing / aligning filtersize 5 -> 4
SwScaler: BICUBIC scaler, from yuv420p to yuyv422 using MMX2
SwScaler: using 4-tap MMX scaler for horizontal luminance scaling
SwScaler: using 4-tap MMX scaler for horizontal chrominance scaling
SwScaler: using n-tap MMX scaler for vertical scaling (BGR)
SwScaler: 720x480 -> 720x480
REQ: flags=0x37  req=0x0
VO: [macosx] 720x480 => 720x540 Packed YUY2
VO: Description: Mac OSX Core Video
VO: Author: Nicolas Plourde <nicolas.plourde at gmail.com>
*** [scale] Allocating mp_image_t, 720x480x12bpp YUV planar, 518400  
bytes
*** [scale] Allocating mp_image_t, 720x480x12bpp YUV planar, 518400  
bytes
*** [vo] Allocating mp_image_t, 720x480x16bpp YUV packed, 691200 bytes
*** [scale] Allocating mp_image_t, 720x480x12bpp YUV planar, 518400  
bytes
[Mixer] No hardware mixing, inserting volume filter. 19%  1.3% 1 0
[libaf] Adding filter volume
[libaf] Adding filter format
[format] Changing sample format from big-endian 24-bit signed int to  
little-endian 16-bit signed int
[dummy] Was reinitialized: 48000Hz/2ch/s16le
[libaf] Reallocating memory in module format, old len = 0, new len =  
10032
[libaf] Reallocating memory in module format, old len = 10032, new  
len = 13374
[libaf] Reallocating memory in module format, old len = 13374, new  
len = 13398
Uninit audio filters... 5.842 ct:  1.434 571/571 12% 14%  1.5% 1 0
[libaf] Removing filter format
[libaf] Removing filter volume
[libaf] Removing filter dummy
Uninit audio: dvdpcm
Uninit video: libmpeg2

Exiting... (Quit)



More information about the MPlayer-advusers mailing list