ffmpegaudiodynaudnormnormalizationfilter-guidebucket-doc

FFmpeg dynaudnorm Filter: Dynamic Audio Normalization Guide

·Javid Jamae·6 min read
FFmpeg dynaudnorm Filter: Dynamic Audio Normalization Guide

You're editing together clips from three different recording sessions, and every cut brings a jarring volume shift. One speaker whispers, the next shouts, and the background noise floor jumps around. You could run a two-pass loudnorm workflow targeting EBU R128, but that's designed for broadcast compliance, not general-purpose volume leveling.

FFmpeg's dynaudnorm filter solves this specific problem. It applies dynamic audio normalization frame-by-frame, adjusting gain in real time without requiring two-pass processing. You pass a single command, and it smooths out volume differences across your entire file.

How dynaudnorm Works

The dynaudnorm filter divides your audio into short frames, calculates the peak or RMS level of each frame, and applies a gain factor to bring that frame closer to a target level. A Gaussian-weighted smoothing window prevents abrupt gain changes between frames, so transitions sound natural rather than pumpy.

This is fundamentally different from loudnorm. The loudnorm filter measures integrated loudness across the entire file and applies a static correction to hit a target LUFS value (typically -14 or -16 LUFS for broadcast). It's the right tool for podcast distribution or broadcast delivery. dynaudnorm doesn't care about LUFS. It operates locally, frame by frame, making quiet parts louder and loud parts quieter relative to each other. That makes it better suited for normalizing volume across variable source material, call recordings, multi-speaker edits, or any content where the volume swings wildly within a single file.

Key Parameters

The dynaudnorm filter exposes several parameters that control its behavior. These are the ones that actually matter in practice.

framelen (f)

Frame length in milliseconds. Default is 500. Shorter values (75-150ms) make the filter more responsive to quick volume changes. Longer values (500ms+) produce smoother, more gradual adjustments. For speech content like podcasts, 150ms is a good starting point.

gausssize (g)

The Gaussian window size used for smoothing gain changes between frames. Default is 31, and it must be an odd number. Larger values create gentler transitions. Smaller values let the filter react faster but risk audible pumping artifacts. Values between 11 and 15 work well for most speech content.

maxgain (m)

Maximum gain factor applied to any frame. Default is 10, meaning the filter can boost a quiet frame by up to 10x. That's aggressive. For content with intentional quiet sections (pauses, silence between segments), set this to 3-5 to avoid amplifying room noise or breathing into something unnervingly loud.

peak (p)

Target peak value as a fraction of full scale. Default is 0.95. This acts as a safety ceiling to prevent clipping. There's rarely a reason to change this unless you need extra headroom for downstream processing.

targetrms (r)

When set (value between 0 and 1), the filter targets RMS level instead of peak level. This produces more perceptually consistent loudness since RMS correlates better with how humans perceive volume. A value around 0.5 works for most spoken-word content.

coupling (n)

Channel coupling, enabled by default. When coupled, all channels receive the same gain adjustment, preserving the stereo image. Disable this only if you have independent audio sources on separate channels that need individual normalization.

CLI Examples

Basic dynaudnorm with default settings:

ffmpeg -i input.mp4 -af dynaudnorm output.mp4

Tuned for podcast smoothing with shorter frames, tighter smoothing, and capped gain:

ffmpeg -i podcast.mp4 -af dynaudnorm=f=150:g=15:m=5 output.mp4

Aggressive normalization for content with extreme volume variation:

ffmpeg -i input.mp4 -af dynaudnorm=f=75:g=11:m=15:p=0.9 output.mp4

Chained with other filters to normalize volume, then clean up the frequency range:

ffmpeg -i input.mp4 -af dynaudnorm=f=150:g=15,highpass=f=200,lowpass=f=3000 output.mp4

Using dynaudnorm with the FFmpeg Micro API

If you're building automation workflows in n8n, Make.com, or your own backend, you don't need FFmpeg installed locally. The FFmpeg Micro API accepts the same filter syntax as a request parameter.

curl -X POST https://api.ffmpeg-micro.com/v1/transcodes \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "inputs": [{"url": "https://example.com/podcast-episode.mp4"}],
    "outputFormat": "mp4",
    "options": [
      {"option": "-af", "argument": "dynaudnorm=f=150:g=15:m=5"}
    ]
  }'

The API handles provisioning, processing, and storage. You pass in a source URL, specify your filter options, and get a normalized file back.

Common Pitfalls

Boosting silence into noise. With the default maxgain of 10, silent gaps between sentences get amplified dramatically. Background hiss, room tone, and breathing become distractingly loud. Set maxgain to 3-5 for speech content.

Using dynaudnorm for broadcast delivery. If your output needs to meet a specific loudness standard (Spotify's -14 LUFS, YouTube's -13 LUFS, broadcast -24 LUFS), dynaudnorm is the wrong filter. It doesn't target LUFS values. Use loudnorm for standards compliance.

Setting gausssize too low. A gausssize of 3 or 5 produces rapid gain changes that sound like the audio is "breathing" or pumping. Stay at 11 or above unless you have a specific reason to go lower.

Forgetting channel coupling with stereo music. Disabling coupling on stereo music causes independent gain adjustments per channel, which shifts the stereo image and sounds unnatural. Keep coupling enabled for any stereo source.

Over-processing with filter chains. Applying dynaudnorm after a compressor (or before another normalization filter) can create feedback-loop-like artifacts. Apply dynaudnorm first in your filter chain, then follow with EQ or noise reduction.

FAQ

What is the difference between dynaudnorm and loudnorm in FFmpeg?

The loudnorm filter targets a specific integrated loudness value (measured in LUFS) according to the EBU R128 standard and typically requires two-pass processing for accurate results. The dynaudnorm filter adjusts gain frame-by-frame in a single pass, leveling out volume differences dynamically without targeting a specific loudness standard. Use loudnorm for broadcast or platform compliance, and dynaudnorm for general-purpose volume leveling.

Does dynaudnorm require two-pass processing?

No. Unlike loudnorm, which benefits from a two-pass approach to measure integrated loudness before applying correction, dynaudnorm operates in a single pass. It analyzes and adjusts each frame in real time, which makes it simpler to use and faster to process.

What are the best dynaudnorm settings for podcasts?

Start with dynaudnorm=f=150:g=15:m=5. The 150ms frame length responds well to speech cadence, the Gaussian size of 15 smooths transitions without lagging, and capping max gain at 5 prevents silent pauses from getting amplified into noise.

Can dynaudnorm cause audio clipping?

The peak parameter (default 0.95) acts as a ceiling to prevent clipping. As long as you don't set peak to 1.0 or above, the filter keeps output levels below full scale. If you hear distortion, lower the peak value to 0.9 and reduce maxgain.

Can I use dynaudnorm in an automated workflow without installing FFmpeg?

Yes. The FFmpeg Micro API accepts dynaudnorm filter syntax as a request parameter, so you can integrate dynamic audio normalization into n8n, Make.com, or custom backend workflows through a simple HTTP call without managing FFmpeg installations.

Normalize Audio Without the Infrastructure

If you're processing audio at scale or building normalization into a product, running FFmpeg on your own servers means managing dependencies, scaling compute, and handling job queues. The FFmpeg Micro API runs dynaudnorm (and every other FFmpeg filter) as a stateless HTTP endpoint. Get a free API key and start normalizing audio in minutes.

About Javid Jamae

Founder & CEO at FFmpeg Micro

Javid is a software engineer, author, and entrepreneur with over 25 years of professional software development experience across enterprise, startup, and consulting environments. He founded FFmpeg Micro to make video processing accessible to developers through a simple, automation-first REST API.

Software EngineeringVideo ProcessingFFmpegCloud ArchitectureAPI DesignAutomation

Ready to process videos at scale?

Start using FFmpeg Micro's simple API today. No infrastructure required.

Get Started Free