added mono as option with 64k bitrate for mono
This commit is contained in:
@@ -82,14 +82,16 @@ def convert_audio_track(index, ch, lang, audio_temp_dir, source_file, should_dow
|
|||||||
else:
|
else:
|
||||||
# Not downmixing (or source is already stereo or less).
|
# Not downmixing (or source is already stereo or less).
|
||||||
# Base bitrate on the source channel count.
|
# Base bitrate on the source channel count.
|
||||||
if ch == 2: # Stereo
|
if ch == 1: # Mono
|
||||||
|
bitrate = "64k"
|
||||||
|
elif ch == 2: # Stereo
|
||||||
bitrate = "128k"
|
bitrate = "128k"
|
||||||
elif ch == 6: # 5.1 Surround
|
elif ch == 6: # 5.1 Surround
|
||||||
bitrate = "256k"
|
bitrate = "256k"
|
||||||
elif ch == 8: # 7.1 Surround
|
elif ch == 8: # 7.1 Surround
|
||||||
bitrate = "384k"
|
bitrate = "384k"
|
||||||
else: # Mono or other layouts
|
else: # Other layouts
|
||||||
bitrate = "96k" # A sensible default for mono.
|
bitrate = "192k" # Fallback
|
||||||
|
|
||||||
print(f" - Encoding Audio Track #{index} to Opus at {bitrate}...")
|
print(f" - Encoding Audio Track #{index} to Opus at {bitrate}...")
|
||||||
run_cmd([
|
run_cmd([
|
||||||
|
|||||||
Reference in New Issue
Block a user