2 Commits

Author SHA1 Message Date
4f347e930d command for sox_ng did not include the progress-parameter 2025-09-21 22:53:06 +02:00
349265dee2 updated "sox" to "sox_ng" 2025-09-21 21:06:47 +02:00
7 changed files with 11 additions and 11 deletions

View File

@@ -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:
@@ -80,7 +80,7 @@ def convert_audio_track(stream_index, channels, temp_dir, source_file, should_do
# Step 2: Normalize the track with SoX
print(" - Normalizing with SoX...")
run_cmd(["sox", str(temp_extracted), str(temp_normalized), "--temp", str(temp_dir), "loudness", "-18"])
run_cmd(["sox_ng", "--show-progress", str(temp_extracted), str(temp_normalized), "--temp", str(temp_dir), "loudness", "-18"])
# Step 3: Encode to Opus with the correct bitrate
bitrate = "192k" # Fallback

View File

@@ -24,7 +24,7 @@ The following command-line tools must be installed and available in your system'
* `ffmpeg`
* `ffprobe`
* `mkvmerge`
* `sox`
* `sox_ng`
* `opusenc`
* `mediainfo`

View File

@@ -21,7 +21,7 @@ The following command-line tools must be installed and available in your system'
* `ffprobe`
* `mkvmerge`
* `mkvpropedit`
* `sox`
* `sox_ng`
* `opusenc`
* `mediainfo`
* `alabamaEncoder`

View File

@@ -24,7 +24,7 @@ The following command-line tools must be installed and available in your system'
* `ffprobe`
* `mkvmerge`
* `mkvpropedit`
* `sox` (or `sox-ng`)
* `sox_ng`
* `opusenc`
* `mediainfo`
* `av1an`

View File

@@ -11,7 +11,7 @@ from pathlib import Path
REQUIRED_TOOLS = [
"ffmpeg", "ffprobe", "mkvmerge", "mkvpropedit",
"sox", "opusenc", "mediainfo", "av1an", "HandBrakeCLI" # Added HandBrakeCLI
"sox_ng", "opusenc", "mediainfo", "av1an", "HandBrakeCLI" # Added HandBrakeCLI
]
DIR_COMPLETED = Path("completed")
DIR_ORIGINAL = Path("original")
@@ -69,7 +69,7 @@ def convert_audio_track(index, ch, lang, audio_temp_dir, source_file, should_dow
print(f" - Normalizing Audio Track #{index} with SoX...")
run_cmd([
"sox", str(temp_extracted), str(temp_normalized), "--temp", str(audio_temp_path), "loudness", "-18"
"sox_ng", "--show-progress", str(temp_extracted), str(temp_normalized), "--temp", str(audio_temp_path), "loudness", "-18"
])
# Set bitrate based on the final channel count of the Opus file.

View File

@@ -11,7 +11,7 @@ from pathlib import Path
REQUIRED_TOOLS = [
"ffmpeg", "ffprobe", "mkvmerge", "mkvpropedit",
"sox", "opusenc", "mediainfo", "av1an", "HandBrakeCLI" # Added HandBrakeCLI
"sox_ng", "opusenc", "mediainfo", "av1an", "HandBrakeCLI" # Added HandBrakeCLI
]
DIR_COMPLETED = Path("completed")
DIR_ORIGINAL = Path("original")
@@ -69,7 +69,7 @@ def convert_audio_track(index, ch, lang, audio_temp_dir, source_file, should_dow
print(f" - Normalizing Audio Track #{index} with SoX...")
run_cmd([
"sox", str(temp_extracted), str(temp_normalized), "--temp", str(audio_temp_path), "loudness", "-18"
"sox_ng", "--show-progress", str(temp_extracted), str(temp_normalized), "--temp", str(audio_temp_path), "loudness", "-18"
])
# Set bitrate based on the final channel count of the Opus file.

View File

@@ -24,7 +24,7 @@ REQUIRED_TOOLS_MAP = {
"ffprobe": "extra/ffmpeg", # Part of ffmpeg package
"mkvmerge": "extra/mkvtoolnix-cli",
"mkvpropedit": "extra/mkvtoolnix-cli", # Part of mkvtoolnix-cli
"sox": "extra/sox",
"sox_ng": "extra/sox-ng",
"opusenc": "extra/opus-tools",
"mediainfo": "extra/mediainfo",
"alabamaEncoder": "pipx install alabamaEncoder"
@@ -76,7 +76,7 @@ def convert_audio_track(index, ch, lang, audio_temp_dir, source_file, should_dow
print(f" - Normalizing Audio Track #{index} with SoX...")
run_cmd([
"sox", str(temp_extracted), str(temp_normalized), "--temp", str(audio_temp_path), "loudness", "-18"
"sox_ng", "--show-progress", str(temp_extracted), str(temp_normalized), "--temp", str(audio_temp_path), "loudness", "-18"
])
# Set bitrate based on the final channel count of the Opus file.