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"