ffmpeg-normalize 1.28.3__tar.gz → 1.29.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.
- {ffmpeg-normalize-1.28.3 → ffmpeg-normalize-1.29.0}/CHANGELOG.md +5 -0
- {ffmpeg-normalize-1.28.3/ffmpeg_normalize.egg-info → ffmpeg-normalize-1.29.0}/PKG-INFO +8 -1
- {ffmpeg-normalize-1.28.3 → ffmpeg-normalize-1.29.0}/README.md +2 -0
- {ffmpeg-normalize-1.28.3 → ffmpeg-normalize-1.29.0}/ffmpeg_normalize/__main__.py +12 -0
- {ffmpeg-normalize-1.28.3 → ffmpeg-normalize-1.29.0}/ffmpeg_normalize/_ffmpeg_normalize.py +3 -0
- {ffmpeg-normalize-1.28.3 → ffmpeg-normalize-1.29.0}/ffmpeg_normalize/_media_file.py +2 -0
- ffmpeg-normalize-1.29.0/ffmpeg_normalize/_version.py +1 -0
- {ffmpeg-normalize-1.28.3 → ffmpeg-normalize-1.29.0/ffmpeg_normalize.egg-info}/PKG-INFO +8 -1
- {ffmpeg-normalize-1.28.3 → ffmpeg-normalize-1.29.0}/test/test.py +15 -0
- ffmpeg-normalize-1.28.3/ffmpeg_normalize/_version.py +0 -1
- {ffmpeg-normalize-1.28.3 → ffmpeg-normalize-1.29.0}/LICENSE +0 -0
- {ffmpeg-normalize-1.28.3 → ffmpeg-normalize-1.29.0}/ffmpeg_normalize/__init__.py +0 -0
- {ffmpeg-normalize-1.28.3 → ffmpeg-normalize-1.29.0}/ffmpeg_normalize/_cmd_utils.py +0 -0
- {ffmpeg-normalize-1.28.3 → ffmpeg-normalize-1.29.0}/ffmpeg_normalize/_errors.py +0 -0
- {ffmpeg-normalize-1.28.3 → ffmpeg-normalize-1.29.0}/ffmpeg_normalize/_logger.py +0 -0
- {ffmpeg-normalize-1.28.3 → ffmpeg-normalize-1.29.0}/ffmpeg_normalize/_streams.py +0 -0
- {ffmpeg-normalize-1.28.3 → ffmpeg-normalize-1.29.0}/ffmpeg_normalize/py.typed +0 -0
- {ffmpeg-normalize-1.28.3 → ffmpeg-normalize-1.29.0}/ffmpeg_normalize.egg-info/SOURCES.txt +0 -0
- {ffmpeg-normalize-1.28.3 → ffmpeg-normalize-1.29.0}/ffmpeg_normalize.egg-info/dependency_links.txt +0 -0
- {ffmpeg-normalize-1.28.3 → ffmpeg-normalize-1.29.0}/ffmpeg_normalize.egg-info/entry_points.txt +0 -0
- {ffmpeg-normalize-1.28.3 → ffmpeg-normalize-1.29.0}/ffmpeg_normalize.egg-info/not-zip-safe +0 -0
- {ffmpeg-normalize-1.28.3 → ffmpeg-normalize-1.29.0}/ffmpeg_normalize.egg-info/requires.txt +0 -0
- {ffmpeg-normalize-1.28.3 → ffmpeg-normalize-1.29.0}/ffmpeg_normalize.egg-info/top_level.txt +0 -0
- {ffmpeg-normalize-1.28.3 → ffmpeg-normalize-1.29.0}/setup.cfg +0 -0
- {ffmpeg-normalize-1.28.3 → ffmpeg-normalize-1.29.0}/setup.py +0 -0
- {ffmpeg-normalize-1.28.3 → ffmpeg-normalize-1.29.0}/test/out.mp4 +0 -0
- {ffmpeg-normalize-1.28.3 → ffmpeg-normalize-1.29.0}/test/test.mp4 +0 -0
- {ffmpeg-normalize-1.28.3 → ffmpeg-normalize-1.29.0}/test/test.wav +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ffmpeg-normalize
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.29.0
|
|
4
4
|
Summary: Normalize audio via ffmpeg
|
|
5
5
|
Home-page: https://github.com/slhck/ffmpeg-normalize
|
|
6
6
|
Author: Werner Robitza
|
|
@@ -320,6 +320,8 @@ For more information on the options (`[options]`) available, run `ffmpeg-normali
|
|
|
320
320
|
|
|
321
321
|
Will use input sample rate by default, except for EBU normalization, which will change the input sample rate to 192 kHz.
|
|
322
322
|
|
|
323
|
+
- `-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.
|
|
324
|
+
|
|
323
325
|
- `-koa, --keep-original-audio`: Copy original, non-normalized audio streams to output file
|
|
324
326
|
|
|
325
327
|
- `-prf PRE_FILTER, --pre-filter PRE_FILTER`: Add an audio filter chain before applying normalization.
|
|
@@ -592,6 +594,11 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
592
594
|
# Changelog
|
|
593
595
|
|
|
594
596
|
|
|
597
|
+
## v1.29.0 (2024-10-14)
|
|
598
|
+
|
|
599
|
+
* Add option to set audio channels directly.
|
|
600
|
+
|
|
601
|
+
|
|
595
602
|
## v1.28.3 (2024-08-16)
|
|
596
603
|
|
|
597
604
|
* Make colorama dependency windows-only.
|
|
@@ -295,6 +295,8 @@ For more information on the options (`[options]`) available, run `ffmpeg-normali
|
|
|
295
295
|
|
|
296
296
|
Will use input sample rate by default, except for EBU normalization, which will change the input sample rate to 192 kHz.
|
|
297
297
|
|
|
298
|
+
- `-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.
|
|
299
|
+
|
|
298
300
|
- `-koa, --keep-original-audio`: Copy original, non-normalized audio streams to output file
|
|
299
301
|
|
|
300
302
|
- `-prf PRE_FILTER, --pre-filter PRE_FILTER`: Add an audio filter chain before applying normalization.
|
|
@@ -303,6 +303,17 @@ def create_parser() -> argparse.ArgumentParser:
|
|
|
303
303
|
"""
|
|
304
304
|
),
|
|
305
305
|
)
|
|
306
|
+
group_acodec.add_argument(
|
|
307
|
+
"-ac",
|
|
308
|
+
"--audio-channels",
|
|
309
|
+
type=int,
|
|
310
|
+
help=textwrap.dedent(
|
|
311
|
+
"""\
|
|
312
|
+
Set the number of audio channels.
|
|
313
|
+
If not specified, the input channel layout will be used.
|
|
314
|
+
"""
|
|
315
|
+
),
|
|
316
|
+
)
|
|
306
317
|
group_acodec.add_argument(
|
|
307
318
|
"-koa",
|
|
308
319
|
"--keep-original-audio",
|
|
@@ -506,6 +517,7 @@ def main() -> None:
|
|
|
506
517
|
audio_codec=cli_args.audio_codec,
|
|
507
518
|
audio_bitrate=cli_args.audio_bitrate,
|
|
508
519
|
sample_rate=cli_args.sample_rate,
|
|
520
|
+
audio_channels=cli_args.audio_channels,
|
|
509
521
|
keep_original_audio=cli_args.keep_original_audio,
|
|
510
522
|
pre_filter=cli_args.pre_filter,
|
|
511
523
|
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
|
|
@@ -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:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.29.0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: ffmpeg-normalize
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.29.0
|
|
4
4
|
Summary: Normalize audio via ffmpeg
|
|
5
5
|
Home-page: https://github.com/slhck/ffmpeg-normalize
|
|
6
6
|
Author: Werner Robitza
|
|
@@ -320,6 +320,8 @@ For more information on the options (`[options]`) available, run `ffmpeg-normali
|
|
|
320
320
|
|
|
321
321
|
Will use input sample rate by default, except for EBU normalization, which will change the input sample rate to 192 kHz.
|
|
322
322
|
|
|
323
|
+
- `-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.
|
|
324
|
+
|
|
323
325
|
- `-koa, --keep-original-audio`: Copy original, non-normalized audio streams to output file
|
|
324
326
|
|
|
325
327
|
- `-prf PRE_FILTER, --pre-filter PRE_FILTER`: Add an audio filter chain before applying normalization.
|
|
@@ -592,6 +594,11 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
592
594
|
# Changelog
|
|
593
595
|
|
|
594
596
|
|
|
597
|
+
## v1.29.0 (2024-10-14)
|
|
598
|
+
|
|
599
|
+
* Add option to set audio channels directly.
|
|
600
|
+
|
|
601
|
+
|
|
595
602
|
## v1.28.3 (2024-08-16)
|
|
596
603
|
|
|
597
604
|
* Make colorama dependency windows-only.
|
|
@@ -460,3 +460,18 @@ class TestFFmpegNormalize:
|
|
|
460
460
|
["test/test.mp4", "-ext", "wav", "-vn", "-f", "q"]
|
|
461
461
|
)
|
|
462
462
|
assert "only supports one stream" not in stderr
|
|
463
|
+
|
|
464
|
+
def test_audio_channels(self):
|
|
465
|
+
ffmpeg_normalize_call(
|
|
466
|
+
["test/test.mp4", "-ac", "1", "-o", "normalized/test.wav"]
|
|
467
|
+
)
|
|
468
|
+
assert os.path.isfile("normalized/test.wav")
|
|
469
|
+
stream_info = _get_stream_info("normalized/test.wav")[0]
|
|
470
|
+
assert stream_info["channels"] == 1
|
|
471
|
+
|
|
472
|
+
ffmpeg_normalize_call(
|
|
473
|
+
["test/test.mp4", "-ac", "2", "-o", "normalized/test2.wav"]
|
|
474
|
+
)
|
|
475
|
+
assert os.path.isfile("normalized/test2.wav")
|
|
476
|
+
stream_info = _get_stream_info("normalized/test2.wav")[0]
|
|
477
|
+
assert stream_info["channels"] == 2
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.28.3"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{ffmpeg-normalize-1.28.3 → ffmpeg-normalize-1.29.0}/ffmpeg_normalize.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{ffmpeg-normalize-1.28.3 → ffmpeg-normalize-1.29.0}/ffmpeg_normalize.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|