Remove Clicks and Pops from Vinyl with FFmpeg adeclick
This article provides a straightforward guide on how to clean up
audio rips from old vinyl records by removing annoying clicks and pops
using FFmpeg’s built-in adeclick filter. You will learn the
basic command structure, the key parameters available for fine-tuning
the filter, and a practical example to get the best results for your
digital audio archive.
The Basic Command
FFmpeg includes a powerful audio filter called adeclick
(Audio Declick) designed specifically to detect and remove impulsive
noise like clicks, pops, and crackles.
The simplest way to apply this filter to an audio file (such as a WAV or FLAC rip) is by using the following command:
ffmpeg -i input.wav -af adeclick output.wavThis command reads input.wav, applies the
adeclick filter with its default settings, and saves the
cleaned audio to output.wav.
Fine-Tuning the adeclick Parameters
While the default settings work well for general noise, vinyl rips often require custom adjustments to target specific types of crackle without degrading the quality of the music. You can customize the filter using several parameters:
w(window): Sets the window size in milliseconds. The default is55. Smaller windows are better for short, sharp clicks, while larger windows help with longer pops.o(overlap): Sets the window overlap in percentage. The default is75. Higher overlap provides smoother interpolation but requires more processing power.a(arorder): Sets the autoregression order in percentage. The default is2. This controls the model complexity used to reconstruct the damaged audio.t(threshold): Sets the detection threshold. The default is2.0. Lowering this value (e.g., to1.2or1.5) makes the filter more sensitive, detecting quieter clicks. Setting it too low can mistake actual musical transients (like drum hits) for clicks.m(burst): Sets the burst mitigation percentage. The default is2.0. This helps control how the filter handles consecutive clicks.
Recommended Command for Vinyl Rips
For a typical vinyl record rip that suffers from moderate crackle and occasional louder pops, the following configuration is highly effective:
ffmpeg -i input.wav -af "adeclick=w=30:t=1.6:o=80" output.wavWhy these settings work:
w=30: A shorter window of 30 milliseconds helps isolate small, fast vinyl crackles without affecting the surrounding music.t=1.6: Lowering the threshold to 1.6 increases sensitivity, ensuring that quieter background surface noise is captured and removed.o=80: Increasing the overlap to 80% ensures a seamless transition when the filter reconstructs the audio where a click was removed.