4 Video filters allow you to modify the video stream and its properties. The
7 --vf=<filter1[=parameter1:parameter2:...],filter2,...>
8 Setup a chain of video filters.
10 Many parameters are optional and set to default values if omitted. To
11 explicitly use a default value set a parameter to '-1'. Parameters w:h means
12 width x height in pixels, x:y means x;y position counted from the upper left
13 corner of the bigger image.
15 *NOTE*: To get a full list of available video filters, see ``--vf=help``.
17 Video filters are managed in lists. There are a few commands to manage the
20 --vf-add=<filter1[,filter2,...]>
21 Appends the filters given as arguments to the filter list.
23 --vf-pre=<filter1[,filter2,...]>
24 Prepends the filters given as arguments to the filter list.
26 --vf-del=<index1[,index2,...]>
27 Deletes the filters at the given indexes. Index numbers start at 0,
28 negative numbers address the end of the list (-1 is the last).
31 Completely empties the filter list.
33 With filters that support it, you can access parameters by their name.
36 Prints the parameter names and parameter value ranges for a particular
39 --vf=<filter=named_parameter1=value1[:named_parameter2=value2:...]>
40 Sets a named parameter to the given value. Use on and off or yes and no to
43 Available filters are:
46 Crops the given part of the image and discards the rest. Useful to remove
47 black bands from widescreen movies.
50 Cropped width and height, defaults to original width and height.
52 Position of the cropped picture, defaults to center.
54 cropdetect[=limit:round[:reset]]
55 Calculates necessary cropping parameters and prints the recommended
59 Threshold, which can be optionally specified from nothing (0) to
60 everything (255) (default: 24).
62 Value which the width/height should be divisible by (default: 16). The
63 offset is automatically adjusted to center the video. Use 2 to get
64 only even dimensions (needed for 4:2:2 video). 16 is best when
65 encoding to most video codecs.
67 Counter that determines after how many frames cropdetect will reset
68 the previously detected largest video area and start over to detect
69 the current optimal crop area (default: 0). This can be useful when
70 channel logos distort the video area. 0 indicates never reset and
71 return the largest area encountered during playback.
74 Draws a rectangle of the requested width and height at the specified
75 coordinates over the image and prints current rectangle parameters to the
76 console. This can be used to find optimal cropping parameters. If you bind
77 the ``input.conf`` directive 'change_rectangle' to keystrokes, you can
78 move and resize the rectangle on the fly.
81 width and height (default: -1, maximum possible width where boundaries
84 top left corner position (default: -1, uppermost leftmost)
86 expand[=w:h:x:y:osd:aspect:round]
87 Expands (not scales) movie resolution to the given value and places the
88 unscaled original at coordinates x, y. Can be used for placing
89 subtitles/OSD in the resulting black bands.
92 Expanded width,height (default: original width,height). Negative
93 values for w and h are treated as offsets to the original size.
98 Adds a 50 pixel border to the bottom of the picture.
101 position of original image on the expanded image (default: center)
104 OSD/subtitle rendering
106 :0: disable (default)
110 Expands to fit an aspect instead of a resolution (default: 0).
115 Expands to 800x600, unless the source is higher resolution, in
116 which case it expands to fill a 4/3 aspect.
119 Rounds up to make both width and height divisible by <r> (default: 1).
122 Flips the image upside down. See also ``--flip``.
125 Mirrors the image on the Y axis.
128 Rotates the image by 90 degrees and optionally flips it. For values
129 between 4-7 rotation is only done if the movie geometry is portrait and
132 :0: Rotate by 90 degrees clockwise and flip (default).
133 :1: Rotate by 90 degrees clockwise.
134 :2: Rotate by 90 degrees counterclockwise.
135 :3: Rotate by 90 degrees counterclockwise and flip.
137 scale[=w:h[:interlaced[:chr_drop[:par[:par2[:presize[:noup[:arnd]]]]]]]]
138 Scales the image with the software scaler (slow) and performs a YUV<->RGB
139 colorspace conversion (see also ``--sws``).
142 scaled width/height (default: original width/height)
144 *NOTE*: If ``--zoom`` is used, and underlying filters (including
145 libvo) are incapable of scaling, it defaults to d_width/d_height!
147 :0: scaled d_width/d_height
148 :-1: original width/height
149 :-2: Calculate w/h using the other dimension and the prescaled
151 :-3: Calculate w/h using the other dimension and the original
153 :-(n+8): Like -n above, but rounding the dimension to the closest
157 Toggle interlaced scaling.
165 :0: Use all available input lines for chroma.
166 :1: Use only every 2. input line for chroma.
167 :2: Use only every 4. input line for chroma.
168 :3: Use only every 8. input line for chroma.
170 <par>[:<par2>] (see also ``--sws``)
171 Set some scaling parameters depending on the type of scaler selected
174 | --sws=2 (bicubic): B (blurring) and C (ringing)
176 | 0.00:0.75 VirtualDub's "precise bicubic"
177 | 0.00:0.50 Catmull-Rom spline
178 | 0.33:0.33 Mitchell-Netravali spline
179 | 1.00:0.00 cubic B-spline
181 --sws=7 (gaussian): sharpness (0 (soft) - 100 (sharp))
183 --sws=9 (lanczos): filter length (1-10)
186 Scale to preset sizes.
188 :qntsc: 352x240 (NTSC quarter screen)
189 :qpal: 352x288 (PAL quarter screen)
190 :ntsc: 720x480 (standard NTSC)
191 :pal: 720x576 (standard PAL)
192 :sntsc: 640x480 (square pixel NTSC)
193 :spal: 768x576 (square pixel PAL)
196 Disallow upscaling past the original dimensions.
198 :0: Allow upscaling (default).
199 :1: Disallow upscaling if one dimension exceeds its original value.
200 :2: Disallow upscaling if both dimensions exceed their original values.
203 Accurate rounding for the vertical scaler, which may be faster or
204 slower than the default rounding.
206 :0: Disable accurate rounding (default).
207 :1: Enable accurate rounding.
209 dsize[=aspect|w:h:aspect-method:r]
210 Changes the intended display size/aspect at an arbitrary point in the
211 filter chain. Aspect can be given as a fraction (4/3) or floating point
212 number (1.33). Alternatively, you may specify the exact display width and
213 height desired. Note that this filter does *not* do any scaling itself; it
214 just affects what later scalers (software or hardware) will do when
215 auto-scaling to correct aspect.
218 New display width and height.
220 Can also be these special values:
222 :0: original display width and height
223 :-1: original video width and height (default)
224 :-2: Calculate w/h using the other dimension and the original display
226 :-3: Calculate w/h using the other dimension and the original video
232 Specifies a display resolution of 800x600 for a 4/3 aspect video,
233 or 800x450 for a 16/9 aspect video.
236 Modifies width and height according to original aspect ratios.
238 :-1: Ignore original aspect ratio (default).
239 :0: Keep display aspect ratio by using <w> and <h> as maximum
241 :1: Keep display aspect ratio by using <w> and <h> as minimum
243 :2: Keep video aspect ratio by using <w> and <h> as maximum
245 :3: Keep video aspect ratio by using <w> and <h> as minimum
251 Specifies a display resolution of at most 800x600, or smaller, in
252 order to keep aspect.
255 Rounds up to make both width and height divisible by <r> (default: 1).
258 Forces software YVU9 to YV12 colorspace conversion. Deprecated in favor of
262 Clamps YUV color values to the CCIR 601 range without doing real
266 RGB/BGR 8 -> 15/16/24/32bpp colorspace conversion using palette.
268 format[=fourcc[:outfourcc]]
269 Restricts the colorspace for the next filter without doing any conversion.
270 Use together with the scale filter for a real conversion.
272 *NOTE*: For a list of available formats see ``format=fmt=help``.
275 format name like rgb15, bgr24, yv12, etc (default: yuy2)
277 Format name that should be substituted for the output. If this is not
278 100% compatible with the <fourcc> value it will crash.
282 ====================== =====================
283 Valid Invalid (will crash)
284 ====================== =====================
285 ``format=rgb24:bgr24`` ``format=rgb24:yv12``
287 ====================== =====================
290 Restricts the colorspace for the next filter without doing any conversion.
291 Unlike the format filter, this will allow any colorspace except the one
294 *NOTE*: For a list of available formats see ``noformat=fmt=help``.
297 format name like rgb15, bgr24, yv12, etc (default: yv12)
299 pp[=filter1[:option1[:option2...]]/[-]filter2...]
300 Enables the specified chain of postprocessing subfilters. Subfilters must
301 be separated by '/' and can be disabled by prepending a '-'. Each
302 subfilter and some options have a short and a long name that can be used
303 interchangeably, i.e. dr/dering are the same. All subfilters share common
304 options to determine their scope:
307 Automatically switch the subfilter off if the CPU is too slow.
309 Do chrominance filtering, too (default).
311 Do luminance filtering only (no chrominance).
313 Do chrominance filtering only (no luminance).
315 *NOTE*: ``--pphelp`` shows a list of available subfilters.
317 Available subfilters are:
319 hb/hdeblock[:difference[:flatness]]
320 horizontal deblocking filter
322 :<difference>: Difference factor where higher values mean more
323 deblocking (default: 32).
324 :<flatness>: Flatness threshold where lower values mean more
325 deblocking (default: 39).
327 vb/vdeblock[:difference[:flatness]]
328 vertical deblocking filter
330 :<difference>: Difference factor where higher values mean more
331 deblocking (default: 32).
332 :<flatness>: Flatness threshold where lower values mean more
333 deblocking (default: 39).
335 ha/hadeblock[:difference[:flatness]]
336 accurate horizontal deblocking filter
338 :<difference>: Difference factor where higher values mean more
339 deblocking (default: 32).
340 :<flatness>: Flatness threshold where lower values mean more
341 deblocking (default: 39).
343 va/vadeblock[:difference[:flatness]]
344 accurate vertical deblocking filter
346 :<difference>: Difference factor where higher values mean more
347 deblocking (default: 32).
348 :<flatness>: Flatness threshold where lower values mean more
349 deblocking (default: 39).
351 The horizontal and vertical deblocking filters share the difference and
352 flatness values so you cannot set different horizontal and vertical
356 experimental horizontal deblocking filter
359 experimental vertical deblocking filter
364 tn/tmpnoise[:threshold1[:threshold2[:threshold3]]]
365 temporal noise reducer
367 :<threshold1>: larger -> stronger filtering
368 :<threshold2>: larger -> stronger filtering
369 :<threshold3>: larger -> stronger filtering
371 al/autolevels[:f/fullyrange]
372 automatic brightness / contrast correction
374 :f/fullyrange: Stretch luminance to (0-255).
377 Linear blend deinterlacing filter that deinterlaces the given block by
378 filtering all lines with a (1 2 1) filter.
381 Linear interpolating deinterlacing filter that deinterlaces the given
382 block by linearly interpolating every second line.
385 Cubic interpolating deinterlacing filter deinterlaces the given block
386 by cubically interpolating every second line.
389 Median deinterlacing filter that deinterlaces the given block by
390 applying a median filter to every second line.
393 FFmpeg deinterlacing filter that deinterlaces the given block by
394 filtering every second line with a (-1 4 2 4 -1) filter.
397 Vertically applied FIR lowpass deinterlacing filter that deinterlaces
398 the given block by filtering all lines with a (-1 2 6 2 -1) filter.
400 fq/forceQuant[:quantizer]
401 Overrides the quantizer table from the input with the constant
402 quantizer you specify.
404 :<quantizer>: quantizer to use
407 default pp filter combination (hb:a,vb:a,dr:a)
410 fast pp filter combination (h1:a,v1:a,dr:a)
413 high quality pp filter combination (ha:a:128:7,va:a,dr:a)
417 ``--vf=pp=hb/vb/dr/al``
418 horizontal and vertical deblocking, deringing and automatic
422 default filters without brightness/contrast correction
424 ``--vf=pp=default/tmpnoise:1:2:3``
425 Enable default filters & temporal denoiser.
427 ``--vf=pp=hb:y/vb:a``
428 Horizontal deblocking on luminance only, and switch vertical
429 deblocking on or off automatically depending on available CPU time.
431 fspp[=quality[:qp[:strength[:bframes]]]]
432 simple postprocessing filter
438 Force quantization parameter (default: 0, use QP from video).
441 Filter strength, lower values mean more details but also more
442 artifacts, while higher values make the image smoother but also
443 blurrier (default: 0 - PSNR optimal).
446 0: do not use QP from B-frames (default)
447 1: use QP from B-frames too (may cause flicker)
450 Another postprocessing filter
453 Force quantization parameter (default: 0, use QP from video).
456 :0: hard thresholding
457 :1: soft thresholding (better deringing, but blurrier)
458 :2: medium thresholding (default, good results)
461 quantization parameter (QP) change filter
464 some equation like ``2+2*sin(PI*qp)``
467 generic equation change filter
470 Some equation, e.g. ``p(W-X\,Y)`` to flip the image horizontally. You
471 can use whitespace to make the equation more readable. There are a
472 couple of constants that can be used in the equation:
476 :X / Y: the coordinates of the current sample
477 :W / H: width and height of the image
478 :SW / SH: width/height scale depending on the currently filtered plane,
479 e.g. 1,1 and 0.5,0.5 for YUV 4:2:0.
480 :p(x,y): returns the value of the pixel at location x/y of the current
484 Generate various test patterns.
486 rgbtest[=width:height]
487 Generate an RGB test pattern useful for detecting RGB vs BGR issues. You
488 should see a red, green and blue stripe from top to bottom.
491 Desired width of generated image (default: 0). 0 means width of input
495 Desired height of generated image (default: 0). 0 means height of
499 Fast software YV12 to MPEG-1 conversion with libavcodec for use with
504 :32-: fixed bitrate in kbits
507 force output fps (float value) (default: 0, autodetect based on height)
510 Set up optimal scaling for DVB cards, scaling the x axis in hardware and
511 calculating the y axis scaling in software to keep aspect. Only useful
512 together with expand and scale.
515 Control aspect ratio, calculate as ``DVB_HEIGHT*ASPECTRATIO`` (default:
516 ``576*4/3=768``), set it to ``576*(16/9)=1024`` for a 16:9 TV.
520 ``--vf=dvbscale,scale=-1:0,expand=-1:576:-1:-1:1,lavc``
521 FIXME: Explain what this does.
523 noise[=luma[u][t|a][h][p]:chroma[u][t|a][h][p]]
527 :<0-100>: chroma noise
528 :u: uniform noise (gaussian otherwise)
529 :t: temporal noise (noise pattern changes between frames)
530 :a: averaged temporal noise (smoother, but a lot slower)
531 :h: high quality (slightly better looking, slightly slower)
532 :p: mix random noise with a (semi)regular pattern
534 denoise3d[=luma_spatial:chroma_spatial:luma_tmp:chroma_tmp]
535 This filter aims to reduce image noise producing smooth images and making
536 still images really still (This should enhance compressibility.).
539 spatial luma strength (default: 4)
541 spatial chroma strength (default: 3)
543 luma temporal strength (default: 6)
545 chroma temporal strength (default:
546 ``luma_tmp*chroma_spatial/luma_spatial``)
548 hqdn3d[=luma_spatial:chroma_spatial:luma_tmp:chroma_tmp]
549 High precision/quality version of the denoise3d filter. Parameters and
552 ow[=depth[:luma_strength[:chroma_strength]]]
553 Overcomplete Wavelet denoiser.
556 Larger depth values will denoise lower frequency components more, but
557 slow down filtering (default: 8).
559 luma strength (default: 1.0)
561 chroma strength (default: 1.0)
563 eq[=brightness:contrast] (OBSOLETE)
564 Software equalizer with interactive controls just like the hardware
565 equalizer, for cards/drivers that do not support brightness and contrast
566 controls in hardware.
573 eq2[=gamma:contrast:brightness:saturation:rg:gg:bg:weight]
574 Alternative software equalizer that uses lookup tables (very slow),
575 allowing gamma correction in addition to simple brightness and contrast
576 adjustment. Note that it uses the same MMX optimized code as ``--vf=eq``
577 if all gamma values are 1.0. The parameters are given as floating point
581 initial gamma value (default: 1.0)
583 initial contrast, where negative values result in a negative image
586 initial brightness (default: 0.0)
588 initial saturation (default: 1.0)
590 gamma value for the red component (default: 1.0)
592 gamma value for the green component (default: 1.0)
594 gamma value for the blue component (default: 1.0)
596 The weight parameter can be used to reduce the effect of a high gamma
597 value on bright image areas, e.g. keep them from getting overamplified
598 and just plain white. A value of 0.0 turns the gamma correction all
599 the way down while 1.0 leaves it at its full strength (default: 1.0).
602 Software equalizer with interactive controls just like the hardware
603 equalizer, for cards/drivers that do not support hue and saturation
604 controls in hardware.
607 initial hue (default: 0.0)
609 initial saturation, where negative values result in a negative chroma
613 Convert planar YUV 4:2:0 to half-height packed 4:2:2, downsampling luma
614 but keeping all chroma samples. Useful for output to low-resolution
615 display devices when hardware downscaling is poor quality or is not
616 available. Can also be used as a primitive luma-only deinterlacer with
620 By default, halfpack averages pairs of lines when downsampling. Any
621 value different from 0 or 1 gives the default (averaging) behavior.
623 :0: Only use even lines when downsampling.
624 :1: Only use odd lines when downsampling.
627 When interlaced video is stored in YUV 4:2:0 formats, chroma interlacing
628 does not line up properly due to vertical downsampling of the chroma
629 channels. This filter packs the planar 4:2:0 data into YUY2 (4:2:2) format
630 with the chroma lines in their proper locations, so that in any given
631 scanline, the luma and chroma data both come from the same field.
634 Select the sampling mode.
636 :0: nearest-neighbor sampling, fast but incorrect
637 :1: linear interpolation (default)
639 decimate[=max:hi:lo:frac]
640 Drops frames that do not differ greatly from the previous frame in order
641 to reduce framerate. The main use of this filter is for very-low- bitrate
642 encoding (e.g. streaming over dialup modem), but it could in theory be
643 used for fixing movies that were inverse-telecined incorrectly.
646 Sets the maximum number of consecutive frames which can be dropped (if
647 positive), or the minimum interval between dropped frames (if
650 A frame is a candidate for dropping if no 8x8 region differs by more
651 than a threshold of <hi>, and if not more than <frac> portion (1
652 meaning the whole image) differs by more than a threshold of <lo>.
653 Values of <hi> and <lo> are for 8x8 pixel blocks and represent actual
654 pixel value differences, so a threshold of 64 corresponds to 1 unit of
655 difference for each pixel, or the same spread out differently over the
659 The drop-deinterlace (dint) filter detects and drops the first from a set
660 of interlaced video frames.
663 relative difference between neighboring pixels (default: 0.1)
665 What part of the image has to be detected as interlaced to drop the
666 frame (default: 0.15).
669 FFmpeg deinterlacing filter, same as ``--vf=pp=fd``
671 kerndeint[=thresh[:map[:order[:sharp[:twoway]]]]]
672 Donald Graft's adaptive kernel deinterlacer. Deinterlaces parts of a video
673 if a configurable threshold is exceeded.
676 threshold (default: 10)
678 :0: Ignore pixels exceeding the threshold (default).
679 :1: Paint pixels exceeding the threshold white.
682 :0: Leave fields alone (default).
686 :0: Disable additional sharpening (default).
687 :1: Enable additional sharpening.
690 :0: Disable twoway sharpening (default).
691 :1: Enable twoway sharpening.
693 unsharp[=l|cWxH:amount[:l|cWxH:amount]]
694 unsharp mask / gaussian blur
697 Apply effect on luma component.
700 Apply effect on chroma components.
703 width and height of the matrix, odd sized in both directions (min =
704 3x3, max = 13x11 or 11x13, usually something between 3x3 and 7x7)
707 Relative amount of sharpness/blur to add to the image (a sane range
716 il[=d|i][s][:[d|i][s]]
717 (De)interleaves lines. The goal of this filter is to add the ability to
718 process interlaced images pre-field without deinterlacing them. You can
719 filter your interlaced DVD and play it on a TV without breaking the
720 interlacing. While deinterlacing (with the postprocessing filter) removes
721 interlacing permanently (by smoothing, averaging, etc) deinterleaving
722 splits the frame into 2 fields (so called half pictures), so you can
723 process (filter) them independently and then re-interleave them.
725 :d: deinterleave (placing one above the other)
727 :s: swap fields (exchange even & odd lines)
730 (De)interleaves lines. This filter is very similar to the il filter but
731 much faster, the main disadvantage is that it does not always work.
732 Especially if combined with other filters it may produce randomly messed
733 up images, so be happy if it works but do not complain if it does not for
734 your combination of filters.
736 :d: Deinterleave fields, placing them side by side.
737 :i: Interleave fields again (reversing the effect of fil=d).
740 Extracts a single field from an interlaced image using stride arithmetic
741 to avoid wasting CPU time. The optional argument n specifies whether to
742 extract the even or the odd field (depending on whether n is even or odd).
744 detc[=var1=value1:var2=value2:...]
745 Attempts to reverse the 'telecine' process to recover a clean,
746 non-interlaced stream at film framerate. This was the first and most
747 primitive inverse telecine filter to be added to MPlayer. It works by
748 latching onto the telecine 3:2 pattern and following it as long as
749 possible. This makes it suitable for perfectly-telecined material, even in
750 the presence of a fair degree of noise, but it will fail in the presence
751 of complex post-telecine edits. Development on this filter is no longer
752 taking place, as ivtc, pullup, and filmdint are better for most
753 applications. The following arguments (see syntax above) may be used to
754 control detc's behavior:
757 Set the frame dropping mode.
759 :0: Do not drop frames to maintain fixed output framerate (default).
760 :1: Always drop a frame when there have been no drops or telecine
761 merges in the past 5 frames.
762 :2: Always maintain exact 5:4 input to output frame ratio.
767 :0: Fixed pattern with initial frame number specified by <fr>.
768 :1: aggressive search for telecine pattern (default)
771 Set initial frame number in sequence. 0-2 are the three clean
772 progressive frames; 3 and 4 are the two interlaced frames. The
773 default, -1, means 'not in telecine sequence'. The number specified
774 here is the type for the imaginary previous frame before the movie
777 <t0>, <t1>, <t2>, <t3>
778 Threshold values to be used in certain modes.
781 Experimental 'stateless' inverse telecine filter. Rather than trying to
782 lock on to a pattern like the detc filter does, ivtc makes its decisions
783 independently for each frame. This will give much better results for
784 material that has undergone heavy editing after telecine was applied, but
785 as a result it is not as forgiving of noisy input, for example TV capture.
786 The optional parameter (ivtc=1) corresponds to the dr=1 option for the
787 detc filter, and should not be used with MPlayer. Further development on
788 ivtc has stopped, as the pullup and filmdint filters appear to be much
791 pullup[=jl:jr:jt:jb:sb:mp]
792 Third-generation pulldown reversal (inverse telecine) filter, capable of
793 handling mixed hard-telecine, 24000/1001 fps progressive, and 30000/1001
794 fps progressive content. The pullup filter is designed to be much more
795 robust than detc or ivtc, by taking advantage of future context in making
796 its decisions. Like ivtc, pullup is stateless in the sense that it does
797 not lock onto a pattern to follow, but it instead looks forward to the
798 following fields in order to identify matches and rebuild progressive
799 frames. It is still under development, but believed to be quite accurate.
802 These options set the amount of "junk" to ignore at the left, right,
803 top, and bottom of the image, respectively. Left/right are in units of
804 8 pixels, while top/bottom are in units of 2 lines. The default is 8
808 Setting this option to 1 will reduce the chances of pullup generating
809 an occasional mismatched frame, but it may also cause an excessive
810 number of frames to be dropped during high motion sequences.
811 Conversely, setting it to -1 will make pullup match fields more
812 easily. This may help processing of video where there is slight
813 blurring between the fields, but may also cause there to be interlaced
814 frames in the output.
817 This option may be set to 1 or 2 to use a chroma plane instead of the
818 luma plane for doing pullup's computations. This may improve accuracy
819 on very clean source material, but more likely will decrease accuracy,
820 especially if there is chroma noise (rainbow effect) or any grayscale
821 video. The main purpose of setting mp to a chroma plane is to reduce
822 CPU load and make pullup usable in realtime on slow machines.
825 Inverse telecine filter, similar to the pullup filter above. It is
826 designed to handle any pulldown pattern, including mixed soft and hard
827 telecine and limited support for movies that are slowed down or sped up
828 from their original framerate for TV. Only the luma plane is used to find
829 the frame breaks. If a field has no match, it is deinterlaced with simple
830 linear approximation. If the source is MPEG-2, this must be the first
831 filter to allow access to the field-flags set by the MPEG-2 decoder.
832 Depending on the source MPEG, you may be fine ignoring this advice, as
833 long as you do not see lots of "Bottom-first field" warnings. With no
834 options it does normal inverse telecine. When this filter is used with
835 MPlayer, it will result in an uneven framerate during playback, but it is
836 still generally better than using pp=lb or no deinterlacing at all.
837 Multiple options can be specified separated by /.
840 Just like the crop filter, but faster, and works on mixed hard and
841 soft telecined content as well as when y is not a multiple of 4. If x
842 or y would require cropping fractional pixels from the chroma planes,
843 the crop area is extended. This usually means that x and y must be
847 For each ifps input frames the filter will output ofps frames. This
848 could be used to filter movies that are broadcast on TV at a frame
849 rate different from their original framerate.
852 If n is nonzero, the chroma plane is copied unchanged. This is useful
853 for YV12 sampled TV, which discards one of the chroma fields.
856 On x86, if n=1, use MMX2 optimized functions, if n=2, use 3DNow!
857 optimized functions, otherwise, use plain C. If this option is not
858 specified, MMX2 and 3DNow! are auto-detected, use this option to
859 override auto-detection.
862 The larger n will speed up the filter at the expense of accuracy. The
863 default value is n=3. If n is odd, a frame immediately following a
864 frame marked with the REPEAT_FIRST_FIELD MPEG flag is assumed to be
865 progressive, thus filter will not spend any time on soft-telecined
866 MPEG-2 content. This is the only effect of this flag if MMX2 or 3DNow!
867 is available. Without MMX2 and 3DNow, if n=0 or 1, the same
868 calculations will be used as with n=2 or 3. If n=2 or 3, the number of
869 luma levels used to find the frame breaks is reduced from 256 to 128,
870 which results in a faster filter without losing much accuracy. If n=4
871 or 5, a faster, but much less accurate metric will be used to find the
872 frame breaks, which is more likely to misdetect high vertical detail
873 as interlaced content.
876 If n is nonzero, print the detailed metrics for each frame. Useful for
880 Deinterlace threshold. Used during de-interlacing of unmatched frames.
881 Larger value means less deinterlacing, use n=256 to completely turn
882 off deinterlacing. Default is n=8.
885 Threshold for comparing a top and bottom fields. Defaults to 128.
888 Threshold to detect temporal change of a field. Default is 128.
891 Sum of Absolute Difference threshold, default is 64.
894 Inverse telecine for deinterlaced video. If 3:2-pulldown telecined video
895 has lost one of the fields or is deinterlaced using a method that keeps
896 one field and interpolates the other, the result is a juddering video that
897 has every fourth frame duplicated. This filter is intended to find and
898 drop those duplicates and restore the original film framerate. Two
899 different modes are available: One pass mode is the default and is
900 straightforward to use, but has the disadvantage that any changes in the
901 telecine phase (lost frames or bad edits) cause momentary judder until the
902 filter can resync again. Two pass mode avoids this by analyzing the whole
903 video beforehand so it will have forward knowledge about the phase changes
904 and can resync at the exact spot. These passes do *not* correspond to pass
905 one and two of the encoding process. You must run an extra pass using
906 divtc pass one before the actual encoding throwing the resulting video
907 away. Use ``--nosound --ovc=raw -o /dev/null`` to avoid wasting CPU power
908 for this pass. You may add something like ``crop=2:2:0:0`` after divtc to
909 speed things up even more. Then use divtc pass two for the actual
910 encoding. If you use multiple encoder passes, use divtc pass two for all
911 of them. The options are:
917 Set the two pass log filename (default: ``framediff.log``).
920 Set the minimum strength the telecine pattern must have for the filter
921 to believe in it (default: 0.5). This is used to avoid recognizing
922 false pattern from the parts of the video that are very dark or very
926 Set the number of past frames to look at when searching for pattern
927 (default: 30). Longer window improves the reliability of the pattern
928 search, but shorter window improves the reaction time to the changes
929 in the telecine phase. This only affects the one pass mode. The two
930 pass mode currently uses fixed window that extends to both future and
934 Sets the initial telecine phase for one pass mode (default: 0). The
935 two pass mode can see the future, so it is able to use the correct
936 phase from the beginning, but one pass mode can only guess. It catches
937 the correct phase when it finds it, but this option can be used to fix
938 the possible juddering at the beginning. The first pass of the two
939 pass mode also uses this, so if you save the output from the first
940 pass, you get constant phase result.
943 Set the deghosting threshold (0-255 for one pass mode, -255-255 for
944 two pass mode, default 0). If nonzero, deghosting mode is used. This
945 is for video that has been deinterlaced by blending the fields
946 together instead of dropping one of the fields. Deghosting amplifies
947 any compression artifacts in the blended frames, so the parameter
948 value is used as a threshold to exclude those pixels from deghosting
949 that differ from the previous frame less than specified value. If two
950 pass mode is used, then negative value can be used to make the filter
951 analyze the whole video in the beginning of pass-2 to determine
952 whether it needs deghosting or not and then select either zero or the
953 absolute value of the parameter. Specify this option for pass-2, it
954 makes no difference on pass-1.
956 phase[=t|b|p|a|u|T|B|A|U][:v]
957 Delay interlaced video by one field time so that the field order changes.
958 The intended use is to fix PAL movies that have been captured with the
959 opposite field order to the film-to-video transfer. The options are:
962 Capture field order top-first, transfer bottom-first. Filter will
963 delay the bottom field.
966 Capture bottom-first, transfer top-first. Filter will delay the top
970 Capture and transfer with the same field order. This mode only exists
971 for the documentation of the other options to refer to, but if you
972 actually select it, the filter will faithfully do nothing ;-)
975 Capture field order determined automatically by field flags, transfer
976 opposite. Filter selects among t and b modes on a frame by frame basis
977 using field flags. If no field information is available, then this
981 Capture unknown or varying, transfer opposite. Filter selects among t
982 and b on a frame by frame basis by analyzing the images and selecting
983 the alternative that produces best match between the fields.
986 Capture top-first, transfer unknown or varying. Filter selects among t
987 and p using image analysis.
990 Capture bottom-first, transfer unknown or varying. Filter selects
991 among b and p using image analysis.
994 Capture determined by field flags, transfer unknown or varying. Filter
995 selects among t, b and p using field flags and image analysis. If no
996 field information is available, then this works just like U. This is
1000 Both capture and transfer unknown or varying. Filter selects among t,
1001 b and p using image analysis only.
1004 Verbose operation. Prints the selected mode for each frame and the
1005 average squared difference between fields for t, b, and p
1009 Apply 3:2 'telecine' process to increase framerate by 20%. This most
1010 likely will not work correctly with MPlayer. The optional start parameter
1011 tells the filter where in the telecine pattern to start (0-3).
1014 Temporal field interlacing - merge pairs of frames into an interlaced
1015 frame, halving the framerate. Even frames are moved into the upper field,
1016 odd frames to the lower field. This can be used to fully reverse the
1017 effect of the tfields filter (in mode 0). Available modes are:
1019 :0: Move odd frames into the upper field, even into the lower field,
1020 generating a full-height frame at half framerate.
1021 :1: Only output odd frames, even frames are dropped; height unchanged.
1022 :2: Only output even frames, odd frames are dropped; height unchanged.
1023 :3: Expand each frame to full height, but pad alternate lines with black;
1024 framerate unchanged.
1025 :4: Interleave even lines from even frames with odd lines from odd frames.
1026 Height unchanged at half framerate.
1028 tfields[=mode[:field_dominance]]
1029 Temporal field separation - split fields into frames, doubling the output
1033 :0: Leave fields unchanged (will jump/flicker).
1034 :1: Interpolate missing lines. (The algorithm used might not be so
1036 :2: Translate fields by 1/4 pixel with linear interpolation (no jump).
1037 :4: Translate fields by 1/4 pixel with 4tap filter (higher quality)
1040 <field_dominance> (DEPRECATED)
1041 :-1: auto (default) Only works if the decoder exports the appropriate
1042 information and no other filters which discard that information
1043 come before tfields in the filter chain, otherwise it falls back
1044 to 0 (top field first).
1046 :1: bottom field first
1048 *NOTE*: This option will possibly be removed in a future version. Use
1049 ``--field-dominance`` instead.
1051 yadif=[mode[:field_dominance]]
1052 Yet another deinterlacing filter
1055 :0: Output 1 frame for each frame.
1056 :1: Output 1 frame for each field.
1057 :2: Like 0 but skips spatial interlacing check.
1058 :3: Like 1 but skips spatial interlacing check.
1060 <field_dominance> (DEPRECATED)
1061 Operates like tfields.
1063 *NOTE*: This option will possibly be removed in a future version. Use
1064 ``--field-dominance`` instead.
1066 boxblur=radius:power[:radius:power]
1070 blur filter strength
1072 number of filter applications
1074 sab=radius:pf:colorDiff[:radius:pf:colorDiff]
1078 blur filter strength (~0.1-4.0) (slower if larger)
1080 prefilter strength (~0.1-2.0)
1082 maximum difference between pixels to still be considered (~0.1-100.0)
1084 smartblur=radius:strength:threshold[:radius:strength:threshold]
1088 blur filter strength (~0.1-5.0) (slower if larger)
1090 blur (0.0-1.0) or sharpen (-1.0-0.0)
1092 filter all (0), filter flat areas (0-30) or filter edges (-30-0)
1094 perspective=x0:y0:x1:y1:x2:y2:x3:y3:t
1095 Correct the perspective of movies not filmed perpendicular to the screen.
1098 coordinates of the top left, top right, bottom left, bottom right
1101 linear (0) or cubic resampling (1)
1104 Scale and smooth the image with the 2x scale and interpolate algorithm.
1107 1bpp bitmap to YUV/BGR 8/15/16/32 conversion
1110 Reposition and resize stereoscopic images. Extracts both stereo fields and
1111 places them side by side, resizing them to maintain the original movie
1115 number of lines to select from the middle of the image (default: 12)
1117 bmovl=hidden:opaque:fifo
1118 The bitmap overlay filter reads bitmaps from a FIFO and displays them on
1119 top of the movie, allowing some transformations on the image. See also
1120 ``TOOLS/bmovl-test.c`` for a small bmovl test program.
1123 Set the default value of the 'hidden' flag (0=visible, 1=hidden).
1125 Set the default value of the 'opaque' flag (0=transparent, 1=opaque).
1127 path/filename for the FIFO (named pipe connecting ``mplayer
1128 --vf=bmovl`` to the controlling application)
1132 RGBA32 width height xpos ypos alpha clear
1133 followed by width*height*4 Bytes of raw RGBA32 data.
1134 ABGR32 width height xpos ypos alpha clear
1135 followed by width*height*4 Bytes of raw ABGR32 data.
1136 RGB24 width height xpos ypos alpha clear
1137 followed by width*height*3 Bytes of raw RGB24 data.
1138 BGR24 width height xpos ypos alpha clear
1139 followed by width*height*3 Bytes of raw BGR24 data.
1140 ALPHA width height xpos ypos alpha
1141 Change alpha transparency of the specified area.
1142 CLEAR width height xpos ypos
1145 Disable all alpha transparency. Send "ALPHA 0 0 0 0 0" to enable it
1157 Start blitting at position x/y.
1159 Set alpha difference. If you set this to -255 you can then send a
1160 sequence of ALPHA-commands to set the area to -225, -200, -175 etc for
1161 a nice fade-in-effect! ;)
1163 :0: same as original
1164 :255: Make everything opaque.
1165 :-255: Make everything transparent.
1168 Clear the framebuffer before blitting.
1170 :0: The image will just be blitted on top of the old one, so you do
1171 not need to send 1.8MB of RGBA32 data every time a small part of
1172 the screen is updated.
1176 Renders only every nth frame or every intra frame (keyframe).
1178 If you call the filter with I (uppercase) as the parameter, then *only*
1179 keyframes are rendered. For DVDs it generally means one in every 15/12
1180 frames (IBBPBBPBBPBBPBB), for AVI it means every scene change or every
1183 When a keyframe is found, an 'I!' string followed by a newline character
1184 is printed, leaving the current line of MPlayer output on the screen,
1185 because it contains the time (in seconds) and frame number of the keyframe
1186 (You can use this information to split the AVI.).
1188 If you call the filter with a numeric parameter 'step' then only one in
1189 every 'step' frames is rendered.
1191 If you put an 'i' (lowercase) before the number then an 'I!' is printed
1192 (like the I parameter).
1194 If you give only the i then nothing is done to the frames, only I! is
1197 tile=xtiles:ytiles:output:start:delta
1198 Tile a series of images into a single, bigger image. If you omit a
1199 parameter or use a value less than 0, then the default value is used. You
1200 can also stop when you are satisfied (``... --vf=tile=10:5 ...``). It is
1201 probably a good idea to put the scale filter before the tile :-)
1206 number of tiles on the x axis (default: 5)
1208 number of tiles on the y axis (default: 5)
1210 Render the tile when 'output' number of frames are reached, where
1211 'output' should be a number less than xtile * ytile. Missing tiles are
1212 left blank. You could, for example, write an 8 * 7 tile every 50
1213 frames to have one image every 2 seconds @ 25 fps.
1215 outer border thickness in pixels (default: 2)
1217 inner border thickness in pixels (default: 4)
1220 Suppresses a TV station logo by a simple interpolation of the surrounding
1221 pixels. Just set a rectangle covering the logo and watch it disappear (and
1222 sometimes something even uglier appear - your mileage may vary).
1225 top left corner of the logo
1227 width and height of the cleared rectangle
1229 Thickness of the fuzzy edge of the rectangle (added to w and h). When
1230 set to -1, a green rectangle is drawn on the screen to simplify
1231 finding the right x,y,w,h parameters.
1233 You can specify a text file to load the coordinates from. Each line
1234 must have a timestamp (in seconds, and in ascending order) and the
1235 "x:y:w:h:t" coordinates (*t* can be omitted).
1237 remove-logo=/path/to/logo_bitmap_file_name.pgm
1238 Suppresses a TV station logo, using a PGM or PPM image file to determine
1239 which pixels comprise the logo. The width and height of the image file
1240 must match those of the video stream being processed. Uses the filter
1241 image and a circular blur algorithm to remove the logo.
1243 ``/path/to/logo_bitmap_file_name.pgm``
1244 [path] + filename of the filter image.
1247 Allows acquiring screenshots of the movie using slave mode commands that
1248 can be bound to keypresses. See the slave mode documentation and the
1249 ``INTERACTIVE CONTROL`` section for details. Files named ``shotNNNN.png``
1250 will be saved in the working directory, using the first available number -
1251 no files will be overwritten. The filter has no overhead when not used. It
1252 does however break playback in some cases, especially VDPAU hardware
1253 decoding is incompatible with the filter. Thus it is not completely safe to
1254 add the filter to default configuration "just in case you might want to
1255 take screenshots". Make sure that the screenshot filter is added after all
1256 other filters whose effect you want to record on the saved image. E.g. it
1257 should be the last filter if you want to have an exact screenshot of what
1258 you see on the monitor.
1261 Moves SSA/ASS subtitle rendering to an arbitrary point in the filter
1262 chain. See the ``--ass`` option.
1266 ``--vf=ass,screenshot``
1267 Moves SSA/ASS rendering before the screenshot filter. Screenshots
1268 taken this way will contain subtitles.
1270 blackframe[=amount:threshold]
1271 Detect frames that are (almost) completely black. Can be useful to detect
1272 chapter transitions or commercials. Output lines consist of the frame
1273 number of the detected frame, the percentage of blackness, the frame type
1274 and the frame number of the last encountered keyframe.
1277 Percentage of the pixels that have to be below the threshold (default:
1281 Threshold below which a pixel value is considered black (default: 32).
1284 Stereo3d converts between different stereoscopic image formats.
1287 Stereoscopic image format of input. Possible values:
1289 sbsl or side_by_side_left_first
1290 side by side parallel (left eye left, right eye right)
1291 sbsr or side_by_side_right_first
1292 side by side crosseye (right eye left, left eye right)
1293 sbs2l or side_by_side_half_width_left_first
1294 side by side parallel with half width resolution (left eye left,
1296 sbs2r or side_by_side_half_width_right_first
1297 side by side crosseye with half width resolution (right eye left,
1299 abl or above_below_left_first
1300 above-below (left eye above, right eye below)
1301 abl or above_below_right_first
1302 above-below (right eye above, left eye below)
1303 ab2l or above_below_half_height_left_first
1304 above-below with half height resolution (left eye above, right eye
1306 ab2r or above_below_half_height_right_first
1307 above-below with half height resolution (right eye above, left eye
1311 Stereoscopic image format of output. Possible values are all the input
1314 arcg or anaglyph_red_cyan_gray
1315 anaglyph red/cyan gray (red filter on left eye, cyan filter on
1317 arch or anaglyph_red_cyan_half_color
1318 anaglyph red/cyan half colored (red filter on left eye, cyan filter
1320 arcc or anaglyph_red_cyan_color
1321 anaglyph red/cyan color (red filter on left eye, cyan filter on
1323 arcd or anaglyph_red_cyan_dubois
1324 anaglyph red/cyan color optimized with the least squares
1325 projection of dubois (red filter on left eye, cyan filter on right
1327 agmg or anaglyph_green_magenta_gray
1328 anaglyph green/magenta gray (green filter on left eye, magenta
1329 filter on right eye)
1330 agmh or anaglyph_green_magenta_half_color
1331 anaglyph green/magenta half colored (green filter on left eye,
1332 magenta filter on right eye)
1333 agmc or anaglyph_green_magenta_color
1334 anaglyph green/magenta colored (green filter on left eye, magenta
1335 filter on right eye)
1336 agmd or anaglyph_green_magenta_dubois
1337 anaglyph green/magenta colored optimized with the least squares
1338 projection of dubois (green filter on left eye, magenta filter on
1340 aybg or anaglyph_yellow_blue_gray
1341 anaglyph yellow/blue gray (yellow filter on left eye, blue filter
1343 aybh or anaglyph_yellow_blue_half_color
1344 anaglyph yellow/blue half colored (yellow filter on left eye, blue
1345 filter on right eye)
1346 aybc or anaglyph_yellow_blue_color
1347 anaglyph yellow/blue colored (yellow filter on left eye, blue
1348 filter on right eye)
1349 aybd or anaglyph_yellow_blue_dubois
1350 anaglyph yellow/blue colored optimized with the least squares
1351 projection of dubois (yellow filter on left eye, blue filter on
1353 irl or interleave_rows_left_first
1354 Interleaved rows (left eye has top row, right eye starts on next
1356 irr or interleave_rows_right_first
1357 Interleaved rows (right eye has top row, left eye starts on next
1360 mono output (left eye only)
1362 mono output (right eye only)
1364 gradfun[=strength[:radius]]
1365 Fix the banding artifacts that are sometimes introduced into nearly flat
1366 regions by truncation to 8bit colordepth. Interpolates the gradients that
1367 should go where the bands are, and dithers them.
1369 This filter is designed for playback only. Do not use it prior to lossy
1370 compression, because compression tends to lose the dither and bring back
1374 Maximum amount by which the filter will change any one pixel. Also the
1375 threshold for detecting nearly flat regions (default: 1.2).
1378 Neighborhood to fit the gradient to. Larger radius makes for smoother
1379 gradients, but also prevents the filter from modifying pixels near
1380 detailed regions (default: 16).
1383 Fixes the presentation timestamps (PTS) of the frames. By default, the PTS
1384 passed to the next filter is dropped, but the following options can change
1388 Print the incoming PTS.
1391 Specify a frame per second value.
1394 Specify an initial value for the PTS.
1397 Uses the *n*\th incoming PTS as the initial PTS. All previous PTS are
1398 kept, so setting a huge value or -1 keeps the PTS intact.
1401 Uses the *n*\th incoming PTS after the end of autostart to determine
1406 ``--vf=fixpts=fps=24000/1001,ass,fixpts``
1407 Generates a new sequence of PTS, uses it for ASS subtitles, then drops
1408 it. Generating a new sequence is useful when the timestamps are reset
1409 during the program; this is frequent on DVDs. Dropping it may be
1410 necessary to avoid confusing encoders.
1412 *NOTE*: Using this filter together with any sort of seeking (including
1413 ``--ss``) may make demons fly out of your nose.