From e8a0b61bbc4266c5f8ee9595368b5e005aa301d8 Mon Sep 17 00:00:00 2001 From: esche Date: Tue, 4 Jul 2023 15:48:03 +0200 Subject: [PATCH] Bugfix --- to_opus.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/to_opus.sh b/to_opus.sh index 298325a..799118d 100644 --- a/to_opus.sh +++ b/to_opus.sh @@ -35,10 +35,10 @@ for file in **/*.@($extension); do print "ffmpeg -i \""file"\" -map 0:a -c:a libopus" } { # https://wiki.xiph.org/Opus_Recommended_Settings - if($1==1) print $2>=64000 ? "-b:a:"NR-1" 128k" : "-b:a:"NR-1" "$2 - else if($1==2) print $2>=500000 ? "-b:a:"NR-1" 128k" : "-b:a:"NR-1" "$2 - else if($1<=6) print $2>=256000 ? "-b:a:"NR-1" 128k" : "-b:a:"NR-1" "$2 - else print $2>=450000 ? "-b:a:"NR-1" 128k" : "-b:a:"NR-1" "$2 + if($1==1) print $2>=64000 ? "-b:a:"NR-1" 64k" : "-b:a:"NR-1" "$2 + else if($1==2) print $2>=128000 ? "-b:a:"NR-1" 128k" : "-b:a:"NR-1" "$2 + else if($1<=6) print $2>=256000 ? "-b:a:"NR-1" 256k" : "-b:a:"NR-1" "$2 + else print $2>=450000 ? "-b:a:"NR-1" 450k" : "-b:a:"NR-1" "$2 } END{ print "\""file_output"\" -v info -hide_banner"