Adjust Dynamic Expansion in FFmpeg Crystalizer
The FFmpeg crystalizer filter is a dynamic expansion
audio filter designed to accentuate differences in audio signals,
restoring or exaggerating punch and transients. This guide explains how
to adjust the intensity of the dynamic expansion using the filter's
built-in parameters, details the valid value ranges, and provides
practical command-line examples to help you fine-tune your audio
processing.
The Intensity Parameter
The dynamic expansion strength in the crystalizer filter
is controlled by the intensity parameter (shorthand
i).
- Default value:
2.0 - Range:
-10.0to10.0 - Behavior:
- Setting the value to
0.0applies no effect, leaving the audio unchanged. - Setting a positive value (between
0.1and10.0) expands the dynamic range, making loud parts louder and quiet transients sharper. The higher the number, the more aggressive the effect. - Setting a negative value (between
-0.1and-10.0) inverts the effect, acting as a dynamic compressor that softens transients and reduces dynamic range.
- Setting the value to
Basic Syntax
To use the filter with a custom intensity, specify the
-af (audio filter) flag followed by
crystalizer=i=VALUE or
crystalizer=intensity=VALUE.
ffmpeg -i input.mp3 -af "crystalizer=i=3.5" output.mp3Command Examples
1. Subtle Dynamic Expansion
If the default intensity of 2.0 sounds too harsh or
creates unnatural artifacts, reduce the intensity to a mild level such
as 1.0:
ffmpeg -i input.wav -af "crystalizer=intensity=1.0" output.wav2. Strong Expansion for Flat Audio
For heavily compressed or flat mixes where you want to drastically punch up percussive elements, you can increase the intensity above the default:
ffmpeg -i input.wav -af "crystalizer=intensity=5.0" output.wav3. Inverted Dynamic Expansion (Softening)
To decrease transients and smooth out audio dynamics:
ffmpeg -i input.wav -af "crystalizer=intensity=-2.0" output.wavManaging Audio Clipping
Increasing the expansion intensity frequently causes signal peaks to
exceed 0 dBFS, which can cause digital distortion. The
crystalizer filter includes a clipping parameter
(clipping or c) which is enabled
(1) by default to prevent hard overflow.
However, to prevent hard clipping artifacts caused by high intensity,
pair the filter with the volume or alimiter
filter:
ffmpeg -i input.wav -af "crystalizer=i=4.0,alimiter=limit=0.95" output.wav