ffmpeg-normalize 1.28.3__py2.py3-none-any.whl → 1.29.1__py2.py3-none-any.whl
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.
- ffmpeg_normalize/__main__.py +15 -1
- ffmpeg_normalize/_ffmpeg_normalize.py +3 -0
- ffmpeg_normalize/_media_file.py +2 -0
- ffmpeg_normalize/_version.py +1 -1
- {ffmpeg_normalize-1.28.3.dist-info → ffmpeg_normalize-1.29.1.dist-info}/METADATA +14 -2
- ffmpeg_normalize-1.29.1.dist-info/RECORD +16 -0
- {ffmpeg_normalize-1.28.3.dist-info → ffmpeg_normalize-1.29.1.dist-info}/WHEEL +1 -1
- ffmpeg_normalize-1.28.3.dist-info/RECORD +0 -16
- {ffmpeg_normalize-1.28.3.dist-info → ffmpeg_normalize-1.29.1.dist-info}/LICENSE +0 -0
- {ffmpeg_normalize-1.28.3.dist-info → ffmpeg_normalize-1.29.1.dist-info}/entry_points.txt +0 -0
- {ffmpeg_normalize-1.28.3.dist-info → ffmpeg_normalize-1.29.1.dist-info}/top_level.txt +0 -0
ffmpeg_normalize/__main__.py
CHANGED
|
@@ -26,7 +26,9 @@ def create_parser() -> argparse.ArgumentParser:
|
|
|
26
26
|
ffmpeg-normalize v{} -- command line tool for normalizing audio files
|
|
27
27
|
""".format(__version__)
|
|
28
28
|
),
|
|
29
|
-
#
|
|
29
|
+
# manually overridden because argparse generates the wrong order of arguments, see:
|
|
30
|
+
# https://github.com/slhck/ffmpeg-normalize/issues/132#issuecomment-662516535
|
|
31
|
+
usage="%(prog)s INPUT [INPUT ...] [-o OUTPUT [OUTPUT ...]] [options]",
|
|
30
32
|
formatter_class=argparse.RawTextHelpFormatter,
|
|
31
33
|
epilog=textwrap.dedent(
|
|
32
34
|
"""\
|
|
@@ -303,6 +305,17 @@ def create_parser() -> argparse.ArgumentParser:
|
|
|
303
305
|
"""
|
|
304
306
|
),
|
|
305
307
|
)
|
|
308
|
+
group_acodec.add_argument(
|
|
309
|
+
"-ac",
|
|
310
|
+
"--audio-channels",
|
|
311
|
+
type=int,
|
|
312
|
+
help=textwrap.dedent(
|
|
313
|
+
"""\
|
|
314
|
+
Set the number of audio channels.
|
|
315
|
+
If not specified, the input channel layout will be used.
|
|
316
|
+
"""
|
|
317
|
+
),
|
|
318
|
+
)
|
|
306
319
|
group_acodec.add_argument(
|
|
307
320
|
"-koa",
|
|
308
321
|
"--keep-original-audio",
|
|
@@ -506,6 +519,7 @@ def main() -> None:
|
|
|
506
519
|
audio_codec=cli_args.audio_codec,
|
|
507
520
|
audio_bitrate=cli_args.audio_bitrate,
|
|
508
521
|
sample_rate=cli_args.sample_rate,
|
|
522
|
+
audio_channels=cli_args.audio_channels,
|
|
509
523
|
keep_original_audio=cli_args.keep_original_audio,
|
|
510
524
|
pre_filter=cli_args.pre_filter,
|
|
511
525
|
post_filter=cli_args.post_filter,
|
|
@@ -63,6 +63,7 @@ class FFmpegNormalize:
|
|
|
63
63
|
audio_codec (str, optional): Audio codec. Defaults to "pcm_s16le".
|
|
64
64
|
audio_bitrate (float, optional): Audio bitrate. Defaults to None.
|
|
65
65
|
sample_rate (int, optional): Sample rate. Defaults to None.
|
|
66
|
+
audio_channels (int | None, optional): Audio channels. Defaults to None.
|
|
66
67
|
keep_original_audio (bool, optional): Keep original audio. Defaults to False.
|
|
67
68
|
pre_filter (str, optional): Pre filter. Defaults to None.
|
|
68
69
|
post_filter (str, optional): Post filter. Defaults to None.
|
|
@@ -98,6 +99,7 @@ class FFmpegNormalize:
|
|
|
98
99
|
audio_codec: str = "pcm_s16le",
|
|
99
100
|
audio_bitrate: float | None = None,
|
|
100
101
|
sample_rate: float | int | None = None,
|
|
102
|
+
audio_channels: int | None = None,
|
|
101
103
|
keep_original_audio: bool = False,
|
|
102
104
|
pre_filter: str | None = None,
|
|
103
105
|
post_filter: str | None = None,
|
|
@@ -170,6 +172,7 @@ class FFmpegNormalize:
|
|
|
170
172
|
self.dual_mono = dual_mono
|
|
171
173
|
self.dynamic = dynamic
|
|
172
174
|
self.sample_rate = None if sample_rate is None else int(sample_rate)
|
|
175
|
+
self.audio_channels = None if audio_channels is None else int(audio_channels)
|
|
173
176
|
|
|
174
177
|
self.audio_codec = audio_codec
|
|
175
178
|
self.audio_bitrate = audio_bitrate
|
ffmpeg_normalize/_media_file.py
CHANGED
|
@@ -355,6 +355,8 @@ class MediaFile:
|
|
|
355
355
|
cmd.extend(["-b:a", str(self.ffmpeg_normalize.audio_bitrate)])
|
|
356
356
|
if self.ffmpeg_normalize.sample_rate:
|
|
357
357
|
cmd.extend(["-ar", str(self.ffmpeg_normalize.sample_rate)])
|
|
358
|
+
if self.ffmpeg_normalize.audio_channels:
|
|
359
|
+
cmd.extend(["-ac", str(self.ffmpeg_normalize.audio_channels)])
|
|
358
360
|
|
|
359
361
|
# ... and subtitles
|
|
360
362
|
if not self.ffmpeg_normalize.subtitle_disable:
|
ffmpeg_normalize/_version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "1.
|
|
1
|
+
__version__ = "1.29.1"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ffmpeg-normalize
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.29.1
|
|
4
4
|
Summary: Normalize audio via ffmpeg
|
|
5
5
|
Home-page: https://github.com/slhck/ffmpeg-normalize
|
|
6
6
|
Author: Werner Robitza
|
|
@@ -25,7 +25,7 @@ License-File: LICENSE
|
|
|
25
25
|
Requires-Dist: tqdm
|
|
26
26
|
Requires-Dist: ffmpeg-progress-yield
|
|
27
27
|
Requires-Dist: colorlog
|
|
28
|
-
Requires-Dist: colorama
|
|
28
|
+
Requires-Dist: colorama; platform_system == "Windows"
|
|
29
29
|
|
|
30
30
|
# ffmpeg-normalize
|
|
31
31
|
|
|
@@ -324,6 +324,8 @@ For more information on the options (`[options]`) available, run `ffmpeg-normali
|
|
|
324
324
|
|
|
325
325
|
Will use input sample rate by default, except for EBU normalization, which will change the input sample rate to 192 kHz.
|
|
326
326
|
|
|
327
|
+
- `-ac`, `--audio-channels`: Set the number of audio channels. If not specified, the input channel layout will be used. This is equivalent to `-ac` in ffmpeg.
|
|
328
|
+
|
|
327
329
|
- `-koa, --keep-original-audio`: Copy original, non-normalized audio streams to output file
|
|
328
330
|
|
|
329
331
|
- `-prf PRE_FILTER, --pre-filter PRE_FILTER`: Add an audio filter chain before applying normalization.
|
|
@@ -596,6 +598,16 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
596
598
|
# Changelog
|
|
597
599
|
|
|
598
600
|
|
|
601
|
+
## v1.29.1 (2024-10-22)
|
|
602
|
+
|
|
603
|
+
* Fix: override argparse usage.
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
## v1.29.0 (2024-10-14)
|
|
607
|
+
|
|
608
|
+
* Add option to set audio channels directly.
|
|
609
|
+
|
|
610
|
+
|
|
599
611
|
## v1.28.3 (2024-08-16)
|
|
600
612
|
|
|
601
613
|
* Make colorama dependency windows-only.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
ffmpeg_normalize/__init__.py,sha256=aAhlk93ZE6SQcWUDzZQcw9vJh0bJcKEUNFGhVc5ZIto,453
|
|
2
|
+
ffmpeg_normalize/__main__.py,sha256=vIVZAKPyI7zO9K22FYeaE-q_4JeZAQg1xlQc0739Gqk,18603
|
|
3
|
+
ffmpeg_normalize/_cmd_utils.py,sha256=A6quxjOl5tLHxgcs7SdMXzuOCP_JjUTzL1iUD4G7DJk,5361
|
|
4
|
+
ffmpeg_normalize/_errors.py,sha256=brTQ4osJ4fTA8wnyMPVVYfGwJ0wqeShRFydTEwi_VEY,48
|
|
5
|
+
ffmpeg_normalize/_ffmpeg_normalize.py,sha256=mARUHvgLwcs0yGsuDkkDZYqE2JJmnEZtkADKUS4giRc,10556
|
|
6
|
+
ffmpeg_normalize/_logger.py,sha256=3Ap4Fxg7xGrzz7h4IGuNEf0KKstx0Rq_eLbHPrHzcrI,1841
|
|
7
|
+
ffmpeg_normalize/_media_file.py,sha256=FgLHy1lwfvI1EpEvLioyBD30Pj4XzMYUceJ3-J_mb80,16434
|
|
8
|
+
ffmpeg_normalize/_streams.py,sha256=5zLlSK2vMTBs0HzBTmI5UiJVqSp1Nk19TZXpxNtjkIA,19973
|
|
9
|
+
ffmpeg_normalize/_version.py,sha256=jl9sqrR0RksKrgJ0uh2M_-o7BYsG7QHE0tRxgQfFH64,23
|
|
10
|
+
ffmpeg_normalize/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
+
ffmpeg_normalize-1.29.1.dist-info/LICENSE,sha256=zeqAHGWrSIwdPHsZMZv1_N0gGFO1xxjcZEz9CplR4EM,1086
|
|
12
|
+
ffmpeg_normalize-1.29.1.dist-info/METADATA,sha256=adIKSYV75G1uxkpI1n029PFXbAGcTqAinkYcapMyUbs,56152
|
|
13
|
+
ffmpeg_normalize-1.29.1.dist-info/WHEEL,sha256=fS9sRbCBHs7VFcwJLnLXN1MZRR0_TVTxvXKzOnaSFs8,110
|
|
14
|
+
ffmpeg_normalize-1.29.1.dist-info/entry_points.txt,sha256=X0EC5ptb0iGOxrk3Aa65dVQtvUixngLd_2-iAtSixdc,68
|
|
15
|
+
ffmpeg_normalize-1.29.1.dist-info/top_level.txt,sha256=wnUkr17ckPrrU1JsxZQiXbEBUnHKsC64yck-MemEBuI,17
|
|
16
|
+
ffmpeg_normalize-1.29.1.dist-info/RECORD,,
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
ffmpeg_normalize/__init__.py,sha256=aAhlk93ZE6SQcWUDzZQcw9vJh0bJcKEUNFGhVc5ZIto,453
|
|
2
|
-
ffmpeg_normalize/__main__.py,sha256=Y1iJutUrHyvr6HTM9Hk7r1PEvkPBbaP99kTQRpNVUbw,18104
|
|
3
|
-
ffmpeg_normalize/_cmd_utils.py,sha256=A6quxjOl5tLHxgcs7SdMXzuOCP_JjUTzL1iUD4G7DJk,5361
|
|
4
|
-
ffmpeg_normalize/_errors.py,sha256=brTQ4osJ4fTA8wnyMPVVYfGwJ0wqeShRFydTEwi_VEY,48
|
|
5
|
-
ffmpeg_normalize/_ffmpeg_normalize.py,sha256=zvqxGvyAfx1pZr7kSlhHACx5qJC-atlmQpbVIptVHUQ,10346
|
|
6
|
-
ffmpeg_normalize/_logger.py,sha256=3Ap4Fxg7xGrzz7h4IGuNEf0KKstx0Rq_eLbHPrHzcrI,1841
|
|
7
|
-
ffmpeg_normalize/_media_file.py,sha256=oBZl0wl6XEyJLWNxtyhgZR_9cp22D9-hSUUHDC8LdQo,16310
|
|
8
|
-
ffmpeg_normalize/_streams.py,sha256=5zLlSK2vMTBs0HzBTmI5UiJVqSp1Nk19TZXpxNtjkIA,19973
|
|
9
|
-
ffmpeg_normalize/_version.py,sha256=4WEUaUH8jsAY-R3QLSQJkfbfM276l8HmEK4N_ImQJSo,23
|
|
10
|
-
ffmpeg_normalize/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
-
ffmpeg_normalize-1.28.3.dist-info/LICENSE,sha256=zeqAHGWrSIwdPHsZMZv1_N0gGFO1xxjcZEz9CplR4EM,1086
|
|
12
|
-
ffmpeg_normalize-1.28.3.dist-info/METADATA,sha256=v8BqX0BtgxXH0FX5DqGj-IlQU-yA54kwr7qtTiGEnh8,55862
|
|
13
|
-
ffmpeg_normalize-1.28.3.dist-info/WHEEL,sha256=-G_t0oGuE7UD0DrSpVZnq1hHMBV9DD2XkS5v7XpmTnk,110
|
|
14
|
-
ffmpeg_normalize-1.28.3.dist-info/entry_points.txt,sha256=X0EC5ptb0iGOxrk3Aa65dVQtvUixngLd_2-iAtSixdc,68
|
|
15
|
-
ffmpeg_normalize-1.28.3.dist-info/top_level.txt,sha256=wnUkr17ckPrrU1JsxZQiXbEBUnHKsC64yck-MemEBuI,17
|
|
16
|
-
ffmpeg_normalize-1.28.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|