Update downmix.sh
This commit is contained in:
parent
624c0a085f
commit
0f51657f81
22
downmix.sh
22
downmix.sh
|
@ -1,17 +1,19 @@
|
|||
read -p 'Gain db: ' GAIN
|
||||
# Simple script to downmix a 5.1/5.1 side flac file to stereo,
|
||||
# and optionally resample to cd quality
|
||||
|
||||
read -p 'Gain db [+3db]: ' GAIN
|
||||
if [[ -z "$GAIN" ]]; then
|
||||
GAIN=2
|
||||
GAIN=3
|
||||
fi
|
||||
|
||||
read -p 'Resample to cd quality? [No]: ' RES
|
||||
|
||||
mkdir -p down
|
||||
|
||||
for file in *.flac; do
|
||||
#ffmpeg -i "$file" -filter:a "volume=${GAIN}dB" -ac 2 "down/$file"
|
||||
#ffmpeg -i "$file" -ac 2 "down/$file"
|
||||
#ffmpeg -i "$file" -af "pan=stereo|FL < 1.0*FL + 0.707*FC + 0.707*BL+0.5*LFE|FR < 1.0*FR + 0.707*FC + 0.707*BR+0.5*LFE" "down/$file"
|
||||
ffmpeg -i "$file" -af "pan=stereo| FL < FL + 0.707*FC + 0.707*BL + 0.707*SL + 0.5*LFE | FR < FR + 0.707*FC + 0.707*BR + 0.707*SR + 0.5*LFE,volume=${GAIN}dB,aresample=resampler=soxr:precision=28" -sample_fmt s16 -ar 44100 -map_metadata -1 "down/${file/%flac/wav}"
|
||||
#"FL+FR+FC+LFE+SL+SR"
|
||||
#"pan=stereo| FL < FL + 0.707*FC + 0.707*BL + 0.707*SL + 0.5*LFE | FR < FR + 0.707*FC + 0.707*BR + 0.707*SR + 0.5*LFE"
|
||||
#"pan=stereo| FL < FL + 0.5*FC + 0.6*BL + 0.6*SL | FR < FR + 0.5*FC + 0.6*BR + 0.6*SR"
|
||||
#ffmpeg -i "$file" -af "pan=stereo|FL < 1.0*FL + 0.707*FC + 0.707*BL|FR < 1.0*FR + 0.707*FC + 0.707*BR" "down/$file"
|
||||
if [[ -z "$RES" ]]; then
|
||||
ffmpeg -i "$file" -af "pan=stereo| FL < FL + 0.707*FC + 0.707*BL + 0.707*SL + 0.5*LFE | FR < FR + 0.707*FC + 0.707*BR + 0.707*SR + 0.5*LFE,volume=${GAIN}dB" "down/$file"
|
||||
else
|
||||
ffmpeg -i "$file" -af "pan=stereo| FL < FL + 0.707*FC + 0.707*BL + 0.707*SL + 0.5*LFE | FR < FR + 0.707*FC + 0.707*BR + 0.707*SR + 0.5*LFE,volume=${GAIN}dB,aresample=resampler=soxr:precision=28" -sample_fmt s16 -ar 44100 -map_metadata -1 "down/${file/%flac/wav}"
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Reference in New Issue