replaced sox_ng with ffmpeg for audio-processing
This commit is contained in:
@@ -67,9 +67,10 @@ def convert_audio_track(index, ch, lang, audio_temp_dir, source_file, should_dow
|
||||
ffmpeg_args += ["-c:a", "flac", str(temp_extracted)]
|
||||
run_cmd(ffmpeg_args)
|
||||
|
||||
print(f" - Normalizing Audio Track #{index} with SoX...")
|
||||
print(f" - Normalizing Audio Track #{index} with ffmpeg (loudnorm)...")
|
||||
run_cmd([
|
||||
"sox_ng", "--show-progress", str(temp_extracted), str(temp_normalized), "--temp", str(audio_temp_path), "loudness", "-18"
|
||||
"ffmpeg", "-v", "quiet", "-stats", "-y", "-i", str(temp_extracted),
|
||||
"-af", "loudnorm=I=-14:LRA=7:tp=-1", "-c:a", "flac", str(temp_normalized)
|
||||
])
|
||||
|
||||
# Set bitrate based on the final channel count of the Opus file.
|
||||
|
||||
Reference in New Issue
Block a user