From 5b27bee1b62e2db358e654c809b2f940ab388bab Mon Sep 17 00:00:00 2001 From: Werner Robitza Date: Sun, 15 Dec 2024 20:49:59 +0100 Subject: [PATCH] update docs and completions --- .github/CONTRIBUTING.md | 6 +++++- completions/ffmpeg-normalize-shtab.bash | 3 ++- completions/ffmpeg-normalize-shtab.zsh | 6 ++++++ completions/ffmpeg-normalize.bash | 1 + completions/ffmpeg-normalize.zsh | 1 + ffmpeg_normalize/__main__.py | 2 +- 6 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index d59bb0c..3f60749 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -13,6 +13,10 @@ If you want to contribute a new feature or fix, please: - Provide a commit for the change you want to make (one feature per commit, please) - Create a pull request +## For CLI specifically + +- Make sure to add an entry in the README.md file, and update the `completions/` directory with the new completion options. + ## Issues and Questions -If you simply have a question or want to raise an issue, head to the issue tracker. There's a template there that you're kindly asked to fill out. It helps me understand what the problem might be. \ No newline at end of file +If you simply have a question or want to raise an issue, head to the issue tracker. There's a template there that you're kindly asked to fill out. It helps me understand what the problem might be. diff --git a/completions/ffmpeg-normalize-shtab.bash b/completions/ffmpeg-normalize-shtab.bash index 5bf8eff..1316785 100644 --- a/completions/ffmpeg-normalize-shtab.bash +++ b/completions/ffmpeg-normalize-shtab.bash @@ -2,7 +2,7 @@ -_shtab_ffmpeg_normalize_option_strings=('-h' '--help' '-o' '--output' '-of' '--output-folder' '-f' '--force' '-d' '--debug' '-v' '--verbose' '-q' '--quiet' '-n' '--dry-run' '-pr' '--progress' '--version' '-nt' '--normalization-type' '-t' '--target-level' '-p' '--print-stats' '-lrt' '--loudness-range-target' '--keep-loudness-range-target' '--keep-lra-above-loudness-range-target' '-tp' '--true-peak' '--offset' '--lower-only' '--dual-mono' '--dynamic' '-c:a' '--audio-codec' '-b:a' '--audio-bitrate' '-ar' '--sample-rate' '-ac' '--audio-channels' '-koa' '--keep-original-audio' '-prf' '--pre-filter' '-pof' '--post-filter' '-vn' '--video-disable' '-c:v' '--video-codec' '-sn' '--subtitle-disable' '-mn' '--metadata-disable' '-cn' '--chapters-disable' '-ei' '--extra-input-options' '-e' '--extra-output-options' '-ofmt' '--output-format' '-ext' '--extension') +_shtab_ffmpeg_normalize_option_strings=('-h' '--help' '-o' '--output' '-of' '--output-folder' '-f' '--force' '-d' '--debug' '-v' '--verbose' '-q' '--quiet' '-n' '--dry-run' '-pr' '--progress' '--version' '-nt' '--normalization-type' '-t' '--target-level' '-p' '--print-stats' '-lrt' '--loudness-range-target' '--keep-loudness-range-target' '--keep-lra-above-loudness-range-target' '-tp' '--true-peak' '--offset' '--lower-only' '--auto-lower-loudness-target' '--dual-mono' '--dynamic' '-c:a' '--audio-codec' '-b:a' '--audio-bitrate' '-ar' '--sample-rate' '-ac' '--audio-channels' '-koa' '--keep-original-audio' '-prf' '--pre-filter' '-pof' '--post-filter' '-vn' '--video-disable' '-c:v' '--video-codec' '-sn' '--subtitle-disable' '-mn' '--metadata-disable' '-cn' '--chapters-disable' '-ei' '--extra-input-options' '-e' '--extra-output-options' '-ofmt' '--output-format' '-ext' '--extension') @@ -32,6 +32,7 @@ _shtab_ffmpeg_normalize___print_stats_nargs=0 _shtab_ffmpeg_normalize___keep_loudness_range_target_nargs=0 _shtab_ffmpeg_normalize___keep_lra_above_loudness_range_target_nargs=0 _shtab_ffmpeg_normalize___lower_only_nargs=0 +_shtab_ffmpeg_normalize___auto_lower_loudness_target_nargs=0 _shtab_ffmpeg_normalize___dual_mono_nargs=0 _shtab_ffmpeg_normalize___dynamic_nargs=0 _shtab_ffmpeg_normalize__koa_nargs=0 diff --git a/completions/ffmpeg-normalize-shtab.zsh b/completions/ffmpeg-normalize-shtab.zsh index b8cf894..08be487 100644 --- a/completions/ffmpeg-normalize-shtab.zsh +++ b/completions/ffmpeg-normalize-shtab.zsh @@ -71,6 +71,12 @@ Range is -99.0 - \+99.0. If the measured loudness from the first pass is lower than the target loudness then normalization pass will be skipped for the measured audio source. +]" + "--auto-lower-loudness-target[Automatically lower EBU Integrated Loudness Target to prevent falling +back to dynamic filtering. + +Makes sure target loudness is lower than measured loudness minus peak +loudness (input_i - input_tp) by a small amount. ]" "--dual-mono[Treat mono input files as \"dual-mono\". diff --git a/completions/ffmpeg-normalize.bash b/completions/ffmpeg-normalize.bash index 5409f8a..f7aa11c 100644 --- a/completions/ffmpeg-normalize.bash +++ b/completions/ffmpeg-normalize.bash @@ -22,6 +22,7 @@ _ffmpeg_normalize() -lrt --loudness-range-target \ --keep-loudness-range-target \ --keep-lra-above-loudness-range-target \ + --auto-lower-loudness-target \ -tp --true-peak \ --offset \ --lower-only \ diff --git a/completions/ffmpeg-normalize.zsh b/completions/ffmpeg-normalize.zsh index 61d0d2c..d029128 100644 --- a/completions/ffmpeg-normalize.zsh +++ b/completions/ffmpeg-normalize.zsh @@ -28,6 +28,7 @@ _ffmpeg_normalize() { '(-lrt --loudness-range-target)'{-lrt,--loudness-range-target}'[EBU Loudness Range Target in LUFS]:range:' '--keep-loudness-range-target[Keep input loudness range target]' '--keep-lra-above-loudness-range-target[Keep input loudness range above target]' + '--auto-lower-loudness-target[Automatically lower EBU Integrated Loudness Target]' '(-tp --true-peak)'{-tp,--true-peak}'[EBU Maximum True Peak in dBTP]:peak:' '--offset[EBU Offset Gain]:offset:' '--lower-only[Do not increase loudness]' diff --git a/ffmpeg_normalize/__main__.py b/ffmpeg_normalize/__main__.py index 9af8902..471ba05 100644 --- a/ffmpeg_normalize/__main__.py +++ b/ffmpeg_normalize/__main__.py @@ -256,7 +256,7 @@ def create_parser() -> argparse.ArgumentParser: back to dynamic filtering. Makes sure target loudness is lower than measured loudness minus peak - loudness (input_i - input_tp) by a small amount. + loudness (input_i - input_tp) by a small amount (0.1 LUFS). """ ), )