Skip to main content
Video filters let you modify the video stream before it reaches the video output. Filters are chained together, with each filter’s output feeding into the next.
Run mpv --vf=help to list all available built-in video filters. Most filters are available via the lavfi wrapper, which exposes all of libavfilter.
--vf takes a single video track as input. Filters requiring multiple inputs cannot be used with --vf. Use --lavfi-complex for multi-input filter graphs.

Filter chain syntax

The full syntax for a filter entry is:
Parameters are separated by : (not ,, which starts a new filter).

Labels and runtime toggling

Labels let you identify and control individual filters at runtime.
Toggle a filter at runtime using the vf command in the mpv console or via input bindings:
The ! prefix marks a filter as disabled by default. It is created but skipped, ready to be enabled at runtime.

Managing the filter list

lavfi — libavfilter wrapper

lavfi is the primary filter for most video processing tasks. It wraps FFmpeg’s libavfilter, giving you access to hundreds of filters.
The graph string uses the same syntax as the ffmpeg command line. Quote it with [ and ] to prevent parsing conflicts with mpv’s own syntax:
You can also use the lavfi- prefix to force the libavfilter bridge for any filter name:
If a filter name is not a built-in mpv filter, the lavfi-bridge is tried automatically. The bridge does not verify parameters before use and does not support help output.

Built-in filters

format

Applies video parameter overrides (pixel format, color matrix, color levels, etc.) with optional conversion.
Key parameters:

sub

Moves subtitle rendering to an arbitrary point in the filter chain, or forces subtitle rendering into the video stream instead of the video output’s OSD layer.
Parameters:
  • bottom-margin — Adds a black band at the bottom for subtitle placement
  • top-margin — Adds a black band at the top for toptitles

vapoursynth

Loads a VapourSynth filter script for streamed processing. Requires expert knowledge; use vspipe + a pipe for random-access processing instead.
Do not use this filter unless you have expert knowledge in VapourSynth and know how to fix bugs in the mpv VapourSynth wrapper.

Common use cases

Use libavfilter’s yadif (Yet Another DeInterlacing Filter) via lavfi:
For runtime toggling:
Move subtitle rendering before other filters, so subtitles are affected by color adjustments:
Use the format filter to adjust color metadata for incorrectly tagged content:
For HDR tonemapping in the renderer, prefer --vo=gpu-next with --target-colorspace-hint.

Filter help

For libavfilter filters, refer to the FFmpeg filter documentation.