See llms.txt for all machine-readable content.

Back to Templates

Normalize audio loudness for broadcast standards with FFmpeg

Last update

Last update 4 days ago

Categories

Share


Quick Overview

This workflow collects an uploaded audio file via an n8n form and uses FFmpeg’s loudnorm filter to measure and normalize loudness to a selected LUFS target, returning the normalized audio file along with a parsed report of input/output loudness and true peak.

How it works

  1. Receives an audio file upload and a target loudness selection from an n8n Form Trigger.
  2. Creates a unique per-run temp directory and derives input/output file paths and the numeric LUFS target from the form submission.
  3. Writes the uploaded audio file to disk so it can be processed by FFmpeg.
  4. Runs FFmpeg with the loudnorm filter to measure input loudness/true peak and normalize the audio to the chosen LUFS target while outputting loudness stats as JSON.
  5. Parses FFmpeg’s loudnorm JSON stats from stderr into a clean report with input/output LUFS, input/output true peak, and the configured target.
  6. Reads the normalized audio file back from disk and outputs it together with the loudness report.

Setup

  1. Self-host n8n (n8n Cloud does not support Execute Command) and ensure the instance can run shell commands.
  2. Install FFmpeg on the host running n8n and make sure ffmpeg is available on the PATH.
  3. Start n8n with NODES_EXCLUDE="[]" and set N8N_RESTRICT_FILE_ACCESS_TO="/tmp" so the workflow can create and read files in /tmp.