ffmpeg-normalize 1.45.1__tar.gz → 1.45.2__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 (19) hide show
  1. {ffmpeg_normalize-1.45.1 → ffmpeg_normalize-1.45.2}/PKG-INFO +1 -1
  2. {ffmpeg_normalize-1.45.1 → ffmpeg_normalize-1.45.2}/pyproject.toml +1 -1
  3. {ffmpeg_normalize-1.45.1 → ffmpeg_normalize-1.45.2}/pyproject.toml.orig +1 -1
  4. {ffmpeg_normalize-1.45.1 → ffmpeg_normalize-1.45.2}/src/ffmpeg_normalize/__main__.py +5 -2
  5. {ffmpeg_normalize-1.45.1 → ffmpeg_normalize-1.45.2}/src/ffmpeg_normalize/_ffmpeg_normalize.py +1 -1
  6. {ffmpeg_normalize-1.45.1 → ffmpeg_normalize-1.45.2}/src/ffmpeg_normalize/_media_file.py +9 -2
  7. {ffmpeg_normalize-1.45.1 → ffmpeg_normalize-1.45.2}/LICENSE.md +0 -0
  8. {ffmpeg_normalize-1.45.1 → ffmpeg_normalize-1.45.2}/README.md +0 -0
  9. {ffmpeg_normalize-1.45.1 → ffmpeg_normalize-1.45.2}/src/ffmpeg_normalize/__init__.py +0 -0
  10. {ffmpeg_normalize-1.45.1 → ffmpeg_normalize-1.45.2}/src/ffmpeg_normalize/_cmd_utils.py +0 -0
  11. {ffmpeg_normalize-1.45.1 → ffmpeg_normalize-1.45.2}/src/ffmpeg_normalize/_console.py +0 -0
  12. {ffmpeg_normalize-1.45.1 → ffmpeg_normalize-1.45.2}/src/ffmpeg_normalize/_errors.py +0 -0
  13. {ffmpeg_normalize-1.45.1 → ffmpeg_normalize-1.45.2}/src/ffmpeg_normalize/_logger.py +0 -0
  14. {ffmpeg_normalize-1.45.1 → ffmpeg_normalize-1.45.2}/src/ffmpeg_normalize/_presets.py +0 -0
  15. {ffmpeg_normalize-1.45.1 → ffmpeg_normalize-1.45.2}/src/ffmpeg_normalize/_streams.py +0 -0
  16. {ffmpeg_normalize-1.45.1 → ffmpeg_normalize-1.45.2}/src/ffmpeg_normalize/data/presets/music.json +0 -0
  17. {ffmpeg_normalize-1.45.1 → ffmpeg_normalize-1.45.2}/src/ffmpeg_normalize/data/presets/podcast.json +0 -0
  18. {ffmpeg_normalize-1.45.1 → ffmpeg_normalize-1.45.2}/src/ffmpeg_normalize/data/presets/streaming-video.json +0 -0
  19. {ffmpeg_normalize-1.45.1 → ffmpeg_normalize-1.45.2}/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.45.1
3
+ Version: 1.45.2
4
4
  Summary: Normalize audio via ffmpeg
5
5
  Keywords: ffmpeg,normalize,audio
6
6
  Author: Werner Robitza
@@ -4,7 +4,7 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "ffmpeg-normalize"
7
- version = "1.45.1"
7
+ version = "1.45.2"
8
8
  description = "Normalize audio via ffmpeg"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -4,7 +4,7 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "ffmpeg-normalize"
7
- version = "1.45.1"
7
+ version = "1.45.2"
8
8
  description = "Normalize audio via ffmpeg"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -649,8 +649,11 @@ def create_parser(suppress_defaults: bool = False) -> argparse.ArgumentParser:
649
649
  normalized audio stream.
650
650
 
651
651
  The tag holds an ffmpeg-command-equivalent string with the audio codec,
652
- the bitrate, sample rate and channel count (when set), plus the
653
- normalization filter including the measured loudnorm values.
652
+ the bitrate, sample rate and channel count (when set), the normalization
653
+ filter including the measured loudnorm values, and any
654
+ `-e`/`--extra-output-options` appended verbatim (these are not
655
+ audio-scoped, so an unrelated option passed there also ends up in the
656
+ tag). Extra input options are demuxer settings and are not included.
654
657
 
655
658
  This is a Matroska/WebM tag convention; other containers may store it
656
659
  differently. Has no effect together with `--metadata-disable`.
@@ -89,7 +89,7 @@ class FFmpegNormalize:
89
89
  subtitle_disable (bool, optional): Disable subtitles. Defaults to False.
90
90
  metadata_disable (bool, optional): Disable metadata. Defaults to False.
91
91
  chapters_disable (bool, optional): Disable chapters. Defaults to False.
92
- write_encoder_settings (bool, optional): Write the effective encoder settings (codec, bitrate, sample rate, channels and the normalization filter including the measured loudnorm values) as an ENCODER_SETTINGS tag on each normalized audio stream. Defaults to False.
92
+ write_encoder_settings (bool, optional): Write the effective encoder settings (codec, bitrate, sample rate, channels, the normalization filter including the measured loudnorm values, and any extra_output_options) as an ENCODER_SETTINGS tag on each normalized audio stream. Defaults to False.
93
93
  extra_input_options (list, optional): Extra input options. Defaults to None.
94
94
  extra_output_options (list, optional): Extra output options. Defaults to None.
95
95
  output_format (str, optional): Output format. Defaults to None.
@@ -973,13 +973,18 @@ class MediaFile:
973
973
  Return an ffmpeg-command-equivalent description of how a single audio
974
974
  stream is encoded in the second pass: the codec, then the bitrate,
975
975
  sample rate and channel count when set, followed by the effective
976
- filter chain (which includes the loudnorm measured values).
976
+ filter chain (which includes the loudnorm measured values) and finally
977
+ any ``--extra-output-options``.
977
978
 
978
979
  Written as the ``ENCODER_SETTINGS`` stream tag when
979
980
  ``write_encoder_settings`` is enabled. The filter chain comes from the
980
981
  cache populated by :meth:`_get_audio_filter_cmd`, which must run first.
981
982
  The loudnorm ``print_format`` option is dropped, as it only controls
982
- first-pass diagnostics and not the normalization itself.
983
+ first-pass diagnostics and not the normalization itself. Extra output
984
+ options are appended verbatim: they commonly carry encoder tuning
985
+ (``-q:a``, ``-compression_level``, ``-application`` ...), but are not
986
+ audio-scoped, so an unrelated option passed there will also appear here.
987
+ Extra *input* options are demuxer settings and are deliberately omitted.
983
988
 
984
989
  Returns:
985
990
  str: e.g. ``-c:a libopus -b:a 128000 -af loudnorm=i=-23.0:...``
@@ -996,6 +1001,8 @@ class MediaFile:
996
1001
  if filter_chain:
997
1002
  af = re.sub(r":print_format=\w+", "", ",".join(filter_chain))
998
1003
  args += ["-af", af]
1004
+ if self.ffmpeg_normalize.extra_output_options:
1005
+ args += self.ffmpeg_normalize.extra_output_options
999
1006
  return shlex.join(args)
1000
1007
 
1001
1008
  def _get_audio_codec(self) -> str | None: