Run a first pass with -af loudnorm=I=-23:TP=-1:LRA=7:print_format=json -f null /dev/null to measure the input's integrated loudness, true peak, and loudness range; capture the JSON output
Run a second pass using -af loudnorm=I=-23:TP=-1:LRA=7:measured_I=<first_pass_I>:measured_TP=<first_pass_TP>:measured_LRA=<first_pass_LRA>:measured_thresh=<first_pass_thresh>:linear=true to apply correction with higher accuracy than single-pass mode
Set the target integrated loudness (I) to -23 LUFS for broadcast (EBU R128) or -14 LUFS for streaming platforms; adjust TP (true peak ceiling) to -1 dBTP to leave headroom
Encode the loudness-normalized audio to AAC or the required codec in the same ffmpeg command
Verify the result with ffmpeg's astats filter or a third-party loudness meter to confirm the integrated loudness and true peak meet the target before delivery
Known gotchas
Single-pass loudnorm produces less accurate normalization than two-pass because it cannot look ahead; always use two-pass for offline encoding, reserving single-pass only for live processing
The loudnorm filter's default integrated loudness target is -24 LUFS; EBU R128 specifies -23 LUFS — you must set I=-23 explicitly or output will be 1 LU too quiet for broadcast compliance
loudnorm resamples audio internally to 192 kHz for processing; if your input sample rate is non-standard, add -ar 48000 after the filter to resample back to the delivery rate
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp