How to Use the fspp Filter in FFmpeg
This guide explains how to use the fspp (Fast Simple
Post Processing) filter in FFmpeg to improve video quality. You will
learn what the filter does, its key parameters, and practical
command-line examples to reduce compression artifacts, banding, and
blockiness in your videos.
What is the fspp
Filter?
The fspp filter is a fast post-processing filter in
FFmpeg designed to reduce compression artifacts (such as blockiness and
ringing) from heavily compressed videos. It is a faster, optimized
alternative to the standard spp (Simple Post Processing)
filter. It works by applying a Discrete Cosine Transform (DCT) based
thresholding algorithm to smooth out unwanted noise while preserving
sharp edges.
Basic Syntax
To apply the fspp filter, use the -vf
(video filter) flag in your FFmpeg command:
ffmpeg -i input.mp4 -vf fspp output.mp4Key Parameters
You can customize the behavior of the fspp filter using
several parameters, passed as key=value pairs separated by
colons:
quality: Sets the quality of the post-processing.- Acceptable values:
4(good/default) or5(best quality, but slower).
- Acceptable values:
qp: Forces a constant quantization parameter (QP). If not specified, the filter uses the QP from the source video.strength: Adjusts the filter strength.- Range:
-15to32. The default is0(automatic based on QP). Higher values result in stronger deblocking but may blur fine details.
- Range:
use_bframe_qp: Enables or disables the use of B-frame QP.- Values:
0(disabled) or1(enabled, default).
- Values:
Practical Examples
1. Maximum Quality Deblocking
To get the highest quality deblocking and artifact reduction, set the
quality parameter to 5:
ffmpeg -i input.mp4 -vf fspp=quality=5 output.mp42. Increasing Filter Strength for Highly Compressed Videos
If your input video is highly pixelated or blocky, you can manually increase the filter strength:
ffmpeg -i input.mp4 -vf fspp=quality=4:strength=10 output.mp43. Forcing a Constant Quantization Parameter (QP)
If your input video lacks QP metadata (which is common with some modern web formats), you can force a QP value to make the filter work effectively:
ffmpeg -i input.mp4 -vf fspp=qp=25 output.mp4When to Use fspp
The fspp filter is highly effective when restoring
low-bitrate archive videos, old cell phone footage, or highly compressed
internet streams. Because it is computationally lighter than
spp and uspp, it is ideal for systems with
limited processing power.