How to Use the FFmpeg fspp Filter

This article provides a practical guide on how to use the fspp (Fast Simple Postprocessing) filter in FFmpeg to improve video quality. You will learn what the fspp filter is, how it works to reduce compression artifacts, and how to apply it to your video processing workflows using clear, real-world command-line examples.

What is the FFmpeg fspp Filter?

The fspp filter is a fast post-processing filter in FFmpeg designed to reduce compression artifacts—such as blocking, mosquito noise, and banding—commonly found in highly compressed videos (like MPEG-based formats). It is a faster, highly optimized version of the older spp (Simple Postprocessing) filter, making it ideal for real-time playback or faster encoding pipelines.

It works by applying a Discrete Cosine Transform (DCT) and Inverse Discrete Cosine Transform (IDCT) thresholding process to smooth out blocky edges while preserving the actual details of the video.

Syntax and Key Parameters

The basic syntax for applying the filter in a video filtergraph is:

-vf "fspp=parameter1=value1:parameter2=value2"

The filter accepts several optional parameters to customize its behavior:

Practical Command Examples

1. Basic Usage (Default Settings)

To apply the filter with its default settings to clean up a blocky video, use the following command:

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

2. Increasing the Quality and Strength

If you are dealing with a highly compressed, low-quality video, you can increase both the quality and the strength of the filter to aggressively smooth out artifacts:

ffmpeg -i input.mp4 -vf "fspp=quality=5:strength=10" output.mp4

3. Forcing a Constant Quantization Parameter

If your source video does not store QP information (which is common in some modern codecs or container formats), you can force the filter to use a specific QP value to control the intensity of the deblocking:

ffmpeg -i input.mp4 -vf "fspp=qp=25" output.mp4

Note: A higher QP value forces stronger deblocking, while a lower QP value keeps the filtering mild.

When Should You Use fspp?