[MPlayer-users] Announcement: harddup and softskip filters (relevant to DVD/SVCD encoding!)

D Richard Felker III dalias at aerifal.cx
Wed Apr 28 07:16:19 CEST 2004

I just committed two new filters for use with MEncoder, which many
users may be interested in. These are NOT present in the new 1.0pre4
release, only CVS.


This one you will like a lot! If loaded (best at the end of the filter
chain), mencoder will not write "0 byte" chunks for duplicate frames,
but instead actually encode the frame twice! This means that A/V sync
will actually be correct in MPEG files created by mencoder, and you
should be able to use it to generate SVCD- or DVD-compliant MPEG2
streams, with the right -lavcopts.


This one is also a big help. It moves mencoder's frameskipping from
before the filter chain, to a point you choose in the filter chain.
Why would you want to do this? Certain filters (any filter that does
temporal processing, including denoise3d & all the inverse telecine
filters) need to see all frames of the input, even frames that will be
dropped. Inserting softskip _after_ such filters allows them to work
correctly with mencoder. So it's finally possible to use a commandline
with both -vf pullup and -ofps 23.976. A good example showing the
order to use is:

-vf pullup,crop=704:480,denoise3d,softskip,scale=640:480

Note that scale comes after the softskip, so it will get skipped if
the frame is going to get dropped. But pullup and denoise3d still get
to process each frame.

BTW, yes, you can use both. If you're trying to make SVCD or DVD mpeg
out of telecined source, you should try:

-vf pullup,...,softskip,...,harddup

Also, another application: hard-telecining a movie when you encode.
With mencoder's normal frame duplication, it may mess up. You NEVER
want an interlaced frame to get duplicated, and this can happen if
mencoder does the duplication the old way. But with the following
command line, it always works:

-fps 29.97 -ofps 29.97 -vf harddup,telecine

Note that the telecine filter comes _after_ harddup. Duplicates get
generated at whatever point you put the harddup filter, and you want
them to get generated _before_ they're telecined, not after!

So now mencoder doesn't suck so much... If only we could figure out
how to fix the slightly-bad a/v sync... :)


More information about the MPlayer-users mailing list