[MEncoder-users] Re: MEncoder-users Digest, Vol 27, Issue 20

rob pfile pfile at pacbell.net
Wed Nov 22 02:27:19 CET 2006


RC wrote:

> On Tue, 21 Nov 2006 08:13:17 -0800
> pfile at pacbell.net wrote:
>
> > if in theory the video still has the same length as it did  
> before, why
> > would there be the need to change the A/  V sync?
>
> Because the container (PTS) says audio frame X should be playing when
> video frame Y is displayed...  If the two are substantially apart,
> frames are added or removed.

okay. this explains why mencoder puts a bunch of duplicate frames  
right in the beginning of my encode... its trying to fix the initial  
a/v sync.

i had a bug (see below) but i think its fixed. whats interesting now  
is that if i allow mencoder to fix the initial sync, then  
periodically throughout the encode its dropping in extra frames. i  
guess unless there's a way to avoid this, i'll just use -mc 0 -noskip  
and use avisync afterwards to fix the initial sync.

> > but if virtualdub/etc. can do this then there's no reason mencoder
> > cant (given enough code :) it seems to me that the only way to fix
> > this is to scale the audio, but i want  to make sure that's  
> really the
> > case before i go down that rathole.
>
> With the little info you have provided, all I can say is that numerous
> people are using mencoder to do the exact same conversion you are
> without any sync or framedrop/duplicates problems.

the mail i almost sent to the list was very verbose but i decided to  
just cut to my question. as it turns out i had a bug in my decimation  
routine which was causing it to drop too many frames. i got  
sidetracked on the frame display time thing because i thought i had  
emitted exactly the right number of frames when in fact i had not.

when using decimate=2 or tinterlace,pullup to go from 60p->24p, i'd  
always see skipped frames and duplicated frames, which i interpreted  
as the filter not dropping enough or too many frames. but when i  
started seeing the same thing with my code (which in theory should be  
perfect decimation), i started wondering if there was some other  
reason for the duplicate frames.

thanks for the help, its always appreciated.

rob



More information about the MEncoder-users mailing list