A little Quote!collection of the most needed Videofilters implementated in mencoder engine.
http://www.MPlayerHQ.hu/DOCS/man/en/manpage.html
Copyright is (c) MplayerTeam
Video filter are plugins that allow you to modify the video stream and its properties. The syntax is:
-vf <filter1[=parameters],filter2,...>
and here come the <filters> :
1. Deinterlacing / InverseTelecining
kerndeint[=thresh[:map[rder[:sharp[:twoway]]]]]
Donald Graft's adaptive kernel deinterlacer.
Deinterlaces parts of a video if a configurable threshold is exceeded.
thresh (0 - 255)
Threshold (default 10).
map (0 or 1)
Paint pixels which exceed the threshold white (default: 0).
order (0 or 1)
Swap fields if 1 (default: 0).
sharp (0 or 1)
Enable additional sharpening (default: 0).
twoway (0 or 1)
Enable twoway sharpening (default: 0)
------------------------------------------------
detc[=var1=value2:var2=value2:...]
.... This was the first and most primitive inverse telecine filter to be added to MPlayer/MEncoder. .... Development on this filter is no longer taking place, as ivtc, pullup, and filmdint are better for most applications. .....
------------------------------------------------
ivtc[=1]
Experimental 'stateless' inverse telecine filter. Rather than trying to lock on to a pattern like the detc filter does, ivtc makes its decisions independently for each frame. This will give much better results for material that has undergone heavy edit- ing after telecine was applied, but as a result it is not as forgiving of noisy input, for example TV capture. The optional parameter (ivtc=1) corresponds to the dr=1 option for the detc filter, and should be used with MEncoder but not with MPlayer.
As with detc, you must specify the correct output framerate (-ofps 23.976) when using MEncoder. Further development on ivtc has stopped, as the pullup and filmdint filters appear to be much more accurate.
------------------------------------------------
pullup
Third-generation pulldown reversal (inverse telecine) filter, capable of handling mixed hard-telecine, 24 fps progressive, and 30 fps progressive content. The pullup filter is designed to be much more robust than detc or ivtc, by taking advantage of future context in making its deci- sions. Like ivtc, pullup is stateless in the sense that it does not lock onto a pattern to follow, but it instead looks forward to the following fields in order to identify matches and rebuild progressive frames. It is still under development, but be- lieved to be quite accurate. No configuration options are available yet.
NOTE: Always follow pullup with the softskip filter when encoding to ensure that pullup is able to see each frame. Failure to do so will lead to incorrect output and will usually crash, due to design limitations in the codec/filter layer.
------------------------------------------------
softskip
Only useful with MEncoder. Softskip moves the frame skipping (dropping) step of encoding from be- fore the filter chain to some point during the filter chain. This allows filters which need to see all frames (inverse telecine, temporal denoising, etc.) to function properly. Should be placed after the filters which need to see all frames and before any subsequent filters that are cpu-intensive.
------------------------------------------------
filmdint[=options]
Inverse telecine filter, similar to the pullup fil- ter above. It is designed to handle any pulldown pattern, including mixed soft and hard telecine and limited support for movies that are slowed down or sped up from their original framerate for TV. ....
With no options it does normal inverse telecine, and should be used together with mencoder -fps 29.97 -ofps 23.976. When this filter is used with mplayer, it will result in an uneven framerate during playback, but it is still generally better than using pp=lb or no deinterlacing at all. Multiple options can be specified separated by /.
crop=w:h: x:y
Just like the crop filter, but faster, and works on mixed hard and soft telecined con- tent as well as when y is not a multiple of 4. If x or y would require cropping fractional pixels from the chroma planes, the crop area is extended. This usually means that x and y must be even.
io=ifps
fps
For each ifps input frames the filter will output ofps frames. The ratio of ifps/ofps should match the -fps/-ofps ratio. This could be used to filter movies that are broadcast on TV at a frame rate different from their original frame rate.
luma_only=n
If n is nonzero, the chroma plane is copied unchanged. This is useful for YV12 sampled TV, which discards one of the chroma fields.
mmx2=n
On x86, if n=1, use MMX2 optimized func- tions, if n=2, use 3DNow! optimized func- tions, othewise, use plain C. If this option is not specified, MMX2 and 3DNow! are auto-detected, use this option to override autodetection.
fast=n
The larger n will speed up the filter at the expense of accuracy. The default value is n=3. If n is odd, a frame immediately following a frame marked with the RE- PEAT_FIRST_FIELD mpeg flag is assumed to be progressive, thus filter will not spend any time on soft-telecined MPEG-2 content. This is the only effect of this flag if MMX2 or 3DNow! is available. Without MMX2 and 3DNow, if n=0 or 1, the same calculations will be used as with n=2 or 3. If n=2 or 3, the number of luma levels used to find the frame breaks is reduced from 256 to 128, which results in a faster filter without losing much accuracy. If n=4 or 5, a faster, but much less accurate metric will be used to find the frame breaks, which is more likely to misdetect high vertical detail as interlaced content.
verbose=n
If n is nonzero, print the detailed metrics for each frame. Useful for debugging.
dint_thres=n
Deinterlace threshold. Used during de-in- terlacing of unmatched frames. Larger val- ue means less deinterlacing, use n=256 to completely turn off deinterlacing. Default is n=8.
comb_thres=n
Threshold for comparing a top and bottom fields. Defaults to 128.
diff_thres=n
Threshold to detect temporal change of a field. Default is 128.
sad_thres=n
Sum of Absolute Difference threshold, de- fault is 64.
------------------------------------------------
softpulldown
This filter works only correct with MEncoder and acts on the MPEG2 flags used for soft 3:2 pulldown (soft telecine). If you want to use the ivtc or detc filter on movies that are partly soft telecined, inserting this filter before them should make them more reliable. Currently only libmpeg2 exports the needed flags. If used on material that does not set them, the filter does nothing.
2. Imaging
yuvcsp
Clamps YUV color values to the CCIR 601 range with- out doing real conversion.
------------------------------------------------
pp[=filter1[ption1[ption2...]]/[-]filter2...] (see -pphelp too)
(see explanations above in the black "-pphelp" outputted console screen.)
(always should be the first filter)
------------------------------------------------
crop[=w:h: x:y]
Crops the given part of the image and discards the rest. Useful to remove black bands from widescreen movies.
w,h
Cropped width and height, defaults to orig- inal width and height.
x,y
Position of the cropped picture, defaults to center.
------------------------------------------------
expand[=w:h: x:y: o]
Expands (not scales) movie resolution to the given value and places the unscaled original at coordi- nates x, y. Can be used for placing subtitles/OSD in the resulting black bands.
w,h
expanded width,height (default: original width,height). Negative values for w and h are treated as offsets to the original size. EXAMPLE: ex- pand=0:-50:0:0 ... this adds a 50 pixel border to the bottom of the picture
x,y
position of original image on the expanded image (default: center)
o
OSD/subtitle rendering.... 0: disable (default) ..... 1: enable
------------------------------------------------
scale[=w:h[:interlaced[:chr_drop[aram[re- size]]]]]
Scales the image with the software scaler (slow) and performs a YUV<->RGB colorspace conversion (al- so see -sws option).
w,h
scaled width/height (default: original width/height)
interlaced
Toggle interlaced scaling.
chr_drop
chroma skipping
0: use all available input lines for chroma
1: use only every 2. input line for chroma
2: use only every 4. input line for chroma
3: use only every 8. input line for chroma
param
scaling parameter (depends upon the scaling method used)
-sws 2 (bicubic): sharpness (0 (soft) - 100 (sharp))
-sws 7 (gaussian): sharpness (0 (soft) - 100 (sharp))
-sws 9 (lanczos): filter length (1-10)
presize
Scale to preset sizes.
qntsc: 352x240 (NTSC quarter screen)
qpal: 352x288 (PAL quarter screen)
ntsc: 720x480 (standard NTSC)
pal: 720x576 (standard PAL)
sntsc: 640x480 (square pixel NTSC)
spal: 768x576 (square pixel PAL)
------------------------------------------------
hue[=hue:saturation]
Defaults are hue=0.0, saturation=1.0. Value ranges are -180-180 for hue, -2-2 for saturation (negative values result in a negative chroma).
------------------------------------------------
eq[=bright:cont]
Software equalizer with interactive controls just like the hardware equalizer, for cards/drivers that do not support brightness and contrast controls in hardware. Might also be useful with MEncoder, ei- ther for fixing poorly captured movies, or for slightly reducing contrast to mask artifacts and get by with lower bitrates. Initial values in the range -100-100 may be given on the command line.
eq2[=gamma:contrast:brightness:saturation:rg:gg:bg:wei ght]
Alternative software equalizer that uses lookup ta- bles (very slow), allowing gamma correction in ad- dition to simple brightness and contrast adjust- ment. Note that it uses the same MMX optimized code as -vf eq if all gamma values are 1.0. The parameters are given as floating point values. Pa- rameters rg, gg, bg are the independent gamma val- ues for the Red, Green and Blue components. The weight parameter can be used to reduce the effect of a high gamma value on bright image areas, e.g. keep them from getting overamplified and just plain white. A value of 0.0 turns the gamma correction all the way down while 1.0 leaves it at its full strength. Defaults are gamma=1.0, contrast=1.0, brightness=0.0, saturation=1.0, weight=1.0. Value ranges are 0.1-10 for gamma, -2-2 for contrast (negative values result in a negative image), -1-1 for brightness, 0-3 for saturation and 0-1 for weight.
------------------------------------------------
swapuv
Swap U & V plane.
------------------------------------------------
il=[d|i][s][:[d|i][s]]
deinterleaves and re-interleaves lines. The goal of this filter is to add the ability to process interlaced images pre-field without deinterlacing them.
d
deinterleave (placing one above the other)
i
interleave
s
swap fields (exchange even & odd lines)
(This filter has to be used once BEFORE temporal filtering INTERLACED material using the deinterleave param. and once AFTER temporal filtering is done using the interleave param.
like in Avisynth separatefiels().weave() ... but in another way especially for temporal filtering!!!)
@ DigiDoc ... you see, you only need il=x as it can deinterleave AND re-interleave
------------------------------------------------
denoise3d[=luma:chroma:time]
This filter aims to reduce image noise producing smooth images and making still images really still (This should enhance compressibility.). It can be given from 0 to 3 parameters. If you omit a param- eter, a reasonable value will be inferred.
luma
spatial luma strength (default = 4)
chroma
spatial chroma strength (default = 3)
time
temporal strength (default = 6)
hqdn3d[=luma:chroma:time]
High precision/quality version of the denoise3d filter. Parameters and usage are the same.
------------------------------------------------
noise[=luma[u][t|a][h][p]:chroma[u][t|a][h][p]]
Adds noise.
<0-100>
luma noise
<0-100>
chroma noise
u
uniform noise (gaussian otherwise)
t
temporal noise (noise pattern changes be- tween frames)
a
averaged temporal noise (smoother, but a lot slower)
h
high quality (slightly better looking, slightly slower)
p
mix random noise with a (semi)regular pat- tern
------------------------------------------------
smart- blur=rad:strength:thresh[:rad:strength:thresh]
A "smart"!! blurrer/Sharpener!
rad
blur filter strength (~0.1-5.0) (slower if larger)
strength
blur (0.0-1.0) or sharpen (-1.0-0.0)
thresh
filter all (0), filter flat areas (0-30) or filter edges (-30-0)
------------------------------------------------
delogo[=x:y:w:h:t]
Suppresses a TV station logo by a simple interpola- tion of the surrounding pixels. Just set a rectan- gle covering the logo and watch it disappear (and sometimes something even uglier appear - your mileage may vary).
x,y
Position of the top left corner of the lo- go.
w,h
Width and height of the cleared rectangle.
t
Thickness of the fuzzy edge of the rectan- gle (added to w and h). When set to -1, a green rectangle is drawn on the screen to simplify finding the right x,y,w,h parame- ters.
- End
Also very useful Examples:
Encoding DVD title #2, only selected chapters
mencoder dvd://2 -chapter 10-15 -o title2.m2v ....
Encoding DVD title #2, resizing to 640x480
mencoder dvd://2 -vf scale=640:480 -o title2.m2v .....
This Post contains Quotes from the
www.mplayerHQ.hu Manual Document
(c) Mplayer Team!