[MEncoder-users] flv Audio/Video not synchronized

Marc-Andre Lafortune mencoder at marc-andre.ca
Wed Sep 17 20:18:22 CEST 2008


Hi!
	With the latest svn snapshot (blushes) I can use mencoder on my  
webcam recording, except that the a/v is not synchronized properly. I  
ultimately want to join many flvs, but to illustrate my problem I  
simply want to start and end with the same flv. I apparently have to  
specify the framerate (not sure why), so my command looks like:

mencoder input.flv -o output.flv -of lavf -oac pcm -ovc lavc -lavcopts  
vcodec=flv -ofps 15

I tried different inputs, in particular http://www.marc-andre.ca/posts/blog/webcam/test-facebook.flv

The result is that there's a delay between the sound and the image  
(the image is slightly in advance). I suspect the "1 duplicate  
frame(s)!" I get might be the problem, right? How do I go about fixing  
this?

Here's the full output:

MEncoder dev-SVN-r27632-4.0.1 (C) 2000-2008 MPlayer Team
CPU: Intel(R) Xeon(R) CPU            5150  @ 2.66GHz (Family: 6,  
Model: 15, Stepping: 6)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2

success: format: 0  data: 0x0 - 0x45b2f
libavformat file format detected.
[lavf] Video stream found, -vid 0
[lavf] Audio stream found, -aid 1
VIDEO:  [FLV1]  240x180  0bpp  1000.000 fps    0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:44  fourcc:0x31564C46  size:240x180  fps:1000.000   
ftime:=0.0010
= 
= 
========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 22050 Hz, 1 ch, s16le, 0.0 kbit/0.00% (ratio: 0->44100)
Selected audio codec: [ffnellymoser] afm: ffmpeg (FFmpeg Nellymoser  
Audio decoder)
= 
= 
========================================================================
** MUXER_LAVF  
*****************************************************************
REMEMBER: MEncoder's libavformat muxing is presently broken and can  
generate
INCORRECT files in the presence of B-frames. Moreover, due to bugs  
MPlayer
will play these INCORRECT files as if nothing were wrong!
*******************************************************************************
OK, exit.
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
= 
= 
========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffflv] vfm: ffmpeg (FFmpeg Flash video)
= 
= 
========================================================================
VDec: vo config request - 240 x 180 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
videocodec: libavcodec (240x180 fourcc=31564c46 [FLV1])
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
VIDEO CODEC ID: 22
AUDIO CODEC ID: 10000, TAG: 0
Writing header...
Pos:   0.1s      2f (22%)  0.00fps Trem:   0min   0mb  A-V:0.000 [0:0]
1 duplicate frame(s)!
Pos:   0.8s     12f (22%)  0.00fps Trem:   0min   0mb  A-V:0.001 [0:352]
1 duplicate frame(s)!
Pos:   2.5s     36f (45%)  0.00fps Trem:   0min   0mb  A-V:0.004  
[458:352]
1 duplicate frame(s)!
Pos:   3.1s     45f (57%)  0.00fps Trem:   0min   0mb  A-V:0.004  
[450:352]
1 duplicate frame(s)!
Pos:   3.4s     48f (57%)  0.00fps Trem:   0min   0mb  A-V:0.005  
[438:352]
2 duplicate frame(s)!
Pos:   5.1s     72f (80%)  0.00fps Trem:   0min   0mb  A-V:0.007  
[456:352]
1 duplicate frame(s)!
Pos:   5.8s     81f (91%)  0.00fps Trem:   0min   0mb  A-V:0.008  
[464:352]
1 duplicate frame(s)!
Pos:   6.9s     96f (100%)  0.00fps Trem:   0min   0mb  A-V:0.010  
[491:352]
1 duplicate frame(s)!
Pos:   7.4s    103f (100%)  0.00fps Trem:   0min   0mb  A-V:0.010  
[494:352]
1 duplicate frame(s)!
Pos:   7.8s    108f (100%)  0.00fps Trem:   0min   0mb  A-V:0.011  
[498:352]
Flushing video frames.
Writing index...

Video stream:  498.519 kbit/s  (62314 B/s)  size: 486056 bytes  7.800  
secs  108 frames

Audio stream:  352.800 kbit/s  (44100 B/s)  size: 354304 bytes  8.034  
secs

Thanks!




More information about the MEncoder-users mailing list