[MPlayer-dev-eng] a/v sync drift in avi files with mp3 VBR audio?

Frodo csharprules at hotmail.com
Fri Dec 13 08:55:16 CET 2002


Hi guys,

I hope someone can help me out here.
I'm busy porting mplayer 2 the xbox (yes its opensource!!)
anyway its working pretty good with all kind of files
the only thing is that I get an a/v sync drift when playing an avi (divx3)
file with mp3 VBR audio in it
the first 40 seconds or so it is not noticable, but you start 2 notice it
after it 1 minute
if you look in the debug log it doesn't show up:
### A:  75.158 (  75.526)  V:  75.534  A-V:-0.0080 quality:6

I already tried all known options like -bps / -nobps / -framedrop
/ -autosync
but none solve the problem.
if you want I can upload my file (16megs) to
ftp://ftp.mplayer.hq/mplayer/samples

just some facts I noticed:
- when playing the file with my cygwin-compiled mplayer same thing happens
- I had to write my own libvo & libao driver and based them on
libvo\directx.c & libao\ao_win32.c

Any suggestions what can cause this ?

Frodo

here's the log:
CPU vendor name: GenuineIntel  max cpuid level: 2
CPU: Intel Celeron 2/Pentium III Coppermine,Geyserville (Family: 6,
Stepping: 3)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 0 SSE2: 0
Compiled with RUNTIME CPU Detection - warning, it's not optimal! To get best
performance, recompile MPlayer with --disable-runtime-cpudetection
Reading d:\mediaplayer\root\codecs.conf:
44 audio & 109 video codecs
Font font.desc loaded successfully! (206 chars)
opened font.desc
filename=d:\movies\movies\spidermancut.avi
open filename=d:\movies\movies\spidermancut.avi
Not an URL!
File size is 37404672 bytes
Detected AVI file format!
LIST hdrl  len=8830
list_end=0x2292
CHUNK avih  len=56
list_end=0x2292  pos=0x58  chunksize=0x0  next=0x58
LIST strl  len=4244
list_end=0x10F4
CHUNK strh  len=56
==> Found video stream: 0
list_end=0x10F4  pos=0xA4  chunksize=0x0  next=0xA4
CHUNK strf  len=40
found 'bih', 40 bytes of 40
Regenerating keyframe table for DIVX 3 video
list_end=0x10F4  pos=0xD4  chunksize=0x0  next=0xD4
CHUNK JUNK  len=4120
list_end=0x10F4  pos=0xDC  chunksize=0x1018  next=0x10F4
LIST strl  len=4234
list_end=0x2186
CHUNK strh  len=56
==> Found audio stream: 1
list_end=0x2186  pos=0x1140  chunksize=0x0  next=0x1140
CHUNK strf  len=30
found 'wf', 30 bytes of 18
list_end=0x2186  pos=0x1166  chunksize=0x0  next=0x1166
CHUNK JUNK  len=4120
list_end=0x2186  pos=0x116E  chunksize=0x1018  next=0x2186
LIST odml  len=260
list_end=0x2292
CHUNK dmlh  len=248
list_end=0x2292  pos=0x219A  chunksize=0xF8  next=0x2292
CHUNK JUNK  len=1382
list_end=0x2292  pos=0x229A  chunksize=0x566  next=0x2800
Broken chunk?  chunksize=1382  (id=JUNK)
CHUNK JUNK  len=1382
list_end=0x0  pos=0x229A  chunksize=0x566  next=0x2800
LIST movi  len=37281518
list_end=0x23906F6
Found movie at 0x280C - 0x23906F6
CHUNK idx1  len=112000
Reading INDEX block, 7000 chunks for 4085 frames (fpos=023906FE)
list_end=0x0  pos=0x23ABC7E  chunksize=0x0  next=0x23ABC7E
CHUNK JUNK  len=890
list_end=0x0  pos=0x23ABC86  chunksize=0x37A  next=0x23AC000
avi header read
AVI index offset: 0x2808 (movi=0x280C idx0=0x4 idx1=0x240C)
Auto-selected AVI audio ID = 1
Auto-selected AVI video ID = 0
AVI: Searching for audio stream (id:1)
AVI video length=37222600
VIDEO:  [DIV3]  640x352  24bpp  23.98 fps  1747.8 kbps (213.3 kbyte/s)
filed opened
open codecs
[V] filefmt:3  fourcc:0x33564944  size:640x352  fps:23.98  ftime:=0.0417
open subtitles prot: host: file:d:\movies\movies\spidermancut.srt
Can't load subtitles: d:\movies\movies\spidermancut.srt
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
dec_audio: Allocating 131072 + 65536 = 196608 bytes for output buffer
FFmpeg's libavcodec audio codec
INFO: libavcodec init audio
AUDIO: 48000 Hz, 2 ch, 16 bit (0x10), ratio: 20000->192000 (160.0 kbit)
Selected audio codec: [ffmp3] afm:ffmpeg (FFmpeg layer-3 audio decoder -
integer only)
<vo_directx><INFO>preinit succesfully finished
Opening video filter: [expand=-1:-1:-1:-1:1]
Expand: -1 x -1, -1 ; -1  (-1=autodetect) osd: 1
Opening video filter: [pp]
[expand] query(Planar YV12) -> 3
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
INFO: libavcodec init video OK
Selected video codec: [ffdivx] vfm:ffmpeg (FFmpeg DivX ;-) (MS MPEG-4 v3))
==========================================================================
[PP] Using external postprocessing filter, max q = 6
AutoQ: setting quality to 6
ao_xbox: Samplerate:48000Hz Channels:2 Format:Signed 16-bit (Little-Endian)
ao_xbox: Buffersize:4096
ao_xbox:48000Hz 2ch Signed 16-bit (Little-Endian)
AO: Description: XBox DirectSound audio output
AO: Author: Frodo
Start playing...

codecs opened

ID_VIDEO_FORMAT=DIV3
ID_VIDEO_BITRATE=1747752
ID_VIDEO_WIDTH=640
ID_VIDEO_HEIGHT=352
ID_VIDEO_FPS=23.976
ID_VIDEO_ASPECT=0.00
ID_AUDIO_CODEC=ffmp3
ID_AUDIO_FORMAT=85
ID_AUDIO_BITRATE=160000
ID_AUDIO_RATE=48000
ID_AUDIO_NCH=2
Process() start
VDec: vo config request - 640 x 352 (preferred csp: Planar YV12)
[PP] Using external postprocessing filter, max q = 6
vo_debug: query(Planar YV12) returned 0xC37 (i=0)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO Config (640x352->640x352,flags=0,'MPlayer',0x32315659)
REQ: flags=0x437  req=0x0
REQ: flags=0x437  req=0x0
VO: [DirectX] 640x352 => 640x352 Planar YV12
VO: Description: XBOX YUV/RGB/BGR renderer
VO: Author: Frodo
<vo_directx><INFO>config 640x352
*** [pp] Allocating mp_image_t, 640x352x12bpp YUV planar, 337920 bytes
(imgfmt: 32315659, planes: 1ee7508,1f2c108,1f1e508 strides: 640,320,320,
chroma: 320x176, shift: h:1,v:1)
*** [vo] Allocating mp_image_t, 640x352x12bpp YUV planar, 337920 bytes
(imgfmt: 32315659, planes: 1f3a4a0,1f7f0a0,1f714a0 strides: 640,320,320,
chroma: 320x176, shift: h:1,v:1)
*** [expand] Direct Rendering mp_image_t, 640x352x12bpp YUV planar, 337920
bytes
(imgfmt: 32315659, planes: 1f3a4a0,1f7f0a0,1f714a0 strides: 640,320,320,
chroma: 320x176, shift: h:1,v:1)
OSD chg: 3  V: no  pb:-1
OSD chg: 2  V: no  pb:-1
### A:   0.355 (  -0.010)  V:   0.000  A-V:-0.0101 quality:6
*** [pp] Allocating mp_image_t, 640x352x12bpp YUV planar, 337920 bytes
(imgfmt: 32315659, planes: 1f8d438,1fd2038,1fc4438 strides: 640,320,320,
chroma: 320x176, shift: h:1,v:1)
XXX initial  v_pts=0.042  a_pos=9216 (0.466)
### A:   1.437 (   1.794)  V:   1.793  A-V: 0.0004 quality:6
### A:   2.446 (   2.787)  V:   2.794  A-V:-0.0071 quality:6
### A:   3.461 (   3.833)  V:   3.837  A-V:-0.0045 quality:6
### A:   4.480 (   4.816)  V:   4.838  A-V:-0.0219 quality:6
### A:   5.510 (   5.838)  V:   5.839  A-V:-0.0010 quality:6
### A:   6.525 (   6.854)  V:   6.840  A-V: 0.0138 quality:6
### A:   7.529 (   7.894)  V:   7.883  A-V: 0.0109 quality:6
### A:   8.611 (   8.967)  V:   8.967  A-V:-0.0004 quality:6
### A:   9.620 (   9.964)  V:   9.968  A-V:-0.0038 quality:6
### A:  10.635 (  11.016)  V:  11.011  A-V: 0.0046 quality:6
### A:  11.646 (  12.007)  V:  12.012  A-V:-0.0050 quality:6
### A:  12.650 (  13.010)  V:  13.013  A-V:-0.0027 quality:6
### A:  13.606 (  13.946)  V:  13.972  A-V:-0.0266 quality:6
### A:  14.602 (  14.963)  V:  14.973  A-V:-0.0108 quality:6
### A:  15.570 (  15.917)  V:  15.933  A-V:-0.0159 quality:6
### A:  16.526 (  16.864)  V:  16.892  A-V:-0.0278 quality:6
### A:  17.522 (  17.883)  V:  17.893  A-V:-0.0103 quality:6
### A:  18.508 (  18.895)  V:  18.894  A-V: 0.0008 quality:6
### A:  19.485 (  19.846)  V:  19.853  A-V:-0.0070 quality:6
### A:  20.451 (  20.794)  V:  20.812  A-V:-0.0190 quality:6
### A:  21.452 (  21.819)  V:  21.813  A-V: 0.0055 quality:6
### A:  22.456 (  22.792)  V:  22.773  A-V: 0.0193 quality:6
### A:  23.476 (  23.840)  V:  23.815  A-V: 0.0245 quality:6
### A:  24.417 (  24.745)  V:  24.775  A-V:-0.0300 quality:6
### A:  25.427 (  25.805)  V:  25.817  A-V:-0.0124 quality:6
### A:  26.423 (  26.782)  V:  26.777  A-V: 0.0051 quality:6
### A:  27.458 (  27.816)  V:  27.778  A-V: 0.0382 quality:6
### A:  28.388 (  28.746)  V:  28.779  A-V:-0.0333 quality:6
### A:  29.468 (  29.797)  V:  29.780  A-V: 0.0177 quality:6
### A:  30.447 (  30.810)  V:  30.822  A-V:-0.0124 quality:6
### A:  31.456 (  31.812)  V:  31.823  A-V:-0.0115 quality:6
### A:  32.439 (  32.768)  V:  32.783  A-V:-0.0148 quality:6
### A:  33.430 (  33.786)  V:  33.784  A-V: 0.0018 quality:6
### A:  34.394 (  34.768)  V:  34.785  A-V:-0.0168 quality:6
### A:  35.423 (  35.780)  V:  35.786  A-V:-0.0057 quality:6
### A:  36.453 (  36.767)  V:  36.787  A-V:-0.0194 quality:6
### A:  37.444 (  37.779)  V:  37.788  A-V:-0.0084 quality:6
### A:  38.464 (  38.801)  V:  38.789  A-V: 0.0124 quality:6
### A:  39.483 (  39.841)  V:  39.831  A-V: 0.0092 quality:6
### A:  40.511 (  40.840)  V:  40.833  A-V: 0.0076 quality:6
### A:  41.507 (  41.836)  V:  41.833  A-V: 0.0021 quality:6
### A:  42.552 (  42.898)  V:  42.876  A-V: 0.0219 quality:6
### A:  43.561 (  43.892)  V:  43.877  A-V: 0.0152 quality:6
### A:  44.605 (  44.954)  V:  44.920  A-V: 0.0343 quality:6
### A:  45.624 (  45.986)  V:  45.963  A-V: 0.0232 quality:6
### A:  46.607 (  46.954)  V:  46.964  A-V:-0.0101 quality:6
### A:  47.663 (  48.020)  V:  48.006  A-V: 0.0139 quality:6
### A:  48.646 (  49.032)  V:  49.049  A-V:-0.0174 quality:6
### A:  49.711 (  50.079)  V:  50.050  A-V: 0.0285 quality:6
### A:  50.739 (  51.064)  V:  51.051  A-V: 0.0126 quality:6
### A:  51.737 (  52.087)  V:  52.094  A-V:-0.0070 quality:6
### A:  52.807 (  53.166)  V:  53.136  A-V: 0.0294 quality:6
### A:  53.831 (  54.169)  V:  54.137  A-V: 0.0319 quality:6
### A:  54.860 (  55.202)  V:  55.180  A-V: 0.0223 quality:6
### A:  55.889 (  56.238)  V:  56.223  A-V: 0.0147 quality:6
### A:  56.917 (  57.287)  V:  57.266  A-V: 0.0211 quality:6
### A:  57.952 (  58.291)  V:  58.267  A-V: 0.0248 quality:6
### A:  58.985 (  59.340)  V:  59.309  A-V: 0.0308 quality:6
### A:  60.013 (  60.353)  V:  60.352  A-V: 0.0015 quality:6
### A:  61.004 (  61.366)  V:  61.353  A-V: 0.0131 quality:6
### A:  61.997 (  62.341)  V:  62.354  A-V:-0.0129 quality:6
### A:  63.058 (  63.422)  V:  63.397  A-V: 0.0254 quality:6
### A:  64.027 (  64.335)  V:  64.356  A-V:-0.0206 quality:6
### A:  65.042 (  65.383)  V:  65.399  A-V:-0.0155 quality:6
### A:  66.056 (  66.439)  V:  66.441  A-V:-0.0022 quality:6
### A:  67.075 (  67.435)  V:  67.442  A-V:-0.0077 quality:6
### A:  68.090 (  68.442)  V:  68.443  A-V:-0.0017 quality:6
### A:  69.081 (  69.436)  V:  69.444  A-V:-0.0089 quality:6
### A:  70.087 (  70.453)  V:  70.445  A-V: 0.0079 quality:6
### A:  71.075 (  71.433)  V:  71.446  A-V:-0.0134 quality:6
### A:  72.086 (  72.459)  V:  72.447  A-V: 0.0117 quality:6
### A:  73.114 (  73.436)  V:  73.448  A-V:-0.0129 quality:6
### A:  74.134 (  74.489)  V:  74.491  A-V:-0.0022 quality:6
### A:  75.158 (  75.526)  V:  75.534  A-V:-0.0080 quality:6
### A:  76.167 (  76.522)  V:  76.535  A-V:-0.0129 quality:6
### A:  77.192 (  77.522)  V:  77.536  A-V:-0.0137 quality:6



More information about the MPlayer-dev-eng mailing list