Introduction
FFmpeg provides over 300 video filters for processing, analyzing, and transforming video streams. This reference documents filters found in thelibavfilter/vf_*.c source files.
Filter Usage
Apply video filters using the-vf or -filter:v option:
Scaling and Resizing
scale
Scale the input video size and/or convert the image format. Parameters:w,width- Output width (can use expressions)h,height- Output height (can use expressions)flags- Scaling algorithm: fast_bilinear, bilinear, bicubic, lanczosinterl- Interlacing aware scalingin_color_matrix- Input color matrixout_color_matrix- Output color matrix
scale_cuda / scale_vulkan / scale_opencl
Hardware-accelerated scaling. Examples:Cropping and Padding
crop
Crop the input video. Parameters:w,out_w- Width of output (default: iw)h,out_h- Height of output (default: ih)x- Horizontal position of top-left cornery- Vertical position of top-left cornerkeep_aspect- Keep aspect ratioexact- Exact cropping for subsampled formats
pad
Add padding to video. Examples:cropdetect
Auto-detect crop parameters. Examples:Frame Rate and Timing
fps
Force constant framerate. Parameters:fps- Target frame rateround- Rounding method: zero, inf, down, up, nearstart_time- Start time offset
framerate
Upconvert framerate with motion interpolation. Examples:setpts
Change presentation timestamp. Examples:Deinterlacing
yadif
Yet Another Deinterlacing Filter. Examples:bwdif
Bob Weaver Deinterlacing Filter. Examples:w3fdif
Weston 3-field deinterlacing filter. Examples:bwdif_cuda / bwdif_vulkan
Hardware-accelerated deinterlacing. Examples:Color Correction
colorbalance
Adjust color balance. Examples:colorchannelmixer
Adjust color channels. Examples:colorcontrast
Adjust color contrast. Examples:colorcorrect
Adjust color correction. Examples:colorize
Colorize video. Examples:colorkey / colorkey_opencl
Chroma key (green screen) removal. Examples:colorlevels
Adjust color levels. Examples:colorspace / colorspace_cuda
Convert between color spaces. Examples:colortemperature
Adjust color temperature. Examples:curves
Adjust color curves. Examples:eq
Adjust brightness, contrast, saturation. Examples:hue
Adjust hue and saturation. Examples:Overlays and Composition
overlay
Overlay a video source on top of the input. Parameters:x,y- Position of overlayeof_action- Action at end: repeat, endall, passeval- When to evaluate position: init, frameformat- Pixel format: yuv420, yuv422, yuv444, rgb, etc.
blend
Blend two video streams. Examples:alphamerge
Merge alpha channel from another stream. Examples:Text and Graphics
drawtext
Draw text on video. Examples:drawbox
Draw colored box. Examples:drawgrid
Draw grid. Examples:Filters and Effects
blur / boxblur / avgblur
Blur video. Examples:unsharp
Sharpen or blur video. Examples:nlmeans
Non-local means denoising. Examples:hqdn3d
High quality 3D denoiser. Examples:atadenoise
Adaptive temporal averaging denoiser. Examples:denoise_vaapi
Hardware-accelerated denoising. Examples:Rotation and Transformation
rotate
Rotate the input image. Parameters:angle- Rotation angle in radiansout_w,ow- Output widthout_h,oh- Output heightfillcolor- Fill color for empty areas
transpose
Transpose video. Examples:hflip / vflip
Flip video horizontally or vertically. Examples:perspective
Correct perspective. Examples:Analysis and Detection
blackdetect
Detect black frames. Examples:blackframe
Detect frames that are mostly black. Examples:scenedetect / freezedetect
Detect scene changes or frozen frames. Examples:psnr / ssim
Calculate quality metrics. Examples:signalstats
Analyze video signal. Examples:histogram
Generate histogram. Examples:waveform / vectorscope
Generate waveform or vectorscope. Examples:Layout and Stacking
hstack / vstack
Stack videos horizontally or vertically. Examples:xstack
Stack videos in custom grid. Examples:Fade Effects
fade
Fade in/out video. Examples:Complete Video Filter List
FFmpeg includes over 300 video filters. Key filters fromlibavfilter/vf_*.c:
| Filter | Description |
|---|---|
| addroi | Add region of interest |
| alphamerge | Merge alpha channel |
| amplify | Amplify differences |
| aspect | Set aspect ratio |
| atadenoise | Temporal denoiser |
| avgblur | Average blur |
| backgroundkey | Background key removal |
| bbox | Detect bounding box |
| bilateral | Bilateral filter |
| bitplanenoise | Measure bit plane noise |
| blackdetect | Detect black frames |
| blackframe | Detect black frames |
| blend | Blend two videos |
| bm3d | Block-matching 3D denoiser |
| boxblur | Box blur |
| bwdif | Deinterlacer |
| cas | Contrast adaptive sharpening |
| chromakey | Chroma key |
| ciescope | CIE color diagram |
| codecview | Visualize codec info |
| colorbalance | Adjust colors |
| colorkey | Chroma key |
| colorlevels | Adjust color levels |
| colorspace | Color space conversion |
| convolution | Apply convolution |
| crop | Crop video |
| curves | Adjust color curves |
| datascope | Video data analyzer |
| dblur | Directional blur |
| deband | Remove banding |
| deflate / inflate | Deflate/inflate |
| dejudder | Remove judder |
| delogo | Remove logo |
| denoise | Denoise video |
| deshake | Stabilize video |
| despill | Remove spill |
| detelecine | Inverse telecine |
| dilation / erosion | Morphological ops |
| displace | Displace pixels |
| drawbox | Draw box |
| drawgrid | Draw grid |
| drawtext | Draw text |
| edgedetect | Detect edges |
| eq | Adjust brightness/contrast |
| extractplanes | Extract color planes |
| fade | Fade in/out |
| fftfilt | FFT filter |
| field | Extract fields |
| fieldorder | Set field order |
| fillborders | Fill borders |
| find_rect | Find rectangle |
| floodfill | Flood fill |
| format | Convert pixel format |
| fps | Change framerate |
| framepack | Pack stereoscopic |
| framerate | Interpolate framerate |
| freezedetect | Detect frozen frames |
| gblur | Gaussian blur |
| gradfun | Gradient deband |
| hflip | Flip horizontally |
| histogram | Generate histogram |
| hqdn3d | 3D denoiser |
| hqx | Scale by 2, 3, or 4 |
| hstack | Stack horizontally |
| hue | Adjust hue/saturation |
| hwupload / hwdownload | Hardware transfer |
| identity | Calculate identity |
| idet | Detect interlacing |
| il | Deinterleave/interleave |
| inflate | Inflate filter |
| interlace | Create interlaced |
| kerndeint | Kernel deinterlacer |
| lagfun | Lag effect |
| lenscorrection | Lens correction |
| libvmaf | VMAF quality metric |
| limiter | Limit pixels |
| loop | Loop video |
| lut / lut3d | Lookup table |
| maskedclamp | Clamp with mask |
| median | Median filter |
| mestimate | Motion estimation |
| minterpolate | Motion interpolation |
| mix | Mix frames |
| monochrome | Convert to monochrome |
| morpho | Morphological filter |
| mpdecimate | Drop duplicate frames |
| negate | Negate colors |
| nlmeans | Non-local means |
| nnedi | Neural network deinterlacer |
| noise | Add noise |
| normalize | Normalize colors |
| null | Pass through |
| oscilloscope | 2D oscilloscope |
| overlay | Overlay video |
| pad | Add padding |
| palette | Generate palette |
| perspective | Correct perspective |
| pixelize | Pixelize video |
| pp | Postprocessing |
| premultiply | Premultiply alpha |
| prewitt | Prewitt edge detection |
| pseudocolor | Pseudo color |
| psnr | Calculate PSNR |
| pullup | Inverse telecine |
| qp | Change QP |
| random | Random filter |
| readeia608 | Read EIA-608 captions |
| remap | Remap pixels |
| removegrain | Remove grain |
| removelogo | Remove logo |
| rotate | Rotate video |
| scale | Scale video |
| scale2ref | Scale to reference |
| scroll | Scroll video |
| select | Select frames |
| separatefields | Separate fields |
| setdar / setsar | Set aspect ratio |
| setfield | Set field type |
| setparams | Set parameters |
| shear | Shear video |
| showinfo | Show frame info |
| showpalette | Show palette |
| shuffleframes | Shuffle frames |
| shuffleplanes | Shuffle planes |
| signalstats | Signal statistics |
| smartblur | Smart blur |
| sobel | Sobel edge detection |
| split | Split stream |
| spp | Simple postprocessing |
| sr | Super resolution |
| ssim | Calculate SSIM |
| stereo3d | Stereoscopic conversion |
| streamselect | Select streams |
| super2xsai | Scale by 2x |
| swaprect | Swap rectangles |
| swapuv | Swap U and V |
| tblend | Temporal blend |
| telecine | Apply telecine |
| threshold | Threshold |
| thumbnail | Select thumbnail |
| tile | Tile video |
| tinterlace | Temporal interlace |
| tlut2 | 2-pass LUT |
| tmedian | Temporal median |
| tmix | Mix frames |
| tonemap | HDR to SDR |
| transpose | Transpose |
| trim | Trim video |
| unsharp | Sharpen/blur |
| untile | Untile |
| v360 | 360 video conversion |
| vaguedenoiser | Wavelet denoiser |
| vectorscope | Vectorscope |
| vflip | Flip vertically |
| vibrance | Boost saturation |
| vignette | Apply vignette |
| vmafmotion | VMAF motion |
| vstack | Stack vertically |
| w3fdif | Weston deinterlacer |
| waveform | Waveform monitor |
| weave | Weave fields |
| xbr | xBR scaler |
| xfade | Cross fade |
| xmedian | Cross median |
| xstack | Stack in grid |
| yadif | Deinterlacer |
| yaepblur | Yet another edge preserving blur |
| zoompan | Zoom and pan |
| zscale | Scale with zimg |
See Also
- Filter System Overview - General filter concepts
- Audio Filters - Audio filter reference
- Input Devices - Video input devices
- Output Devices - Video output devices