FFmpeg Vignette Filter Guide: Custom Video Vignetting

This article explains how to use the FFmpeg vignette filter to apply and customize vignette effects on your videos. You will learn the basic command syntax, the key parameters used to control the shape and intensity of the vignette, and how to create dynamic, animated effects using expressions.

Basic Vignette Syntax

The simplest way to apply a vignette to a video is to use the default settings of the vignette filter. This darkens the edges of the video frame, creating a classic cinematic look.

ffmpeg -i input.mp4 -vf "vignette" output.mp4

Customizing the Vignette Parameters

To customize the vignette effect, you can adjust several parameters using the key-value syntax vignette=parameter1=value1:parameter2=value2.

The primary parameters are:

  • angle (or a): Controls the lens angle in radians. This determines how quickly the vignette darkens toward the edges. The default is PI/5 (approx. 0.62). Lower values make the vignette darker and closer to the center, while higher values push the darkness to the extreme outer edges.
  • x0 and y0: Sets the center coordinates of the vignette. By default, it is centered at the middle of the frame (w/2 and h/2).
  • aspect: Adjusts the aspect ratio of the vignette circle. By default, it matches the input video's aspect ratio. Set it to 1 for a perfect circle regardless of the video shape.
  • eval: Specifies when the expressions are evaluated. Set to init to evaluate once at the start (default), or frame to evaluate for every frame (required for animations).

Practical Examples

1. Creating a Strong, Dramatic Vignette

To make the vignette much more pronounced, reduce the angle value. This pulls the darkness further into the center of the frame.

ffmpeg -i input.mp4 -vf "vignette=angle=0.3" output.mp4

2. Off-Center Vignette

You can shift the focus of the vignette by changing the center coordinates (x0 and y0). This is useful if your subject is not in the middle of the frame. For example, to center the vignette on the top-left quadrant:

ffmpeg -i input.mp4 -vf "vignette=x0=w/4:y0=h/4" output.mp4

3. Creating a Perfect Circular Vignette

If you want a circular vignette on a widescreen video rather than an oval one, force the aspect ratio to 1:

ffmpeg -i input.mp4 -vf "vignette=aspect=1" output.mp4

4. Animated "Pulsing" Vignette

By setting eval=frame, you can use the time variable t to animate the vignette. The following command creates a pulsing vignette effect that expands and contracts over time:

ffmpeg -i input.mp4 -vf "vignette='angle=0.5+0.2*sin(t)':eval=frame" output.mp4