From 63a0b4e7aef24b670916b24af6e784956f33fa08 Mon Sep 17 00:00:00 2001 From: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 22 Jan 2025 02:05:31 +0000 Subject: [PATCH] [encoder_audio_aac] v0.0.7 --- source/encoder_audio_aac/changelog.md | 3 +++ source/encoder_audio_aac/info.json | 2 +- source/encoder_audio_aac/plugin.py | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/source/encoder_audio_aac/changelog.md b/source/encoder_audio_aac/changelog.md index fc58b0a40..c990e9a73 100644 --- a/source/encoder_audio_aac/changelog.md +++ b/source/encoder_audio_aac/changelog.md @@ -1,4 +1,7 @@ +**0.0.6** +- add check in calculate_bitrate and custom_stream_mapping to set channels to 6 if channels > 6. ffmpeg cannot encode > 6 channels of aac audio. + **0.0.6** - add 'ac' parameter to ffmpeg command to ensure proper channel_layout field for compatiability with normalization plugin to avoid unsupported channel layout error diff --git a/source/encoder_audio_aac/info.json b/source/encoder_audio_aac/info.json index 38d67c0ba..432710f0e 100644 --- a/source/encoder_audio_aac/info.json +++ b/source/encoder_audio_aac/info.json @@ -15,5 +15,5 @@ "on_worker_process": 0 }, "tags": "audio,encoder,ffmpeg,library file test", - "version": "0.0.6" + "version": "0.0.7" } diff --git a/source/encoder_audio_aac/plugin.py b/source/encoder_audio_aac/plugin.py index eacbaa837..c023647f8 100644 --- a/source/encoder_audio_aac/plugin.py +++ b/source/encoder_audio_aac/plugin.py @@ -134,6 +134,8 @@ def set_default_values(self, settings, abspath, probe): @staticmethod def calculate_bitrate(stream_info: dict): channels = stream_info.get('channels', 2) + if int(channels) > 6: + channels = 6 return int(channels) * 64 def test_stream_needs_processing(self, stream_info: dict): @@ -152,6 +154,8 @@ def custom_stream_mapping(self, stream_info: dict, stream_id: int): # Use 64K for the bitrate per channel calculated_bitrate = self.calculate_bitrate(stream_info) channels = int(stream_info.get('channels')) + if int(channels) > 6: + channels = 6 stream_encoding += [ '-ac:a:{}'.format(stream_id), '{}'.format(channels), '-b:a:{}'.format(stream_id), "{}k".format(calculated_bitrate) ]