[MEncoder-users] Re: vf_decimate vs 24p->60p content
dalias at aerifal.cx
Thu Dec 22 07:10:44 CET 2005
#1: Please do not take threads off-list!!!!!
On Wed, Dec 21, 2005 at 04:16:15PM -0800, rob pfile wrote:
> so i tried vf_decimate on my tv show, but it didnt work so well. so i
> instrumented the code and discovered that it wasnt actually dropping
> very many frames.
> it seems like the default value for the hi threshold is too low; if i
> increase this to 1000-2000 most of the correct frames have been
> dropped, though in scenes with very low motion it drops too many
> frames. if i understand the code right, it looks like its accumulating
> the frame differences over each 16x16 block for the entire frame, which
> means that the default threshold should really be a function of the
> frame size.
Yes, you'd have to tune the thresholds. :(
> its really too bad that these programs get re-encoded so many times;
> the duplicate frames are clearly dupes to the eye but they must differ
> pretty significantly at the bit level.
> also i have to defer to you as the author of both filters, but
> vf_pullup really does work most of the time on this content. clearly it
> has been converted from 24 to 60fps, as you can very clearly see the
> 3/2 pattern of repeated frames. i guess i'd like to understand more why
> a pullup filter is not appropriate here, if you don't mind explaining.
pullup does ABSOLUTELY NOTHING to handle this content. It's not
written to. If it happens to "work" then all the work is being done by
mencoder's frame dropping and you're just happening to get lucky with
> one thing i noticed is that the TV ratings bug thing that appears in
> the upper right corner after a commercial break has been encoded at
> 60fps. it starts out dim and gets progressively brighter with each 60hz
> frame. i wonder if this is what is confusing the pullup filter.
No. pullup is not confused. It's doing exactly what it's made to do
with this content, which is to output the exact same thing it got as
On the other hand, decimate is being confused by this.
> i figure that to handle this converted 60p content, perhaps vf_decimate
> could be extended to keep a history of drops and when attempting to
> drop two consecutive frames, it could check if it fits the pattern or
> not. in other words, to properly handle this content sometimes its okay
> to drop 2 back to back frames but sometimes you should only drop one.
> i'll try hacking on this if i get some time over the weekend.
Overcomplicated. If you want you can use the hack discussed several
times in the past on this list:
-vf tinterlace,pullup,softskip,scale=[original size]
It may or may not work. The logo will make it more difficult but
pullup can probably successfully ignore it.
More information about the MEncoder-users