[MEncoder-users] Yet another A-V desync
Nicolas George
nicolas.george at normalesup.org
Mon Aug 11 15:53:21 CEST 2008
Hi.
I am trying to hardcode subtitles to play something on a home DVD+DivX
player. The source video seems mostly perfect: it is an AVI file, apparently
produced by dev-CVS-050814-13:46-3.3, with an audio frame every 24 ms and a
video frame every 40 ms, except for three missing video frames. It play fine
with current mplayer.
My command line is:
nice mencoder \
-ovc xvid -xvidencopts vhq=4:autoaspect:fixed_quant=2 \
-oac mp3lame -lameopts q=5:aq=2 \
-vf scale=480:256,dsize=480:256,expand=512:256:14:0 \
-subcp utf-8 -sub $1-fr.ass -fontconfig -font 'DejaVu Serif' \
-subfont-text-scale 3.6 \
$1.avi -o out/$1.avi
Nothing fancy. But the result has an incresing A-V desync, about half a
second after one hour. I do not know what may cause it. There is nothing
strange in mencoder output, three duplicate frames in the middle (not enough
to account for the desync) and a few more near the end (the desync is
visible before them). Full mencoder output is at the end.
ffmpeg produces a desync too. -mc 0 and/or -noskip do not help.
Any advice?
Regards,
--
Nicolas George
MEncoder dev-SVN-r27365-4.3.1 (C) 2000-2008 MPlayer Team
CPU: AMD Turion(tm) 64 Mobile Technology ML-37 (Family: 15, Model: 36, Stepping: 2)
CPUflags: Type: 15 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE SSE2
success: format: 0 data: 0x0 - 0x1e9bf738
AVI file format detected.
[aviheader] Video stream found, -vid 0
[aviheader] Audio stream found, -aid 1
VIDEO: [XVID] 576x304 12bpp 25.000 fps 1037.1 kbps (126.6 kbyte/s)
[V] filefmt:3 fourcc:0x44495658 size:576x304 fps:25.000 ftime:=0.0400
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, s16le, 128.0 kbit/8.33% (ratio: 16000->192000)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
SUB: Detected subtitle file format: ssa
SUB: Read 851 subtitles.
xvid: using library version 1.1.3 (build xvid-1.1.3)
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [expand w=512 h=256 x=14 y=0]
Expand: 512 x 256, 14 ; 0, osd: 0, aspect: 0.000000, round: 1
Opening video filter: [dsize=480:256]
Opening video filter: [scale w=480 h=256]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
MP3 audio selected.
VDec: vo config request - 576 x 304 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.82:1 - prescaling to correct movie aspect.
SwScaler: reducing / aligning filtersize 6 -> 8
SwScaler: reducing / aligning filtersize 6 -> 8
SwScaler: reducing / aligning filtersize 6 -> 5
SwScaler: reducing / aligning filtersize 6 -> 5
[swscaler @ 0xb10be0]BICUBIC scaler, from yuv420p to yuv420p using MMX2
[swscaler @ 0xb10be0]using 8-tap MMX scaler for horizontal luminance scaling
[swscaler @ 0xb10be0]using 8-tap MMX scaler for horizontal chrominance scaling
[swscaler @ 0xb10be0]using n-tap MMX scaler for vertical scaling (YV12 like)
[swscaler @ 0xb10be0]576x304 -> 480x256
videocodec: XviD (512x256 fourcc=44495658 [XVID])
xvid: par=1/1 (ext), displayed=512x256, sampled=512x256
xvid: Fixed Quant Rate Control -- quantizer=2/1=2.00
Writing header...
ODML: vprp aspect is 16384:8192.
Setting audio delay to 0.048s.
Writing header...
ODML: vprp aspect is 16384:8192.
Setting audio delay to 0.048s.
Pos: 0.0s 3f ( 0%) 1.27fps Trem: 0min 0mb A-V:0.008 [0:0]
1 duplicate frame(s)!
Pos: 1.1s 29f ( 0%) 1.81fps Trem: 0min 0mb A-V:0.081 [1598:124]
Skipping frame!
Pos:2757.9s 68953f (78%) 26.68fps Trem: 11min 411mb A-V:0.008 [876:101]
1 duplicate frame(s)!
Pos:3417.0s 85431f (98%) 26.29fps Trem: 1min 405mb A-V:0.008 [870:101]
1 duplicate frame(s)!
Pos:3417.1s 85432f (98%) 26.29fps Trem: 1min 405mb A-V:0.008 [870:101]
1 duplicate frame(s)!
Pos:3417.1s 85433f (98%) 26.29fps Trem: 1min 405mb A-V:0.008 [870:101]
1 duplicate frame(s)!
Pos:3417.2s 85434f (98%) 26.30fps Trem: 1min 405mb A-V:0.008 [870:101]
1 duplicate frame(s)!
Pos:3484.2s 87110f (99%) 26.37fps Trem: 0min 405mb A-V:0.008 [869:101]
1 duplicate frame(s)!
Pos:3484.2s 87111f (99%) 26.37fps Trem: 0min 405mb A-V:0.008 [869:101]
1 duplicate frame(s)!
Pos:3484.3s 87112f (99%) 26.37fps Trem: 0min 405mb A-V:0.008 [869:101]
1 duplicate frame(s)!
Pos:3484.3s 87113f (99%) 26.37fps Trem: 0min 405mb A-V:0.008 [869:101]
1 duplicate frame(s)!
Pos:3487.3s 87187f (99%) 26.39fps Trem: 0min 405mb A-V:0.009 [868:101]
Flushing video frames.
Writing index...
Writing header...
ODML: vprp aspect is 16384:8192.
Setting audio delay to 0.048s.
Video stream: 868.728 kbit/s (108590 B/s) size: 378700078 bytes 3487.400 secs 87187 frames
Audio stream: 101.702 kbit/s (12712 B/s) size: 44339928 bytes 3487.824 secs
More information about the MEncoder-users
mailing list