[MPlayer-users] A/V sync problem : lag when converting from RV40 MKV with mencoder

Tom Estat tom.estat at gmail.com
Wed Jan 28 11:28:24 CET 2009


Hello everybody,

I'm trying to convert a series of RV40 .mkv cartoons to XVID's but the
resulting .avi file always has a very huge lag between audio and video.
"Very huge" means approx. 4 sec of lag after 40 sec of video

I'm using :

~> mencoder -oac mp3lame -ovc xvid -xvidencopts cartoon:bitrate=700 01.mkv
-o 01.avi

which outputs :

MEncoder SVN-r28379-4.1.2 (C) 2000-2009 MPlayer Team\nCPU: Intel(R)
Celeron(R) CPU          420  @ 1.60GHz (Family: 6, Model: 22, Stepping: 1)
success: format: 0  data: 0x0 - 0xa926deb
[mkv] Track ID 1: video (V_REAL/RV40), -vid 0
[mkv] Track ID 2: audio (A_VORBIS), -aid 0, -alang fre
[mkv] Track ID 3: audio (A_VORBIS), -aid 1, -alang eng
[mkv] Track ID 4: audio (A_VORBIS), -aid 2, -alang eng
[mkv] Track ID 5: subtitles (S_TEXT/UTF8), -sid 0, -slang fre
[mkv] Track ID 6: subtitles (S_TEXT/UTF8), -sid 1, -slang fre
[mkv] Track ID 7: subtitles (S_TEXT/UTF8), -sid 2, -slang fre
[mkv] Will play video track 1.
Matroska file format detected.
VIDEO:  [RV40]  640x480  24bpp  30.000 fps    0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:31  fourcc:0x30345652  size:640x480  fps:30.000  ftime:=0.0333
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, s16le, 0.0 kbit/0.00% (ratio: 0->192000)
Selected audio codec: [ffvorbis] afm: ffmpeg (FFmpeg Vorbis decoder)
==========================================================================
xvid: using library version 1.2.1 (build xvid-1.2.1)
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [realvid] RealVideo decoder
Win32 LoadLibrary failed to load: drvc.dll, /usr/lib/codecs/drvc.dll,
/usr/lib/win32/drvc.dll, /usr/local/lib/win32/drvc.dll
Error loading dll
ERROR: Could not open required DirectShow codec drvc.dll.
Read the RealVideo section of the DOCS!
VDecoder init failed :(
Opening video decoder: [realvid] RealVideo decoder
Selected video codec: [rv40] vfm: realvid (Linux RealPlayer 9 RV40 decoder)
==========================================================================
MP3 audio selected.
VDec: vo config request - 640 x 480 (preferred colorspace: Planar I420)
VDec: using Planar I420 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
videocodec: XviD (640x480 fourcc=44495658 [XVID])
xvid: par=0/0 (vga11), displayed=640x480, sampled=640x480
xvid: CBR Rate Control -- bitrate=700kbit/s
Writing header...
ODML: vprp aspect is 4:3.
Setting audio delay to 0.024s.
Writing header...
ODML: vprp aspect is 4:3.
Setting audio delay to 0.024s.
Pos:   0.2s      7f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.020 [0:0]
1 duplicate frame(s)!
Pos:   0.5s     17f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.020 [0:32]
1 duplicate frame(s)!
Pos:   0.9s     27f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.020 [0:31]
1 duplicate frame(s)!
Pos:   1.3s     37f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.020 [71:32]
1 duplicate frame(s)!
Pos:   1.7s     48f ( 0%) 42.90fps Trem:   0min   0mb  A-V:0.023 [60:49]
1 duplicate frame(s)!
Pos:   2.0s     58f ( 0%) 26.94fps Trem:   0min   0mb  A-V:0.023 [146:84]]
1 duplicate frame(s)!
(...)
(i didn't let the conversion occur till the end because it's very slow on my
system and i can see the lag long before the end of the conversion)

I also tried to convert to msmpeg4 with lavc :

~> mencoder -oac mp3lame -ovc lavc -lavcopts vcodec=msmpeg4:vbitrate=800 -o
01.avi 01.mkv

which gives  the following output :

MEncoder SVN-r28379-4.1.2 (C) 2000-2009 MPlayer Team\nCPU: Intel(R)
Celeron(R) CPU          420  @ 1.60GHz (Family: 6, Model: 22, Stepping: 1)
success: format: 0  data: 0x0 - 0xa926deb
[mkv] Track ID 1: video (V_REAL/RV40), -vid 0
[mkv] Track ID 2: audio (A_VORBIS), -aid 0, -alang fre
[mkv] Track ID 3: audio (A_VORBIS), -aid 1, -alang eng
[mkv] Track ID 4: audio (A_VORBIS), -aid 2, -alang eng
[mkv] Track ID 5: subtitles (S_TEXT/UTF8), -sid 0, -slang fre
[mkv] Track ID 6: subtitles (S_TEXT/UTF8), -sid 1, -slang fre
[mkv] Track ID 7: subtitles (S_TEXT/UTF8), -sid 2, -slang fre
[mkv] Will play video track 1.
Matroska file format detected.
VIDEO:  [RV40]  640x480  24bpp  30.000 fps    0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:31  fourcc:0x30345652  size:640x480  fps:30.000  ftime:=0.0333
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 48000 Hz, 2 ch, s16le, 0.0 kbit/0.00% (ratio: 0->192000)
Selected audio codec: [ffvorbis] afm: ffmpeg (FFmpeg Vorbis decoder)
==========================================================================
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [realvid] RealVideo decoder
Win32 LoadLibrary failed to load: drvc.dll, /usr/lib/codecs/drvc.dll,
/usr/lib/win32/drvc.dll, /usr/local/lib/win32/drvc.dll
Error loading dll
ERROR: Could not open required DirectShow codec drvc.dll.
Read the RealVideo section of the DOCS!
VDecoder init failed :(
Opening video decoder: [realvid] RealVideo decoder
Selected video codec: [rv40] vfm: realvid (Linux RealPlayer 9 RV40 decoder)
==========================================================================
MP3 audio selected.
VDec: vo config request - 640 x 480 (preferred colorspace: Planar I420)
VDec: using Planar I420 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
videocodec: libavcodec (640x480 fourcc=33766964 [div3])
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing
vprp header.
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing
vprp header.
Pos:   0.2s      7f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.020 [0:0]
1 duplicate frame(s)!
Pos:   0.6s     17f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.020 [0:32]
1 duplicate frame(s)!
Pos:   1.0s     27f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.020 [0:32]
1 duplicate frame(s)!
Pos:   1.3s     37f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.020 [76:32]
1 duplicate frame(s)!
Pos:   1.7s     48f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.023 [82:56]
1 duplicate frame(s)!
Pos:   2.1s     58f ( 0%)  0.00fps Trem:   0min   0mb  A-V:0.023 [237:88]
1 duplicate frame(s)!
[msmpeg4 @ 0x8c52080]warning, clipping 1 dct coefficients to -127..12797]
[msmpeg4 @ 0x8c52080]warning, clipping 1 dct coefficients to -127..127
[msmpeg4 @ 0x8c52080]warning, clipping 1 dct coefficients to -127..127103]
[msmpeg4 @ 0x8c52080]warning, clipping 1 dct coefficients to -127..127
[msmpeg4 @ 0x8c52080]warning, clipping 1 dct coefficients to -127..127
[msmpeg4 @ 0x8c52080]warning, clipping 1 dct coefficients to -127..127
[msmpeg4 @ 0x8c52080]warning, clipping 1 dct coefficients to -127..127109]
[msmpeg4 @ 0x8c52080]warning, clipping 1 dct coefficients to -127..127
[msmpeg4 @ 0x8c52080]warning, clipping 1 dct coefficients to -127..127
[msmpeg4 @ 0x8c52080]warning, clipping 1 dct coefficients to -127..127
[msmpeg4 @ 0x8c52080]warning, clipping 1 dct coefficients to -127..127
[msmpeg4 @ 0x8c52080]warning, clipping 1 dct coefficients to -127..127
[msmpeg4 @ 0x8c52080]warning, clipping 1 dct coefficients to -127..127
[msmpeg4 @ 0x8c52080]warning, clipping 1 dct coefficients to -127..127
[msmpeg4 @ 0x8c52080]warning, clipping 1 dct coefficients to -127..127
[msmpeg4 @ 0x8c52080]warning, clipping 1 dct coefficients to -127..127
[msmpeg4 @ 0x8c52080]warning, clipping 1 dct coefficients to -127..127
[msmpeg4 @ 0x8c52080]warning, clipping 1 dct coefficients to -127..127
[msmpeg4 @ 0x8c52080]warning, clipping 1 dct coefficients to -127..127
[msmpeg4 @ 0x8c52080]warning, clipping 1 dct coefficients to -127..127
[msmpeg4 @ 0x8c52080]warning, clipping 1 dct coefficients to -127..127
[msmpeg4 @ 0x8c52080]warning, clipping 1 dct coefficients to -127..127
[msmpeg4 @ 0x8c52080]warning, clipping 1 dct coefficients to -127..127
[msmpeg4 @ 0x8c52080]warning, clipping 1 dct coefficients to -127..127
(...)
Pos: 595.0s  16228f (49%) 35.24fps Trem:   7min 137mb  A-V:0.023 [730:224]
1 duplicate frame(s)!
Pos: 595.4s  16238f (49%) 35.25fps Trem:   7min 137mb  A-V:0.023 [730:224]
1 duplicate frame(s)!
Pos: 595.7s  16248f (49%) 35.25fps Trem:   7min 137mb  A-V:0.023 [730:224]
1 duplicate frame(s)!
Pos: 595.9s  16251f (49%) 35.26fps Trem:   7min 137mb  A-V:0.033 [730:224]
Too many audio packets in the buffer: (4100 in 748904 bytes).
Maybe you are playing a non-interleaved stream/file or the codec failed?
For AVI files, try to force non-interleaved mode with the -ni option.

Flushing video frames.
Writing index...
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing
vprp header.

Video stream:  730.301 kbit/s  (91287 B/s)  size: 54395267 bytes  595.867
secs  16251 frames

Audio stream:  224.878 kbit/s  (28109 B/s)  size: 16764000 bytes  596.376
secs

(I let this one run till the end to get the final output because converting
to msmpeg4 with lavc is much faster than converting to xvid and as you can
see something went wrong at about the half of the file)

Could anybody explain to me what i'm doing wrong ?

Thanks !
-- 
"the beginner scorns criticism,
The wise soul carefully weighs it
and the master says "yes, of course!"
"instant karma"



More information about the MPlayer-users mailing list