ffmpeg-normalize 1.44.0__tar.gz → 1.45.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (20) hide show
  1. {ffmpeg_normalize-1.44.0 → ffmpeg_normalize-1.45.0}/PKG-INFO +34 -29
  2. {ffmpeg_normalize-1.44.0 → ffmpeg_normalize-1.45.0}/README.md +31 -25
  3. {ffmpeg_normalize-1.44.0 → ffmpeg_normalize-1.45.0}/pyproject.toml +3 -5
  4. {ffmpeg_normalize-1.44.0 → ffmpeg_normalize-1.45.0}/pyproject.toml.orig +3 -5
  5. {ffmpeg_normalize-1.44.0 → ffmpeg_normalize-1.45.0}/src/ffmpeg_normalize/__main__.py +89 -17
  6. {ffmpeg_normalize-1.44.0 → ffmpeg_normalize-1.45.0}/src/ffmpeg_normalize/_cmd_utils.py +125 -8
  7. ffmpeg_normalize-1.45.0/src/ffmpeg_normalize/_console.py +189 -0
  8. {ffmpeg_normalize-1.44.0 → ffmpeg_normalize-1.45.0}/src/ffmpeg_normalize/_ffmpeg_normalize.py +188 -71
  9. ffmpeg_normalize-1.45.0/src/ffmpeg_normalize/_logger.py +63 -0
  10. {ffmpeg_normalize-1.44.0 → ffmpeg_normalize-1.45.0}/src/ffmpeg_normalize/_media_file.py +19 -32
  11. {ffmpeg_normalize-1.44.0 → ffmpeg_normalize-1.45.0}/src/ffmpeg_normalize/_streams.py +7 -4
  12. ffmpeg_normalize-1.44.0/src/ffmpeg_normalize/_logger.py +0 -72
  13. {ffmpeg_normalize-1.44.0 → ffmpeg_normalize-1.45.0}/LICENSE.md +0 -0
  14. {ffmpeg_normalize-1.44.0 → ffmpeg_normalize-1.45.0}/src/ffmpeg_normalize/__init__.py +0 -0
  15. {ffmpeg_normalize-1.44.0 → ffmpeg_normalize-1.45.0}/src/ffmpeg_normalize/_errors.py +0 -0
  16. {ffmpeg_normalize-1.44.0 → ffmpeg_normalize-1.45.0}/src/ffmpeg_normalize/_presets.py +0 -0
  17. {ffmpeg_normalize-1.44.0 → ffmpeg_normalize-1.45.0}/src/ffmpeg_normalize/data/presets/music.json +0 -0
  18. {ffmpeg_normalize-1.44.0 → ffmpeg_normalize-1.45.0}/src/ffmpeg_normalize/data/presets/podcast.json +0 -0
  19. {ffmpeg_normalize-1.44.0 → ffmpeg_normalize-1.45.0}/src/ffmpeg_normalize/data/presets/streaming-video.json +0 -0
  20. {ffmpeg_normalize-1.44.0 → ffmpeg_normalize-1.45.0}/src/ffmpeg_normalize/py.typed +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ffmpeg-normalize
3
- Version: 1.44.0
3
+ Version: 1.45.0
4
4
  Summary: Normalize audio via ffmpeg
5
5
  Keywords: ffmpeg,normalize,audio
6
6
  Author: Werner Robitza
@@ -20,11 +20,10 @@ Classifier: Programming Language :: Python :: 3.12
20
20
  Classifier: Programming Language :: Python :: 3.13
21
21
  Classifier: Programming Language :: Python :: 3.14
22
22
  Classifier: Programming Language :: Python :: 3.15
23
- Requires-Dist: tqdm>=4.64.1
24
- Requires-Dist: colorama>=0.4.6 ; sys_platform == 'win32'
25
23
  Requires-Dist: ffmpeg-progress-yield>=1.0.1
26
- Requires-Dist: colorlog==6.7.0
27
24
  Requires-Dist: mutagen>=1.47.0
25
+ Requires-Dist: rich>=13.7.0
26
+ Requires-Dist: rich-argparse>=1.5.0
28
27
  Requires-Python: >=3.10
29
28
  Project-URL: Homepage, https://github.com/slhck/ffmpeg-normalize
30
29
  Project-URL: Repository, https://github.com/slhck/ffmpeg-normalize
@@ -41,7 +40,7 @@ Description-Content-Type: text/markdown
41
40
  ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/slhck/ffmpeg-normalize/python-package.yml)
42
41
 
43
42
  <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
44
- [![All Contributors](https://img.shields.io/badge/all_contributors-24-orange.svg?style=flat-square)](#contributors-)
43
+ [![All Contributors](https://img.shields.io/badge/all_contributors-25-orange.svg?style=flat-square)](#contributors-)
45
44
  <!-- ALL-CONTRIBUTORS-BADGE:END -->
46
45
 
47
46
  A utility for batch-normalizing audio using ffmpeg.
@@ -56,6 +55,7 @@ This program normalizes media files to a certain loudness level using the EBU R1
56
55
  - Selective audio stream normalization — Normalize specific audio streams or only default streams
57
56
  - Skip files already at target — Avoid re-encoding files already within a threshold of the target level
58
57
  - Before/after summary — Print a table of input and output levels and the applied gain for all files with `--print-summary`
58
+ - Friendly terminal output — Colored help and messages, progress bars in interactive terminals, and concise ffmpeg error messages
59
59
  - Self-documenting output — Optionally record the effective encoder settings as an `ENCODER_SETTINGS` tag
60
60
  - Video file support — Process video files while preserving video streams
61
61
  - Docker support — Run via Docker container
@@ -72,6 +72,10 @@ This program normalizes media files to a certain loudness level using the EBU R1
72
72
 
73
73
  ## 🆕 What's New
74
74
 
75
+ - Version 1.45.0 has a **refreshed terminal interface** based on [rich](https://github.com/Textualize/rich): colored `--help` output, colored log messages, progress bars with the current file name and ETA, and a formatted `--print-summary` table. When ffmpeg fails, only the root cause is shown (once), and `--debug` shows the full ffmpeg output for bug reports. Redirected output stays plain text, and the `LEVEL: message` log format is unchanged.
76
+
77
+ > ⚠️ **Breaking change:** Progress bars are now shown **by default** when stderr is an interactive terminal (unless `--quiet` is set). Non-interactive use, e.g. in scripts, cron jobs or with redirected output, is not affected. If you parse the output of an interactive session (for example via a pseudo-terminal), pass `--no-progress` to disable the bars. `-pr`/`--progress` still forces them on.
78
+
75
79
  - Version 1.42.0 can optionally write an **`ENCODER_SETTINGS`** tag 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`.
76
80
 
77
81
  Example:
@@ -155,36 +159,37 @@ The only reason this project exists in its current form is because [@benjaoming]
155
159
  <table>
156
160
  <tbody>
157
161
  <tr>
158
- <td align="center" valign="top" width="14.28%"><a href="https://overtag.dk/"><img src="https://avatars.githubusercontent.com/u/374612?v=4?s=100" width="100px;" alt="Benjamin Balder Bach"/><br /><sub><b>Benjamin Balder Bach</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=benjaoming" title="Code">💻</a></td>
159
- <td align="center" valign="top" width="14.28%"><a href="https://chaos.social/@eleni"><img src="https://avatars.githubusercontent.com/u/511547?v=4?s=100" width="100px;" alt="Eleni Lixourioti"/><br /><sub><b>Eleni Lixourioti</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=Geekfish" title="Code">💻</a></td>
160
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/thenewguy"><img src="https://avatars.githubusercontent.com/u/77731?v=4?s=100" width="100px;" alt="thenewguy"/><br /><sub><b>thenewguy</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=thenewguy" title="Code">💻</a></td>
161
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/aviolo"><img src="https://avatars.githubusercontent.com/u/560229?v=4?s=100" width="100px;" alt="Anthony Violo"/><br /><sub><b>Anthony Violo</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=aviolo" title="Code">💻</a></td>
162
- <td align="center" valign="top" width="14.28%"><a href="https://jacobs.af/"><img src="https://avatars.githubusercontent.com/u/952830?v=4?s=100" width="100px;" alt="Eric Jacobs"/><br /><sub><b>Eric Jacobs</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=jetpks" title="Code">💻</a></td>
163
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/kostalski"><img src="https://avatars.githubusercontent.com/u/34033008?v=4?s=100" width="100px;" alt="kostalski"/><br /><sub><b>kostalski</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=kostalski" title="Code">💻</a></td>
164
- <td align="center" valign="top" width="14.28%"><a href="http://justinppearson.com/"><img src="https://avatars.githubusercontent.com/u/8844823?v=4?s=100" width="100px;" alt="Justin Pearson"/><br /><sub><b>Justin Pearson</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=justinpearson" title="Code">💻</a></td>
162
+ <td align="center" valign="top" width="14.28%"><a href="https://overtag.dk/"><img src="https://avatars.githubusercontent.com/u/374612?v=4&size=100" width="100px" height="100px" alt="Benjamin Balder Bach"/><br /><sub><b>Benjamin Balder Bach</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=benjaoming" title="Code">💻</a></td>
163
+ <td align="center" valign="top" width="14.28%"><a href="https://chaos.social/@eleni"><img src="https://avatars.githubusercontent.com/u/511547?v=4&size=100" width="100px" height="100px" alt="Eleni Lixourioti"/><br /><sub><b>Eleni Lixourioti</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=Geekfish" title="Code">💻</a></td>
164
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/thenewguy"><img src="https://avatars.githubusercontent.com/u/77731?v=4&size=100" width="100px" height="100px" alt="thenewguy"/><br /><sub><b>thenewguy</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=thenewguy" title="Code">💻</a></td>
165
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/aviolo"><img src="https://avatars.githubusercontent.com/u/560229?v=4&size=100" width="100px" height="100px" alt="Anthony Violo"/><br /><sub><b>Anthony Violo</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=aviolo" title="Code">💻</a></td>
166
+ <td align="center" valign="top" width="14.28%"><a href="https://jacobs.af/"><img src="https://avatars.githubusercontent.com/u/952830?v=4&size=100" width="100px" height="100px" alt="Eric Jacobs"/><br /><sub><b>Eric Jacobs</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=jetpks" title="Code">💻</a></td>
167
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/kostalski"><img src="https://avatars.githubusercontent.com/u/34033008?v=4&size=100" width="100px" height="100px" alt="kostalski"/><br /><sub><b>kostalski</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=kostalski" title="Code">💻</a></td>
168
+ <td align="center" valign="top" width="14.28%"><a href="http://justinppearson.com/"><img src="https://avatars.githubusercontent.com/u/8844823?v=4&size=100" width="100px" height="100px" alt="Justin Pearson"/><br /><sub><b>Justin Pearson</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=justinpearson" title="Code">💻</a></td>
165
169
  </tr>
166
170
  <tr>
167
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/Nottt"><img src="https://avatars.githubusercontent.com/u/13532436?v=4?s=100" width="100px;" alt="ad90xa0-aa"/><br /><sub><b>ad90xa0-aa</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=Nottt" title="Code">💻</a></td>
168
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/Mathijsz"><img src="https://avatars.githubusercontent.com/u/1891187?v=4?s=100" width="100px;" alt="Mathijs"/><br /><sub><b>Mathijs</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=Mathijsz" title="Code">💻</a></td>
169
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/mpuels"><img src="https://avatars.githubusercontent.com/u/2924816?v=4?s=100" width="100px;" alt="Marc Püls"/><br /><sub><b>Marc Püls</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=mpuels" title="Code">💻</a></td>
170
- <td align="center" valign="top" width="14.28%"><a href="http://www.mvbattista.com/"><img src="https://avatars.githubusercontent.com/u/158287?v=4?s=100" width="100px;" alt="Michael V. Battista"/><br /><sub><b>Michael V. Battista</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=mvbattista" title="Code">💻</a></td>
171
- <td align="center" valign="top" width="14.28%"><a href="http://auto-editor.com"><img src="https://avatars.githubusercontent.com/u/57511737?v=4?s=100" width="100px;" alt="WyattBlue"/><br /><sub><b>WyattBlue</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=WyattBlue" title="Code">💻</a></td>
172
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/g3n35i5"><img src="https://avatars.githubusercontent.com/u/17593457?v=4?s=100" width="100px;" alt="Jan-Frederik Schmidt"/><br /><sub><b>Jan-Frederik Schmidt</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=g3n35i5" title="Code">💻</a></td>
173
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/mjhalwa"><img src="https://avatars.githubusercontent.com/u/8994014?v=4?s=100" width="100px;" alt="mjhalwa"/><br /><sub><b>mjhalwa</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=mjhalwa" title="Code">💻</a></td>
171
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/Nottt"><img src="https://avatars.githubusercontent.com/u/13532436?v=4&size=100" width="100px" height="100px" alt="ad90xa0-aa"/><br /><sub><b>ad90xa0-aa</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=Nottt" title="Code">💻</a></td>
172
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/Mathijsz"><img src="https://avatars.githubusercontent.com/u/1891187?v=4&size=100" width="100px" height="100px" alt="Mathijs"/><br /><sub><b>Mathijs</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=Mathijsz" title="Code">💻</a></td>
173
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/mpuels"><img src="https://avatars.githubusercontent.com/u/2924816?v=4&size=100" width="100px" height="100px" alt="Marc Püls"/><br /><sub><b>Marc Püls</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=mpuels" title="Code">💻</a></td>
174
+ <td align="center" valign="top" width="14.28%"><a href="http://www.mvbattista.com/"><img src="https://avatars.githubusercontent.com/u/158287?v=4&size=100" width="100px" height="100px" alt="Michael V. Battista"/><br /><sub><b>Michael V. Battista</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=mvbattista" title="Code">💻</a></td>
175
+ <td align="center" valign="top" width="14.28%"><a href="http://auto-editor.com"><img src="https://avatars.githubusercontent.com/u/57511737?v=4&size=100" width="100px" height="100px" alt="WyattBlue"/><br /><sub><b>WyattBlue</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=WyattBlue" title="Code">💻</a></td>
176
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/g3n35i5"><img src="https://avatars.githubusercontent.com/u/17593457?v=4&size=100" width="100px" height="100px" alt="Jan-Frederik Schmidt"/><br /><sub><b>Jan-Frederik Schmidt</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=g3n35i5" title="Code">💻</a></td>
177
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/mjhalwa"><img src="https://avatars.githubusercontent.com/u/8994014?v=4&size=100" width="100px" height="100px" alt="mjhalwa"/><br /><sub><b>mjhalwa</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=mjhalwa" title="Code">💻</a></td>
174
178
  </tr>
175
179
  <tr>
176
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/07416"><img src="https://avatars.githubusercontent.com/u/14923168?v=4?s=100" width="100px;" alt="07416"/><br /><sub><b>07416</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=07416" title="Documentation">📖</a></td>
177
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/sian1468"><img src="https://avatars.githubusercontent.com/u/58017832?v=4?s=100" width="100px;" alt="sian1468"/><br /><sub><b>sian1468</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=sian1468" title="Tests">⚠️</a></td>
178
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/psavva"><img src="https://avatars.githubusercontent.com/u/1454758?v=4?s=100" width="100px;" alt="Panayiotis Savva"/><br /><sub><b>Panayiotis Savva</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=psavva" title="Code">💻</a></td>
179
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/HighMans"><img src="https://avatars.githubusercontent.com/u/42877729?v=4?s=100" width="100px;" alt="HighMans"/><br /><sub><b>HighMans</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=HighMans" title="Code">💻</a></td>
180
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/kanjieater"><img src="https://avatars.githubusercontent.com/u/32607317?v=4?s=100" width="100px;" alt="kanjieater"/><br /><sub><b>kanjieater</b></sub></a><br /><a href="#ideas-kanjieater" title="Ideas, Planning, & Feedback">🤔</a></td>
181
- <td align="center" valign="top" width="14.28%"><a href="https://ahmetsait.com/"><img src="https://avatars.githubusercontent.com/u/8372246?v=4?s=100" width="100px;" alt="Ahmet Sait"/><br /><sub><b>Ahmet Sait</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=ahmetsait" title="Code">💻</a></td>
182
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/georgev93"><img src="https://avatars.githubusercontent.com/u/39860568?v=4?s=100" width="100px;" alt="georgev93"/><br /><sub><b>georgev93</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=georgev93" title="Code">💻</a></td>
180
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/07416"><img src="https://avatars.githubusercontent.com/u/14923168?v=4&size=100" width="100px" height="100px" alt="07416"/><br /><sub><b>07416</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=07416" title="Documentation">📖</a></td>
181
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/sian1468"><img src="https://avatars.githubusercontent.com/u/58017832?v=4&size=100" width="100px" height="100px" alt="sian1468"/><br /><sub><b>sian1468</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=sian1468" title="Tests">⚠️</a></td>
182
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/psavva"><img src="https://avatars.githubusercontent.com/u/1454758?v=4&size=100" width="100px" height="100px" alt="Panayiotis Savva"/><br /><sub><b>Panayiotis Savva</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=psavva" title="Code">💻</a></td>
183
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/HighMans"><img src="https://avatars.githubusercontent.com/u/42877729?v=4&size=100" width="100px" height="100px" alt="HighMans"/><br /><sub><b>HighMans</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=HighMans" title="Code">💻</a></td>
184
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/kanjieater"><img src="https://avatars.githubusercontent.com/u/32607317?v=4&size=100" width="100px" height="100px" alt="kanjieater"/><br /><sub><b>kanjieater</b></sub></a><br /><a href="#ideas-kanjieater" title="Ideas, Planning, & Feedback">🤔</a></td>
185
+ <td align="center" valign="top" width="14.28%"><a href="https://ahmetsait.com/"><img src="https://avatars.githubusercontent.com/u/8372246?v=4&size=100" width="100px" height="100px" alt="Ahmet Sait"/><br /><sub><b>Ahmet Sait</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=ahmetsait" title="Code">💻</a></td>
186
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/georgev93"><img src="https://avatars.githubusercontent.com/u/39860568?v=4&size=100" width="100px" height="100px" alt="georgev93"/><br /><sub><b>georgev93</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=georgev93" title="Code">💻</a></td>
183
187
  </tr>
184
188
  <tr>
185
- <td align="center" valign="top" width="14.28%"><a href="https://davidbern.com/"><img src="https://avatars.githubusercontent.com/u/371066?v=4?s=100" width="100px;" alt="David Bern"/><br /><sub><b>David Bern</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=odie5533" title="Code">💻</a></td>
186
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/randompersona1"><img src="https://avatars.githubusercontent.com/u/74961116?v=4?s=100" width="100px;" alt="randompersona1"/><br /><sub><b>randompersona1</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=randompersona1" title="Code">💻</a></td>
187
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/ppetr"><img src="https://avatars.githubusercontent.com/u/163061?v=4?s=100" width="100px;" alt="Petr"/><br /><sub><b>Petr</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=ppetr" title="Code">💻</a></td>
189
+ <td align="center" valign="top" width="14.28%"><a href="https://davidbern.com/"><img src="https://avatars.githubusercontent.com/u/371066?v=4&size=100" width="100px" height="100px" alt="David Bern"/><br /><sub><b>David Bern</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=odie5533" title="Code">💻</a></td>
190
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/randompersona1"><img src="https://avatars.githubusercontent.com/u/74961116?v=4&size=100" width="100px" height="100px" alt="randompersona1"/><br /><sub><b>randompersona1</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=randompersona1" title="Code">💻</a></td>
191
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/ppetr"><img src="https://avatars.githubusercontent.com/u/163061?v=4&size=100" width="100px" height="100px" alt="Petr"/><br /><sub><b>Petr</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=ppetr" title="Code">💻</a></td>
192
+ <td align="center" valign="top" width="14.28%"><a href="https://jayhemnani.in/"><img src="https://avatars.githubusercontent.com/u/193022578?v=4&size=100" width="100px" height="100px" alt="Jay Hemnani"/><br /><sub><b>Jay Hemnani</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=jayhemnani9910" title="Code">💻</a></td>
188
193
  </tr>
189
194
  </tbody>
190
195
  <tfoot>
@@ -9,7 +9,7 @@
9
9
  ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/slhck/ffmpeg-normalize/python-package.yml)
10
10
 
11
11
  <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
12
- [![All Contributors](https://img.shields.io/badge/all_contributors-24-orange.svg?style=flat-square)](#contributors-)
12
+ [![All Contributors](https://img.shields.io/badge/all_contributors-25-orange.svg?style=flat-square)](#contributors-)
13
13
  <!-- ALL-CONTRIBUTORS-BADGE:END -->
14
14
 
15
15
  A utility for batch-normalizing audio using ffmpeg.
@@ -24,6 +24,7 @@ This program normalizes media files to a certain loudness level using the EBU R1
24
24
  - Selective audio stream normalization — Normalize specific audio streams or only default streams
25
25
  - Skip files already at target — Avoid re-encoding files already within a threshold of the target level
26
26
  - Before/after summary — Print a table of input and output levels and the applied gain for all files with `--print-summary`
27
+ - Friendly terminal output — Colored help and messages, progress bars in interactive terminals, and concise ffmpeg error messages
27
28
  - Self-documenting output — Optionally record the effective encoder settings as an `ENCODER_SETTINGS` tag
28
29
  - Video file support — Process video files while preserving video streams
29
30
  - Docker support — Run via Docker container
@@ -40,6 +41,10 @@ This program normalizes media files to a certain loudness level using the EBU R1
40
41
 
41
42
  ## 🆕 What's New
42
43
 
44
+ - Version 1.45.0 has a **refreshed terminal interface** based on [rich](https://github.com/Textualize/rich): colored `--help` output, colored log messages, progress bars with the current file name and ETA, and a formatted `--print-summary` table. When ffmpeg fails, only the root cause is shown (once), and `--debug` shows the full ffmpeg output for bug reports. Redirected output stays plain text, and the `LEVEL: message` log format is unchanged.
45
+
46
+ > ⚠️ **Breaking change:** Progress bars are now shown **by default** when stderr is an interactive terminal (unless `--quiet` is set). Non-interactive use, e.g. in scripts, cron jobs or with redirected output, is not affected. If you parse the output of an interactive session (for example via a pseudo-terminal), pass `--no-progress` to disable the bars. `-pr`/`--progress` still forces them on.
47
+
43
48
  - Version 1.42.0 can optionally write an **`ENCODER_SETTINGS`** tag 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`.
44
49
 
45
50
  Example:
@@ -123,36 +128,37 @@ The only reason this project exists in its current form is because [@benjaoming]
123
128
  <table>
124
129
  <tbody>
125
130
  <tr>
126
- <td align="center" valign="top" width="14.28%"><a href="https://overtag.dk/"><img src="https://avatars.githubusercontent.com/u/374612?v=4?s=100" width="100px;" alt="Benjamin Balder Bach"/><br /><sub><b>Benjamin Balder Bach</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=benjaoming" title="Code">💻</a></td>
127
- <td align="center" valign="top" width="14.28%"><a href="https://chaos.social/@eleni"><img src="https://avatars.githubusercontent.com/u/511547?v=4?s=100" width="100px;" alt="Eleni Lixourioti"/><br /><sub><b>Eleni Lixourioti</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=Geekfish" title="Code">💻</a></td>
128
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/thenewguy"><img src="https://avatars.githubusercontent.com/u/77731?v=4?s=100" width="100px;" alt="thenewguy"/><br /><sub><b>thenewguy</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=thenewguy" title="Code">💻</a></td>
129
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/aviolo"><img src="https://avatars.githubusercontent.com/u/560229?v=4?s=100" width="100px;" alt="Anthony Violo"/><br /><sub><b>Anthony Violo</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=aviolo" title="Code">💻</a></td>
130
- <td align="center" valign="top" width="14.28%"><a href="https://jacobs.af/"><img src="https://avatars.githubusercontent.com/u/952830?v=4?s=100" width="100px;" alt="Eric Jacobs"/><br /><sub><b>Eric Jacobs</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=jetpks" title="Code">💻</a></td>
131
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/kostalski"><img src="https://avatars.githubusercontent.com/u/34033008?v=4?s=100" width="100px;" alt="kostalski"/><br /><sub><b>kostalski</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=kostalski" title="Code">💻</a></td>
132
- <td align="center" valign="top" width="14.28%"><a href="http://justinppearson.com/"><img src="https://avatars.githubusercontent.com/u/8844823?v=4?s=100" width="100px;" alt="Justin Pearson"/><br /><sub><b>Justin Pearson</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=justinpearson" title="Code">💻</a></td>
131
+ <td align="center" valign="top" width="14.28%"><a href="https://overtag.dk/"><img src="https://avatars.githubusercontent.com/u/374612?v=4&size=100" width="100px" height="100px" alt="Benjamin Balder Bach"/><br /><sub><b>Benjamin Balder Bach</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=benjaoming" title="Code">💻</a></td>
132
+ <td align="center" valign="top" width="14.28%"><a href="https://chaos.social/@eleni"><img src="https://avatars.githubusercontent.com/u/511547?v=4&size=100" width="100px" height="100px" alt="Eleni Lixourioti"/><br /><sub><b>Eleni Lixourioti</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=Geekfish" title="Code">💻</a></td>
133
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/thenewguy"><img src="https://avatars.githubusercontent.com/u/77731?v=4&size=100" width="100px" height="100px" alt="thenewguy"/><br /><sub><b>thenewguy</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=thenewguy" title="Code">💻</a></td>
134
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/aviolo"><img src="https://avatars.githubusercontent.com/u/560229?v=4&size=100" width="100px" height="100px" alt="Anthony Violo"/><br /><sub><b>Anthony Violo</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=aviolo" title="Code">💻</a></td>
135
+ <td align="center" valign="top" width="14.28%"><a href="https://jacobs.af/"><img src="https://avatars.githubusercontent.com/u/952830?v=4&size=100" width="100px" height="100px" alt="Eric Jacobs"/><br /><sub><b>Eric Jacobs</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=jetpks" title="Code">💻</a></td>
136
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/kostalski"><img src="https://avatars.githubusercontent.com/u/34033008?v=4&size=100" width="100px" height="100px" alt="kostalski"/><br /><sub><b>kostalski</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=kostalski" title="Code">💻</a></td>
137
+ <td align="center" valign="top" width="14.28%"><a href="http://justinppearson.com/"><img src="https://avatars.githubusercontent.com/u/8844823?v=4&size=100" width="100px" height="100px" alt="Justin Pearson"/><br /><sub><b>Justin Pearson</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=justinpearson" title="Code">💻</a></td>
133
138
  </tr>
134
139
  <tr>
135
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/Nottt"><img src="https://avatars.githubusercontent.com/u/13532436?v=4?s=100" width="100px;" alt="ad90xa0-aa"/><br /><sub><b>ad90xa0-aa</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=Nottt" title="Code">💻</a></td>
136
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/Mathijsz"><img src="https://avatars.githubusercontent.com/u/1891187?v=4?s=100" width="100px;" alt="Mathijs"/><br /><sub><b>Mathijs</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=Mathijsz" title="Code">💻</a></td>
137
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/mpuels"><img src="https://avatars.githubusercontent.com/u/2924816?v=4?s=100" width="100px;" alt="Marc Püls"/><br /><sub><b>Marc Püls</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=mpuels" title="Code">💻</a></td>
138
- <td align="center" valign="top" width="14.28%"><a href="http://www.mvbattista.com/"><img src="https://avatars.githubusercontent.com/u/158287?v=4?s=100" width="100px;" alt="Michael V. Battista"/><br /><sub><b>Michael V. Battista</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=mvbattista" title="Code">💻</a></td>
139
- <td align="center" valign="top" width="14.28%"><a href="http://auto-editor.com"><img src="https://avatars.githubusercontent.com/u/57511737?v=4?s=100" width="100px;" alt="WyattBlue"/><br /><sub><b>WyattBlue</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=WyattBlue" title="Code">💻</a></td>
140
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/g3n35i5"><img src="https://avatars.githubusercontent.com/u/17593457?v=4?s=100" width="100px;" alt="Jan-Frederik Schmidt"/><br /><sub><b>Jan-Frederik Schmidt</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=g3n35i5" title="Code">💻</a></td>
141
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/mjhalwa"><img src="https://avatars.githubusercontent.com/u/8994014?v=4?s=100" width="100px;" alt="mjhalwa"/><br /><sub><b>mjhalwa</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=mjhalwa" title="Code">💻</a></td>
140
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/Nottt"><img src="https://avatars.githubusercontent.com/u/13532436?v=4&size=100" width="100px" height="100px" alt="ad90xa0-aa"/><br /><sub><b>ad90xa0-aa</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=Nottt" title="Code">💻</a></td>
141
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/Mathijsz"><img src="https://avatars.githubusercontent.com/u/1891187?v=4&size=100" width="100px" height="100px" alt="Mathijs"/><br /><sub><b>Mathijs</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=Mathijsz" title="Code">💻</a></td>
142
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/mpuels"><img src="https://avatars.githubusercontent.com/u/2924816?v=4&size=100" width="100px" height="100px" alt="Marc Püls"/><br /><sub><b>Marc Püls</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=mpuels" title="Code">💻</a></td>
143
+ <td align="center" valign="top" width="14.28%"><a href="http://www.mvbattista.com/"><img src="https://avatars.githubusercontent.com/u/158287?v=4&size=100" width="100px" height="100px" alt="Michael V. Battista"/><br /><sub><b>Michael V. Battista</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=mvbattista" title="Code">💻</a></td>
144
+ <td align="center" valign="top" width="14.28%"><a href="http://auto-editor.com"><img src="https://avatars.githubusercontent.com/u/57511737?v=4&size=100" width="100px" height="100px" alt="WyattBlue"/><br /><sub><b>WyattBlue</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=WyattBlue" title="Code">💻</a></td>
145
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/g3n35i5"><img src="https://avatars.githubusercontent.com/u/17593457?v=4&size=100" width="100px" height="100px" alt="Jan-Frederik Schmidt"/><br /><sub><b>Jan-Frederik Schmidt</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=g3n35i5" title="Code">💻</a></td>
146
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/mjhalwa"><img src="https://avatars.githubusercontent.com/u/8994014?v=4&size=100" width="100px" height="100px" alt="mjhalwa"/><br /><sub><b>mjhalwa</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=mjhalwa" title="Code">💻</a></td>
142
147
  </tr>
143
148
  <tr>
144
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/07416"><img src="https://avatars.githubusercontent.com/u/14923168?v=4?s=100" width="100px;" alt="07416"/><br /><sub><b>07416</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=07416" title="Documentation">📖</a></td>
145
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/sian1468"><img src="https://avatars.githubusercontent.com/u/58017832?v=4?s=100" width="100px;" alt="sian1468"/><br /><sub><b>sian1468</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=sian1468" title="Tests">⚠️</a></td>
146
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/psavva"><img src="https://avatars.githubusercontent.com/u/1454758?v=4?s=100" width="100px;" alt="Panayiotis Savva"/><br /><sub><b>Panayiotis Savva</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=psavva" title="Code">💻</a></td>
147
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/HighMans"><img src="https://avatars.githubusercontent.com/u/42877729?v=4?s=100" width="100px;" alt="HighMans"/><br /><sub><b>HighMans</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=HighMans" title="Code">💻</a></td>
148
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/kanjieater"><img src="https://avatars.githubusercontent.com/u/32607317?v=4?s=100" width="100px;" alt="kanjieater"/><br /><sub><b>kanjieater</b></sub></a><br /><a href="#ideas-kanjieater" title="Ideas, Planning, & Feedback">🤔</a></td>
149
- <td align="center" valign="top" width="14.28%"><a href="https://ahmetsait.com/"><img src="https://avatars.githubusercontent.com/u/8372246?v=4?s=100" width="100px;" alt="Ahmet Sait"/><br /><sub><b>Ahmet Sait</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=ahmetsait" title="Code">💻</a></td>
150
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/georgev93"><img src="https://avatars.githubusercontent.com/u/39860568?v=4?s=100" width="100px;" alt="georgev93"/><br /><sub><b>georgev93</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=georgev93" title="Code">💻</a></td>
149
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/07416"><img src="https://avatars.githubusercontent.com/u/14923168?v=4&size=100" width="100px" height="100px" alt="07416"/><br /><sub><b>07416</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=07416" title="Documentation">📖</a></td>
150
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/sian1468"><img src="https://avatars.githubusercontent.com/u/58017832?v=4&size=100" width="100px" height="100px" alt="sian1468"/><br /><sub><b>sian1468</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=sian1468" title="Tests">⚠️</a></td>
151
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/psavva"><img src="https://avatars.githubusercontent.com/u/1454758?v=4&size=100" width="100px" height="100px" alt="Panayiotis Savva"/><br /><sub><b>Panayiotis Savva</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=psavva" title="Code">💻</a></td>
152
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/HighMans"><img src="https://avatars.githubusercontent.com/u/42877729?v=4&size=100" width="100px" height="100px" alt="HighMans"/><br /><sub><b>HighMans</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=HighMans" title="Code">💻</a></td>
153
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/kanjieater"><img src="https://avatars.githubusercontent.com/u/32607317?v=4&size=100" width="100px" height="100px" alt="kanjieater"/><br /><sub><b>kanjieater</b></sub></a><br /><a href="#ideas-kanjieater" title="Ideas, Planning, & Feedback">🤔</a></td>
154
+ <td align="center" valign="top" width="14.28%"><a href="https://ahmetsait.com/"><img src="https://avatars.githubusercontent.com/u/8372246?v=4&size=100" width="100px" height="100px" alt="Ahmet Sait"/><br /><sub><b>Ahmet Sait</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=ahmetsait" title="Code">💻</a></td>
155
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/georgev93"><img src="https://avatars.githubusercontent.com/u/39860568?v=4&size=100" width="100px" height="100px" alt="georgev93"/><br /><sub><b>georgev93</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=georgev93" title="Code">💻</a></td>
151
156
  </tr>
152
157
  <tr>
153
- <td align="center" valign="top" width="14.28%"><a href="https://davidbern.com/"><img src="https://avatars.githubusercontent.com/u/371066?v=4?s=100" width="100px;" alt="David Bern"/><br /><sub><b>David Bern</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=odie5533" title="Code">💻</a></td>
154
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/randompersona1"><img src="https://avatars.githubusercontent.com/u/74961116?v=4?s=100" width="100px;" alt="randompersona1"/><br /><sub><b>randompersona1</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=randompersona1" title="Code">💻</a></td>
155
- <td align="center" valign="top" width="14.28%"><a href="https://github.com/ppetr"><img src="https://avatars.githubusercontent.com/u/163061?v=4?s=100" width="100px;" alt="Petr"/><br /><sub><b>Petr</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=ppetr" title="Code">💻</a></td>
158
+ <td align="center" valign="top" width="14.28%"><a href="https://davidbern.com/"><img src="https://avatars.githubusercontent.com/u/371066?v=4&size=100" width="100px" height="100px" alt="David Bern"/><br /><sub><b>David Bern</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=odie5533" title="Code">💻</a></td>
159
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/randompersona1"><img src="https://avatars.githubusercontent.com/u/74961116?v=4&size=100" width="100px" height="100px" alt="randompersona1"/><br /><sub><b>randompersona1</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=randompersona1" title="Code">💻</a></td>
160
+ <td align="center" valign="top" width="14.28%"><a href="https://github.com/ppetr"><img src="https://avatars.githubusercontent.com/u/163061?v=4&size=100" width="100px" height="100px" alt="Petr"/><br /><sub><b>Petr</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=ppetr" title="Code">💻</a></td>
161
+ <td align="center" valign="top" width="14.28%"><a href="https://jayhemnani.in/"><img src="https://avatars.githubusercontent.com/u/193022578?v=4&size=100" width="100px" height="100px" alt="Jay Hemnani"/><br /><sub><b>Jay Hemnani</b></sub></a><br /><a href="https://github.com/slhck/ffmpeg-normalize/commits?author=jayhemnani9910" title="Code">💻</a></td>
156
162
  </tr>
157
163
  </tbody>
158
164
  <tfoot>
@@ -4,7 +4,7 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "ffmpeg-normalize"
7
- version = "1.44.0"
7
+ version = "1.45.0"
8
8
  description = "Normalize audio via ffmpeg"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -31,11 +31,10 @@ classifiers = [
31
31
  ]
32
32
  requires-python = ">=3.10"
33
33
  dependencies = [
34
- "tqdm>=4.64.1",
35
- "colorama>=0.4.6; platform_system=='Windows'",
36
34
  "ffmpeg-progress-yield>=1.0.1",
37
- "colorlog==6.7.0",
38
35
  "mutagen>=1.47.0",
36
+ "rich>=13.7.0",
37
+ "rich-argparse>=1.5.0",
39
38
  ]
40
39
 
41
40
  [[project.authors]]
@@ -63,7 +62,6 @@ too-many-positional-arguments = "warn"
63
62
  dev = [
64
63
  "pytest>=9.0.3",
65
64
  "ruff>=0.12.11",
66
- "types-tqdm",
67
65
  "shtab>=1.7.0",
68
66
  "ty>=0.0.24",
69
67
  ]
@@ -4,7 +4,7 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "ffmpeg-normalize"
7
- version = "1.44.0"
7
+ version = "1.45.0"
8
8
  description = "Normalize audio via ffmpeg"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -30,11 +30,10 @@ classifiers = [
30
30
  ]
31
31
  requires-python = ">=3.10"
32
32
  dependencies = [
33
- "tqdm>=4.64.1",
34
- "colorama>=0.4.6; platform_system=='Windows'",
35
33
  "ffmpeg-progress-yield>=1.0.1",
36
- "colorlog==6.7.0",
37
34
  "mutagen>=1.47.0",
35
+ "rich>=13.7.0",
36
+ "rich-argparse>=1.5.0",
38
37
  ]
39
38
 
40
39
  [project.urls]
@@ -52,7 +51,6 @@ package-data = {"ffmpeg_normalize" = ["data/**/*.json"]}
52
51
  dev = [
53
52
  "pytest>=9.0.3",
54
53
  "ruff>=0.12.11",
55
- "types-tqdm",
56
54
  "shtab>=1.7.0",
57
55
  "ty>=0.0.24",
58
56
  ]
@@ -13,6 +13,11 @@ import textwrap
13
13
  from json.decoder import JSONDecodeError
14
14
  from typing import NoReturn
15
15
 
16
+ from rich.console import Console
17
+ from rich.markup import escape
18
+ from rich_argparse import RawTextRichHelpFormatter
19
+
20
+ from ._console import get_console
16
21
  from ._errors import FFmpegNormalizeError
17
22
  from ._ffmpeg_normalize import NORMALIZATION_TYPES, FFmpegNormalize
18
23
  from ._logger import setup_cli_logger
@@ -20,7 +25,22 @@ from ._presets import PresetManager
20
25
 
21
26
  __version__ = importlib.metadata.version("ffmpeg-normalize")
22
27
 
23
- _logger = logging.getLogger(__name__)
28
+ _logger = logging.getLogger("ffmpeg_normalize.__main__")
29
+
30
+
31
+ class HelpFormatter(RawTextRichHelpFormatter):
32
+ """Colored help output that keeps the manual line breaks of the help texts."""
33
+
34
+ group_name_formatter = str
35
+ styles = {
36
+ **RawTextRichHelpFormatter.styles,
37
+ "argparse.groups": "bold yellow",
38
+ "argparse.args": "cyan",
39
+ "argparse.metavar": "dark_cyan",
40
+ "argparse.prog": "bold green",
41
+ "argparse.syntax": "bold",
42
+ "argparse.text": "default",
43
+ }
24
44
 
25
45
 
26
46
  def create_parser(suppress_defaults: bool = False) -> argparse.ArgumentParser:
@@ -34,7 +54,7 @@ def create_parser(suppress_defaults: bool = False) -> argparse.ArgumentParser:
34
54
  # manually overridden because argparse generates the wrong order of arguments, see:
35
55
  # https://github.com/slhck/ffmpeg-normalize/issues/132#issuecomment-662516535
36
56
  usage="%(prog)s INPUT [INPUT ...] [-o OUTPUT [OUTPUT ...]] [options]",
37
- formatter_class=argparse.RawTextHelpFormatter,
57
+ formatter_class=HelpFormatter,
38
58
  epilog=textwrap.dedent(
39
59
  """\
40
60
  The program additionally respects environment variables:
@@ -132,8 +152,26 @@ def create_parser(suppress_defaults: bool = False) -> argparse.ArgumentParser:
132
152
  group_general.add_argument(
133
153
  "-pr",
134
154
  "--progress",
135
- action="store_true",
136
- help="Show progress bar for files and streams",
155
+ action="store_const",
156
+ const=True,
157
+ dest="progress",
158
+ default=None,
159
+ help=textwrap.dedent(
160
+ """\
161
+ Show progress bars for files and streams.
162
+
163
+ Enabled by default when stderr is an interactive terminal and
164
+ `--quiet` is not set; disabled otherwise (e.g. in scripts or when
165
+ output is redirected). Use this option to force progress output.
166
+ """
167
+ ),
168
+ )
169
+ group_general.add_argument(
170
+ "--no-progress",
171
+ action="store_const",
172
+ const=False,
173
+ dest="progress",
174
+ help="Do not show progress bars, even in an interactive terminal",
137
175
  )
138
176
  group_general.add_argument(
139
177
  "--version",
@@ -702,7 +740,8 @@ def create_parser(suppress_defaults: bool = False) -> argparse.ArgumentParser:
702
740
 
703
741
 
704
742
  def main() -> None:
705
- explicit_args = create_parser(suppress_defaults=True).parse_args()
743
+ parser = create_parser(suppress_defaults=True)
744
+ explicit_args = parser.parse_args()
706
745
  cli_args = create_parser().parse_args([])
707
746
  vars(cli_args).update(vars(explicit_args))
708
747
  setup_cli_logger(arguments=cli_args)
@@ -717,17 +756,27 @@ def main() -> None:
717
756
  # Handle --list-presets
718
757
  preset_manager = PresetManager()
719
758
  if cli_args.list_presets:
759
+ console = Console(highlight=False)
720
760
  presets_with_source = preset_manager.get_presets_with_source()
721
761
  if presets_with_source:
722
- print("Available presets:")
762
+ console.print("[bold]Available presets:[/bold]")
723
763
  for preset_name, source in presets_with_source:
724
- source_label = "(user)" if source == "user" else "(builtin)"
725
- print(f" - {preset_name} {source_label}")
764
+ source_label = (
765
+ "[cyan](user)[/cyan]"
766
+ if source == "user"
767
+ else "[dim](builtin)[/dim]"
768
+ )
769
+ console.print(
770
+ f" - [green]{escape(preset_name)}[/green] {source_label}"
771
+ )
726
772
  else:
727
- print("No presets found.")
728
- print()
729
- print(f"User presets directory: {preset_manager.presets_dir}")
730
- print("Place custom .json preset files in this directory.")
773
+ console.print("No presets found.")
774
+ console.print()
775
+ console.print(
776
+ f"User presets directory: [bold]{escape(str(preset_manager.presets_dir))}[/bold]",
777
+ soft_wrap=True,
778
+ )
779
+ console.print("Place custom .json preset files in this directory.")
731
780
  sys.exit(0)
732
781
 
733
782
  # Load and apply preset if specified
@@ -782,6 +831,12 @@ def main() -> None:
782
831
  if cli_args.audio_default_only and cli_args.audio_streams:
783
832
  error("Cannot use both --audio-default-only and --audio-streams together.")
784
833
 
834
+ # Show progress bars by default only in interactive terminals, so that
835
+ # scripts and redirected output are not cluttered with them.
836
+ progress = cli_args.progress
837
+ if progress is None:
838
+ progress = sys.stderr.isatty() and not cli_args.quiet
839
+
785
840
  try:
786
841
  ffmpeg_normalize = FFmpegNormalize(
787
842
  normalization_type=cli_args.normalization_type,
@@ -816,7 +871,7 @@ def main() -> None:
816
871
  output_format=cli_args.output_format,
817
872
  extension=cli_args.extension,
818
873
  dry_run=cli_args.dry_run,
819
- progress=cli_args.progress,
874
+ progress=progress,
820
875
  replaygain=cli_args.replaygain,
821
876
  batch=cli_args.batch,
822
877
  audio_streams=audio_streams,
@@ -847,7 +902,14 @@ def main() -> None:
847
902
  input_files.extend([line.strip() for line in f if line.strip()])
848
903
 
849
904
  if not input_files:
850
- error("No input files specified. Use positional arguments or --input-list.")
905
+ parser.print_usage(sys.stderr)
906
+ _logger.error(
907
+ "No input files specified. Use positional arguments or --input-list."
908
+ )
909
+ get_console().print(
910
+ "Run [bold cyan]ffmpeg-normalize --help[/bold cyan] to see all options."
911
+ )
912
+ sys.exit(1)
851
913
 
852
914
  # Validate all input files upfront before processing
853
915
  _logger.debug("Validating all input files before processing...")
@@ -930,9 +992,19 @@ def main() -> None:
930
992
  if media_file.status == "error"
931
993
  ]
932
994
  if failed_files:
933
- _logger.error(f"{len(failed_files)} file(s) failed to process:")
934
- for media_file in failed_files:
935
- _logger.error(f" - {media_file.input_file}: {media_file.error}")
995
+ # The individual errors were already logged when each file failed
996
+ _logger.error(
997
+ f"{len(failed_files)} of {len(ffmpeg_normalize.media_files)} file(s) "
998
+ "failed to process: "
999
+ + ", ".join(media_file.input_file for media_file in failed_files)
1000
+ )
1001
+ if not cli_args.debug:
1002
+ get_console().print(
1003
+ "[dim]Re-run with [bold]--debug[/bold] to see the full ffmpeg "
1004
+ "output. Please include it when reporting a bug at "
1005
+ "https://github.com/slhck/ffmpeg-normalize/issues[/dim]",
1006
+ soft_wrap=True,
1007
+ )
936
1008
  sys.exit(1)
937
1009
 
938
1010