change container to ogg

This commit is contained in:
nnduc
2025-08-22 07:34:50 +07:00
parent cab8488ab0
commit 0de884e4ff

View File

@@ -216,15 +216,15 @@ process_flac_file() {
# Determine output file path
if [ "$REPLACE_MODE" = true ]; then
# Replace .flac with .opus in same location
output_file="${input_file%.flac}.opus"
# Replace .flac with .ogg in same location
output_file="${input_file%.flac}.ogg"
elif [ "$PRESERVE_MODE" = true ]; then
local dir=$(dirname "$input_file")
local filename=$(basename "$input_file" .flac)
output_file="$dir/${filename}.opus"
output_file="$dir/${filename}.ogg"
else
# Change extension from .flac to .opus
local opus_relative_path="${relative_path%.flac}.opus"
# Change extension from .flac to .ogg
local opus_relative_path="${relative_path%.flac}.ogg"
output_file="$OUTPUT_DIR/$opus_relative_path"
fi
@@ -265,7 +265,7 @@ process_flac_file() {
fi
# Create temporary file for safe processing
local temp_file="${output_file}.tmp.opus"
local temp_file="${output_file}.tmp.ogg"
echo " CONVERTING: $relative_path → Opus ${OPUS_BITRATE}kbps"