[mythtv] [PATCH] -- picking wrong AC-3 audio stream to play

Blammo blammo.doh at gmail.com
Thu Feb 24 17:09:36 UTC 2005


> Hard to bump it up my own stack, since my own patch works for my
> own copy.  The only thing likely to bump it up the stack is users
> regularly reporting how they are getting no sound on some recordings.

And to that extent here's my 2cents:

NYPD-Blue recorded last night. Play it back in mythfrontend, no audio.
Hit +, the OSD shows "Audio Track 1" but never plays any sound.
Flipped between AC-3 passthru/not, no diff. All other present
recordings are fine. Here's what -v playback shows;

2005-02-24 10:01:41.790 AVFD
2005-02-24 10:01:41.790 AVFD: Opening Stream #0: codec id 2
2005-02-24 10:01:41.791 detectInterlace(Detect Scan, Detect Scan,
59.9401, 720) ->Progressive Scan
2005-02-24 10:01:41.791 Interlaced: Progressive Scan  video_height:
720  fps: 59.9401
2005-02-24 10:01:41.791 AVFD: Looking for decoder for 3
2005-02-24 10:01:41.791 Estimated bitrate = 45000
2005-02-24 10:01:41.965 Position map filled from DB to: 219465
2005-02-24 10:01:41.967 SyncPositionMap prerecorded, from DB: 14719 entries
2005-02-24 10:01:41.967 Position map found
2005-02-24 10:01:41.979 Over/underscan. V: 0, H: 0, XOff: 0, YOff: 0
Using XvMC version: 1.0
2005-02-24 10:01:41.984 XvMCSurfaceTypes::find(w 1280, h 1, c 0, i 2,
m 0,sw 0, sh 145, disp, p<= 145, 7200 <=p, port, surfNum)
2005-02-24 10:01:41.984 Trying XvMC port 145
2005-02-24 10:01:41.984 XvMCSurfaceTypes::find(w 1280, h 1, c 1, i 2,
m 0,sw 0, sh 145, disp, p<= 145, 7200 <=p, port, surfNum)
2005-02-24 10:01:41.984 Trying XvMC port 145
2005-02-24 10:01:41.984 Found a suitable XvMC surface 0
XvMC found and using IDCT surface
2005-02-24 10:01:41.984 Using XV port 145
2005-02-24 10:01:41.992 Image size. dispxoff 0, dispyoff: 0, dispwoff:
888, disphoff: 508
2005-02-24 10:01:41.992 Image size. imgx 0, imgy: 0, imgw: 1280, imgh: 720
2005-02-24 10:01:42.791 Realtime priority would require SUID as root.
2005-02-24 10:01:42.792 Changing from None to WatchingPreRecorded
2005-02-24 10:01:42.901 nVidiaVideoSync: VBlank ioctl did not work,
unimplemented in this driver?
2005-02-24 10:01:42.901 DRMVideoSync: Could not open device
/dev/dri/card0, No such file or directory
2005-02-24 10:01:42.902 OpenGLVideoSync: GLX extensions:
GLX_EXT_visual_info GLX_EXT_visual_rating GLX_SGIX_fbconfig
GLX_SGIX_pbuffer GLX_SGI_video_sync GLX_SGI_swap_control
GLX_ARB_multisample GLX_NV_float_buffer GLX_ARB_get_proc_address
2005-02-24 10:01:42.917 Using audio as timebase
2005-02-24 10:01:42.917 Video timing method: SGI OpenGL
2005-02-24 10:01:42.917 Refresh rate: 16663, frame interval: 16683
2005-02-24 10:01:42.934 waiting for prebuffer...
2005-02-24 10:01:44.267 streams_changed() -- stream count 2
2005-02-24 10:01:44.268 AVFD
2005-02-24 10:01:44.268 AVFD: Opening Stream #0: codec id 2
2005-02-24 10:01:44.269 AVFD: Looking for decoder for 3
2005-02-24 10:01:44.269 AVFD
2005-02-24 10:01:44.269 AVFD: Opening Stream #1: codec id 86020
2005-02-24 10:01:44.269 AVFD: Looking for decoder for 86020
'video_output' mean = '16822.35', std. dev. = '1928.95', fps = '59.44'
'video_output' mean = '17842.74', std. dev. = '10193.37', fps = '56.05'
'video_output' mean = '16652.82', std. dev. = '1084.88', fps = '60.05'
'video_output' mean = '16662.82', std. dev. = '1346.14', fps = '60.01'
'video_output' mean = '16672.91', std. dev. = '1248.78', fps = '59.98'
'video_output' mean = '16812.72', std. dev. = '1852.67', fps = '59.48'
'video_output' mean = '17002.92', std. dev. = '2499.20', fps = '58.81'
'video_output' mean = '16662.83', std. dev. = '1201.69', fps = '60.01'
'video_output' mean = '16813.10', std. dev. = '1711.62', fps = '59.48'
'video_output' mean = '16664.53', std. dev. = '1037.32', fps = '60.01'
'video_output' mean = '16840.50', std. dev. = '1743.49', fps = '59.38'
'video_output' mean = '16647.94', std. dev. = '709.90', fps = '60.07'
'video_output' mean = '16996.66', std. dev. = '2605.76', fps = '58.84'
'video_output' mean = '16827.80', std. dev. = '1753.12', fps = '59.43'
'video_output' mean = '16658.93', std. dev. = '189.74', fps = '60.03'
2005-02-24 10:02:08.893 rate: 59.9401 speed: 1 skip: 1 = interval 16683
2005-02-24 10:02:08.894 Set video sync frame interval to 16683
2005-02-24 10:02:11.110 Changing from WatchingPreRecorded to None
2005-02-24 10:02:11.137 Changing from None to None

mplayer has no problem playing the stream, or ID'ing, shown below.



[mythtv at frontend1 tv]$ mplayer -ao alsa -vo xv -fs -zoom
-monitoraspect 16:9 -ac hwac3, 2094_20050222210000_20050222220000.nuv
-v
MPlayer 1.0pre6-3.4.2 (C) 2000-2004 MPlayer Team
CPU: Advanced Micro Devices Athlon MP/XP/XP-M Barton (Family: 6, Stepping: 0)
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


CommandLine: '-ao' 'alsa' '-vo' 'xv' '-fs' '-zoom' '-monitoraspect'
'16:9' '-ac' 'hwac3,' '2094_20050222210000_20050222220000.nuv' '-v'
init_freetype
get_path('font/font.desc') -> '/home/mythtv/.mplayer/font/font.desc'
font: can't open file: /home/mythtv/.mplayer/font/font.desc
font: can't open file: /usr/local/share/mplayer/font/font.desc
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
Using Linux hardware RTC timing (1024Hz).
get_path('input.conf') -> '/home/mythtv/.mplayer/input.conf'
Can't open input config file /home/mythtv/.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
Setting up LIRC support...
get_path('2094_20050222210000_20050222220000.nuv.conf') ->
'/home/mythtv/.mplayer/2094_20050222210000_20050222220000.nuv.conf'
Playing 2094_20050222210000_20050222220000.nuv.
[file] File size is 4814622815 bytes
STREAM: [file] 2094_20050222210000_20050222220000.nuv
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 Nullsoft Streaming Video
Checking for NuppelVideo
Checking for REAL
Checking for SMJPEG
Searching demuxer type for filename
2094_20050222210000_20050222220000.nuv ext: .nuv
Checking for MOV
Checking for VIVO
header block 1 size: 0
Checking for PVA
Checking for MPEG-TS...
TRIED UP TO POSITION 68777, FOUND 47, packet_size= 0, SEEMS A TS? 0
Checking for LMLM4 Stream Format
Invalid packet in LMLM4 stream: ch=0 size=133858680
LMLM4 Stream Format not found
==> Found video stream: 0
MPEG Stream reached EOF
ds_fill_buffer: EOF reached (stream: video)  
MPEG-PES file format detected.
==> Found audio stream: 128
Searching for sequence header... OK!
VIDEO:  MPEG2  1280x720  (aspect 3)  59.940 fps  45000.0 kbps (5625.0 kbyte/s)
[V] filefmt:2  fourcc:0x10000002  size:1280x720  fps:59.94  ftime:=0.0167
get_path('sub/') -> '/home/mythtv/.mplayer/sub/'
get_path('default.sub') -> '/home/mythtv/.mplayer/default.sub'
==========================================================================
Forced audio codec: hwac3
Opening audio decoder: [hwac3] AC3/DTS pass-through SP/DIF
dec_audio: Allocating 8192 bytes for input buffer.
dec_audio: Allocating 16384 + 65536 = 81920 bytes for output buffer.
No accelerated IMDCT transform found
hwac3: switched to AC3, 384000 bps, 48000 Hz
AUDIO: 48000 Hz, 2 ch, 16 bit (0x400), ratio: 48000->192000 (384.0 kbit)
Selected audio codec: [hwac3] afm:hwac3 (AC3 through SPDIF)
==========================================================================
X11 opening display: :0
vo: X11 color mask:  FFFFFF  (R:FF0000 G:FF00 B:FF)
vo: X11 running at 888x508 with depth 24 and 32 bpp (":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
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 1280 x 720 (preferred csp: 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.
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))
==========================================================================
Checking audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/8bit...
[libaf] Adding filter dummy 
[dummy] Was reinitialized, rate=48000Hz, nch = 2, format = 0x00000020
and bps = 2
AF_pre: af format: 2 bps, 2 ch, 48000 hz, big endian AC3 
AF_pre: 48000Hz 2ch AC3
alsa-init: requested format: 48000 Hz, 2 channels, AC3
alsa-init: compiled for ALSA-1.0.8
alsa-init: setup for 1/2 channel(s)
alsa-spdif-init: playing AC3, 2 channels
alsa-init: pcm opend in block-mode
alsa-init: chunksize set to 1024
alsa-init: fragcount=16
alsa-init: got buffersize=65536
alsa: 48000 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit Little Endian
AO: [alsa] 48000Hz 2ch AC3 (1 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 48000Hz/2ch/16bit -> 48000Hz/2ch/8bit...
[dummy] Was reinitialized, rate=48000Hz, nch = 2, format = 0x00000020
and bps = 2
[libaf] Adding filter format 
[format] Sample format big endian AC3  not yet supported 
Couldn't find matching filter/ao format!
Starting playback...
alsa-space: free space = 65536, prepared --
a52: CRC check failed!  
a52: CRC check failed!  
VDec: vo config request - 1280 x 720 (preferred csp: Planar YV12)
Trying filter chain: vo
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO Config (1280x720->1280x720,flags=5,'MPlayer',0x32315659)
VO: [xv] 1280x720 => 1280x720 Planar YV12  [fs] [zoom]
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
aspect: Warning: no suitable new res found!
using Xvideo port 145 for hw scaling
aspect: Warning: no suitable new res found!
[xv-fs] dx: 0 dy: 0 dw: 888 dh: 508
[xv] dx: 0 dy: 0 dw: 888 dh: 508
*** [vo] Allocating mp_image_t, 1280x720x12bpp YUV planar, 1382400 bytes
[xv] dx: 0 dy: 0 dw: 888 dh: 508
aspect: Warning: no suitable new res found!
[xv-fs] dx: 0 dy: 0 dw: 888 dh: 508
*** [vo] Allocating (slices) mp_image_t, 1280x720x12bpp YUV planar,
1382400 bytes
get_path('subfont.ttf') -> '/home/mythtv/.mplayer/subfont.ttf'?% 0 0
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
*** [vo] Allocating mp_image_t, 1280x720x12bpp YUV planar, 1382400
bytes
uninit audio: hwac3 A-V:  0.569 ct:  0.220 133/133 33% 18%  0.6% 0 0
uninit video: libmpeg2
alsa-uninit: pcm closed
vo: uninit ...

Anything more I can provide in the way of debugs, let me know. (no I
have not tried the patch listed in this thread yet. Given the fact
only one audio track is seen by both myth and mplayer, I'm not sure it
would make any difference)


More information about the mythtv-dev mailing list