From 8fed780dced7ec0008ef81e061dff3d09bca0b2f Mon Sep 17 00:00:00 2001 From: pat-e Date: Fri, 24 Oct 2025 17:02:16 +0200 Subject: [PATCH] update Sox to Sox NG --- MkvOpusEnc.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MkvOpusEnc.py b/MkvOpusEnc.py index 32d5671..c51bbed 100644 --- a/MkvOpusEnc.py +++ b/MkvOpusEnc.py @@ -32,7 +32,7 @@ class Tee: def check_tools(): """Checks if all required command-line tools are in the system's PATH.""" - required_tools = ["ffmpeg", "ffprobe", "mkvmerge", "sox", "opusenc", "mediainfo"] + required_tools = ["ffmpeg", "ffprobe", "mkvmerge", "sox_ng", "opusenc", "mediainfo"] print("--- Prerequisite Check ---") all_found = True for tool in required_tools: @@ -78,9 +78,9 @@ def convert_audio_track(stream_index, channels, temp_dir, source_file, should_do ffmpeg_args.extend(["-c:a", "flac", str(temp_extracted)]) run_cmd(ffmpeg_args) - # Step 2: Normalize the track with SoX - print(" - Normalizing with SoX...") - run_cmd(["sox", str(temp_extracted), str(temp_normalized), "-S", "--temp", str(temp_dir), "--guard", "gain", "-n"]) + # Step 2: Normalize the track with SoX NG + print(" - Normalizing with SoX NG...") + run_cmd(["sox_ng", str(temp_extracted), str(temp_normalized), "-S", "--temp", str(temp_dir), "--guard", "gain", "-n"]) # Step 3: Encode to Opus with the correct bitrate bitrate = "192k" # Fallback