[MEncoder-users] audio stream becomes longer than video stream

Oded Shimon ods15 at ods15.dyndns.org
Mon Aug 15 05:35:42 CEST 2005


On Sun, Aug 14, 2005 at 07:04:17PM +0200, Guillaume POIRIER wrote:
> Hi,
> 
> On 8/10/05, Grzegorz Nowak <gnowak at gmail.com> wrote:
> > Hi,
> > 
> > I have encoded multiple files from interlaced dv format to progressive
> > avi format. These files are then joined and the audio gets out of
> > sync. This is because I used -oac copy, and beacause some strange
> > reason mencoder drops some frames.. Don't know why?? Later I realised
> > that I have to use the switch -nosound, and then it works fine. Maybe
> > mencoder tries to synchronize the audio with some special functions.
> > The main problem is that I have a lot of small files where the audio
> > stream is longer than the video stream due the drop of frames( I've
> > tried -nodrop switch, doesn't work). Is there a tool or can mencoder
> > fix this problem??? The source files are no longer available to me...
> > so I am kind of stuck. What I mean by fix the problem, is to make the
> > video- and audio streams the same length in all the files about 50.
> 
> Please try to re-encode adding "harddup" at the end of your video
> filter chain. That won't hurt in any case. That will counter-balance
> the frame dropping that mencoder does... at least, that's my
> understanding of it.

harddup won't help unless he's muxing to something not avi... In which case 
the encode will most likely fail completely anyway... (oh and it might help 
with the case of B frames...)

Guillaume - You might want to document this.. all what the filter harddup 
does, is, when MEncoder wants to duplicate a frame, it writes a zero byte 
frame into the muxer, causing an empty avi packet that just pushes sync but 
causes no video. with harddup, MEncoder instead just pushes the last frame 
displayed again into the filter chain. So basically, the encoder recieves 
the EXACT same frame twice, compresses it, and gives it to the muxer...

Get it? :)

- ods15




More information about the MEncoder-users mailing list