
ffmpeg-normalize
CLI按 EBU R128 等响度标准批量统一音视频音量的命令行工具,内置播客、音乐、流媒体视频三种预设,适合课程录音、播客和视频发布前把音量调到一致。需要本机装好 FFmpeg 和 Python 3.10 以上。
ffmpeg-normalize
A utility for batch-normalizing audio using ffmpeg.
This program normalizes media files to a certain loudness level using the EBU R128 loudness normalization procedure. It can also perform RMS-based normalization (where the mean is lifted or attenuated), or peak normalization to a certain target level.
✨ Features
- EBU R128 loudness normalization — Two-pass by default, with an option for one-pass dynamic normalization
- RMS-based normalization — Adjust audio to a specific RMS level
- Peak normalization — Adjust audio to a specific peak level
- Selective audio stream normalization — Normalize specific audio streams or only default streams
- Skip files already at target — Avoid re-encoding files already within a threshold of the target level
- Before/after summary — Print a table of input and output levels and the applied gain for all files with
--print-summary - Self-documenting output — Optionally record the effective encoder settings as an
ENCODER_SETTINGStag - Video file support — Process video files while preserving video streams
- Docker support — Run via Docker container
- Python API — Use programmatically in your Python projects
- Shell completions — Available for bash, zsh, and fish
- Album Batch normalization – Process files jointly, preserving relative loudness
🚀 Quick Start
- Install a recent version of ffmpeg and Python 3.10 or higher
- Run
pip3 install ffmpeg-normalizeandffmpeg-normalize /path/to/your/file.mp4, alternatively installuvand runuvx ffmpeg-normalize /path/to/your/file.mp4 - Done! 🎧 (the normalized file will be called
normalized/file.mkv)
🆕 What's New
-
Version 1.42.0 can optionally write an
ENCODER_SETTINGStag on each normalized audio stream via--write-encoder-settings. The tag holds an ffmpeg-command-equivalent string — the audio codec, bitrate, sample rate and channels, plus the normalization filter including the measured loudnorm values — so a normalized file documents how it was produced. This is a Matroska/WebM convention and has no effect with--metadata-disable.Example:
ffmpeg-normalize input.wav -c:a libopus -b:a 128k --write-encoder-settings -o output.mkv -
Version 1.41.0 automatically picks the correct output audio codec for the output container, so you no longer need to specify
-c:a/--audio-codecunless you want to override the default. PCM is chosen for containers that support it; others will use teh default that ffmpeg picks. See the usage guide for details. -
Version 1.40.0 can optionally skip files that are already at the target level via
--threshold(e.g.--threshold 0.5, disabled by default). Such files are copied through unchanged instead of being re-encoded. The--print-statsoutput now includes a per-filestatus(normalized,skipped, orerror, plus anerrormessage on failure), and the exit code is non-zero if any file failed to process, so a script can tell what happened to each file.Example:
ffmpeg-normalize input.flac -nt peak -t 0 -c:a flac --print-stats -o output.flac -
Version 1.39.0 preserves the input bit depth by default when encoding to formats like FLAC, so 16-bit input stays 16-bit without needing
-e "-sample_fmt s16". Use--no-keep-bit-depthto opt out. It also adds--keep-mtimeto copy the input file's modification time to the output, which is useful for preserving when a track was added to a music library.Example:
ffmpeg-normalize input.flac -nt peak -t 0 -c:a flac --keep-mtime -o output.flac -
Version 1.38.0 writes the normalized output directly to the destination without using temporary files
-
Version 1.36.0 introduces presets with
--preset! Save and reuse your favorite normalization configurations for different use cases. Comes with three built-in presets:podcast(AES standard),music(RMS-based batch normalization), andstreaming-video(video content). Create custom presets too!Example:
ffmpeg-normalize input.mp3 --preset podcastapplies the podcast preset (EBU R128, -16 LUFS) to your file. Learn more in the presets guide.
-
Version 1.35.0 has batch/album normalization with
--batch. It preserves relative loudness between files! Perfect for music albums where you want to shift all tracks by the same amount.Example:
ffmpeg-normalize album/*.flac --batch -nt rms -t -20shifts the entire album so the average RMS is -20 dB, preserving the original relative loudness as mastered.
-
Version 1.34.0 brings selective audio stream normalization! You can now:
-
Normalize specific audio streams with
-as/--audio-streams(e.g.,-as 1,2to normalize only streams 1 and 2) -
Normalize only default audio streams with
--audio-default-only(useful for files with multiple language tracks) -
Keep other streams unchanged with
--keep-other-audio(copy non-selected streams without normalization)Example:
ffmpeg-normalize input.mkv -as 1 --keep-other-audionormalizes stream 1 and copies all other audio streams unchanged.
-
Other recent additions:
- Shell completions (v1.31.0) — Tab completion for bash, zsh, and fish shells. See the installation guide for setup instructions.
--lower-onlyoption — Prevent audio from increasing in loudness, only lower it if needed (works with all normalization types).
See the full changelog for all updates.
📓 Documentation
Check out our documentation for more info!
🤝 Contributors
The only reason this project exists in its current form is because @benjaoming's initial PRs. Thanks for everyone's support!
相关资源

claude-code-video-toolkit
Skill面向 Claude Code 的视频制作工作区:从写稿、AI 配音、配乐、生成画面到用 Remotion 渲染 MP4,内置讲解短视频、产品演示等模板。完整流程需克隆仓库并安装 Node.js 18+,AI 生成环节要自备云 GPU(如 Modal 的免费额度)。
digitalsamba/claude-code-video-toolkit2.3k
FFmpeg
CLI音视频转码、剪辑、拼接、抽帧与推流的命令行工具集,含 ffmpeg、ffprobe、ffplay,是 agent 处理媒体文件的基础依赖。GitHub 仓库为官方镜像。
FFmpeg/FFmpeg65.3k
ffmpeg-skill
Skill本地 FFmpeg 视频剪辑技能:用自然语言让 agent 剪切拼接、去静音、改竖屏、加字幕、统一响度,并按 TikTok、Reels、YouTube 规格导出,全程离线、无需 API Key。需要安装 ffmpeg 和 Python 3,也可作为 MCP 使用。
kajisho5/ffmpeg-skill2k
OpenMontage
Skill开源的 agent 视频制作系统:克隆仓库后在里面打开 Claude Code 或 Codex 说出需求,agent 按内置流程完成调研、脚本、配音、找素材、字幕与合成,出片前先给分镜和费用确认。需本地装 Python、Node.js 与 FFmpeg,不配 API Key 也能用免费素材出片。
calesthio/OpenMontage68.9k
video-use
SkillBrowser Use 出品的剪辑技能:把原始素材放进文件夹,和 Claude Code 或 Codex 对话就能出成片,自动删口头禅和停顿、调色、烧字幕、加动画并逐个剪点自检。需本地装 ffmpeg 与 Python(uv),并准备 ElevenLabs API Key 用于转写。
browser-use/video-use29.1k
Vox Director
Skill输入一个主题,agent 自动写分镜、生成纸片拼贴画面、动效、旁白、配乐和字幕,用 ffmpeg 合成 Vox 风格讲解或广告短片,中途让你确认分镜和画风。需要 Atlas Cloud 的 API Key(预充值、按量计费),本机装 ffmpeg 与 Python。
Alisa0808/vox-director2.3k