[MEncoder-users] [BUG] a-v sync problems with pullup, softskip (only on some DVDs)
D Richard Felker III
dalias at aerifal.cx
Thu Mar 17 05:32:54 CET 2005
On Wed, Mar 16, 2005 at 06:13:15PM -0800, Corey Hickey wrote:
> D Richard Felker III wrote:
> >
> >Thank you very much for this sample. It revealed a huge bug in
> >vf_pullup's buffer management/av-sync when the input file is partially
> >soft-telecined. Please upgrade to latest cvs and see if the a/v desync
> >is fixed.
> >
>
> You're quite welcome; thank you for the support. The A-V sync problems
> went away with your previous patch, at least on that clip. With your
> second patch the sync still seems fine; I'll tell you if I encounter
> problems on any other encodes.
>
> I don't mean to sound picky or demanding, but can anything be done about
> the amount of frames that get duplicated? Visually, it's hardly
> noticable in this clip, but once in a while duplicated frames sneak into
> other places too. I was too lazy to isolate and bugreport it earlier
> (shame on me), but now that you have the same clip as I do I figured I
> ought to ask.
Duplicate frames occur when pullup outputs less than 24 fps, because
it can't find valid matches for some fields. See the verbose output:
affinity: .0..1+.2+.3.+4.+5.
breaks: .0..1.|2..3..4|.5.
duration: 1
This indicates that pullup thinks the second field of the
2-field-duration frame there matches better with the FOLLOWING frame
than with its own partner, and so it refuses to output either one as a
frame. (The internal pullup engine outputs both fields as lone fields,
but the vf_pullup wrapper for mplayer drops these.) Notice that the
same thing is happening with field 5 after the duration-3 frame.
The only reason the duration-3 frame looks so clean itself (breaks on
both sides and ideal affinity between fields) is that pullup FORCES
these attributes whenever it gets a perfect duplicate field due to
soft telecine. Until the first patch I made earlier, it didn't force
the affinities on the duration-3 frame, so even more fields were
getting dropped...
> As you can see from these examples, mencoder duplicates lots more frames
> when using pullup:
>
> bugfood at bugfood:~/mpbug$ mencoder buffer.vob -aid 128 \
> -vf pullup,softskip,crop=714:352:2:62,scale=688:288 \
> -ovc lavc -oac copy -ofps 24000/1001 -o /dev/null 2>&1 | \
> grep 'duplicate frame(s)!' | wc -l
> 75
>
> (only the changed line is shown below)
>
> -vf softpulldown,ivtc=1,crop=714:352:2:62,scale=688:288 \
> 31
>
> -vf crop=714:352:2:62,scale=688:288 \
> 8
>
>
> If it's too difficult to fix, don't worry about it - it's not a big deal.
It seems really difficult...something is EXTREMELY bogus about this
file. ivtc seems to handle it better, but both ivtc and detc have
problems with it as well. You might see if you have better luck with
filmdint..
My guess is that this DVD is badly mastered...that it was telecined
first, and then an inverse-telecine'ing mpeg2 encoder was used to make
it mostly into soft-telecine. Further, my guess is that it did a bad
job and got some of these sequences with only very small motion
out-of-sync.
Of course I'm open to other theories too. Anyone care to try and
figure out what's happening here??
Rich
More information about the MEncoder-users
mailing list