[MEncoder-users] wmv -> mpeg A-V Sync Loss/Jump

Giacomo Comes comes at naic.edu
Sun Aug 27 21:54:52 CEST 2006


On Sun, Aug 27, 2006 at 05:12:42PM +0000, H.Edeler wrote:
> When converting some wmv to mpeg (for DVD) I run into A-V Sync problems. 
> 
> There is a little fault in the wmv. The wmv is playing with mplayer without sync
> problems. At appr. 40sec there is something lost - a gap in the vid (maybe some
> 0,5sec) (not really a gap, it plays continousily, but you feel, there is
> something lost). From there on it still plays in A-V sync to the end.
> 
> The mpeg is in A-V sync first. From the very moment, the wmv has its fault, the
> mpeg is out of sync. The video may be 0,5sec leading to the audio from there on.
> 
> Mencoder reports at 42,5sec a duplicate frame, which is shortly after the fault
> in the wmv.
> 
> I played with -noskip, -mc=0, harddup without success.
> 
> How can I manage to get the mpeg in sync? 

To my experience, when dealing with wmv files, you should add -mc 0.

> 
> I don't understand why audiostream is reported to be longer than videostream.
> 
> What is the function of the audio-preload option? 
> I wonder if vid and audio in the wmv might be more than 0.4sec in distance due
> to the fault. So I thougt about increasing the audio-preload buffer size to e.g.
> 1.5. Strange thing MEncoder reports 0.4s independing on any change.
> 
> NB See log herewith. This is only one example of A-V sync loss. I run into this
> thing very often when converting wmv's to mpg. So I should be lucky if you can
> give any suggestions. 
> 
> Hagen
> 
> *****************************************************************************
> 
> 
> E:\WMV test>mencoder.exe test.wmv -ovc lavc -ofps 25.000 -of mpeg -mpegopts form
> at=dvd -vf scale=720:576,harddup -lavcopts vcodec=mpeg2video:vrc_buf_size=1835:v
> rc_maxrate=3000:vbitrate=2000:keyint=15:acodec=ac3:abitrate=96:aspect=4/3 -oac l
> avc -srate 48000 -af lavcresample=48000 -af resample=48000:1:0 -o test.mpg

In this command line the use of -af is wrong. If you give multiple -af, only the 
last one is used. So, remove one -af and add -mc 0 and it should be fine.

Giacomo

> MEncoder dev-CVS--3.4.5 (C) 2000-2006 MPlayer Team
> CPU: Advanced Micro Devices Duron/Athlon 4/MP/XP Palomino (Family: 6, Stepping:
> 2)
> CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 0 SSE2: 0
> Compiled with runtime CPU detection.
> success: format: 0  data: 0x0 - 0x95b1c7
> ASF file format detected.
> VIDEO:  [WMV3]  720x576  24bpp  1000.000 fps    0.0 kbps ( 0.0 kbyte/s)
> [V] filefmt:6  fourcc:0x33564D57  size:720x576  fps:1000.00  ftime:=0.0010
> ==========================================================================
> Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
> AUDIO: 44100 Hz, 2 ch, s16le, 96.0 kbit/6.81% (ratio: 12005->176400)
> Selected audio codec: [ffwmav2] afm: ffmpeg (DivX audio v2 (FFmpeg))
> ==========================================================================
> PACKET SIZE: 2048 bytes, deltascr: 43885
> Opening video filter: [expand osd=1]
> Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
> Opening video filter: [harddup]
> Opening video filter: [scale w=720 h=576]
> ==========================================================================
> Opening video decoder: [dmo] DMO video codecs
> DMO dll supports VO Optimizations 0 1
> DMO dll might use previous sample when requested
> GetOutput r=0x0   size:1244160  align:1
> StreamCount r=0x0  1  1
> Decoder supports the following formats: YV12 YUY2 UYVY YVYU RGB8 RGB555 RGB565 R
> GB24 RGB32
> Decoder is capable of YUV output (flags 0x1b)
> VDec: vo config request - 720 x 576 (preferred colorspace: Packed YUY2)
> VDec: using Planar YV12 as output csp (no 0)
> Movie-Aspect is undefined - no prescaling applied.
> SwScaler: using unscaled Planar YV12 -> Planar YV12 special converter
> videocodec: libavcodec (720x576 fourcc=3267706d [mpg2])
> Selected video codec: [wmv9dmo] vfm: dmo (Windows Media Video 9 DMO)
> ==========================================================================
> Limiting audio preload to 0.4s
> Increasing audio density to 4
> Writing header...
> INITV: 0.200, 0.160, fps: 25.000
> Pos:   0.8s     21f ( 2%)  0.00fps Trem:   0min   7mb  A-V:0.080 [0:96]
> Skipping frame!
> Pos:   1.2s     32f ( 2%)  0.00fps Trem:   0min  12mb  A-V:0.083 [2066:96]
> Skipping frame!
> Pos:   1.7s     44f ( 3%) 36.79fps Trem:   0min   9mb  A-V:0.082 [1857:96]
> Skipping frame!
> Pos:   2.5s     65f ( 4%) 35.40fps Trem:   0min  12mb  A-V:0.081 [1802:96]
> Skipping frame!
> Pos:   7.6s    194f (12%) 33.26fps Trem:   0min  13mb  A-V:0.083 [1720:96]
> Skipping frame!
> Pos:  42.5s   1067f (66%) 32.59fps Trem:   0min  15mb  A-V:-0.082 [1942:96]
> 1 duplicate frame(s)!
> [mpeg2video @ 009DCCD8]Warning: AVFrame.pts=? trying to guess (1063)
> Pos:  64.6s   1619f (100%) 32.64fps Trem:   0min  16mb  A-V:-0.082 [1969:95]
> 1 duplicate frame(s)!
> [mpeg2video @ 009DCCD8]Warning: AVFrame.pts=? trying to guess (1616)
> Pos:  64.7s   1621f (100%) 32.63fps Trem:   0min  16mb  A-V:-0.050 [1968:96]
> Flushing video frames
> Writing index...
> 
> Overhead: 3.199% (71741776503252796 / 128071251872120864)
> Writing header...
> 
> Video stream: 1968.542 kbit/s  (246067 B/s)  size: 15925508 bytes  64.720 secs
> 1621 frames
> 
> Audio stream:   96.000 kbit/s  (11999 B/s)  size: 781824 bytes  65.152 secs
> 
> 
> 
> _______________________________________________
> MEncoder-users mailing list
> MEncoder-users at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/mencoder-users

-- 



More information about the MEncoder-users mailing list