How to Use the FFmpeg Vignette Filter

This article provides a practical guide on how to use the vignette video filter in FFmpeg to create a classic vignette effect. You will learn the basic syntax, understand the key parameters such as angle, aspect ratio, and center coordinates, and explore real-world command-line examples to customize the shading intensity and position on your videos.

The vignette filter in FFmpeg points focus toward the center of the frame by gradually darkening the outer edges of the video. It is commonly used for artistic styling, simulating vintage camera lenses, or reducing distractions at the borders of a shot.

Basic Syntax

To apply the default vignette effect to a video, use the -vf (video filter) flag followed by vignette:

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

Key Parameters

You can customize the vignette by passing specific parameters in a key=value format, separated by colons.

Practical Examples

1. Creating a Stronger Vignette

To make the darkened borders more prominent, decrease the angle value.

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

2. Creating a Circular Vignette

By default, the vignette stretches to match the widescreen aspect ratio. To force a circular shape, set the aspect parameter to 1:

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

3. Shifting the Vignette Center

If your subject is not in the middle of the frame, you can move the center of the vignette using x0 and y0 coordinates:

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

4. Creating an Animated “Pulsing” Vignette

By setting eval=frame, you can use the time variable t to make the vignette animate over time. This command creates a pulsing heartbeat effect:

ffmpeg -i input.mp4 -vf "vignette='angle=0.4+0.15*sin(2*PI*t)':eval=frame" output.mp4