This commit is contained in:
esche 2023-07-04 15:48:03 +02:00
parent aea5b45965
commit e8a0b61bbc

View file

@ -35,10 +35,10 @@ for file in **/*.@($extension); do
print "ffmpeg -i \""file"\" -map 0:a -c:a libopus" print "ffmpeg -i \""file"\" -map 0:a -c:a libopus"
} }
{ # https://wiki.xiph.org/Opus_Recommended_Settings { # https://wiki.xiph.org/Opus_Recommended_Settings
if($1==1) print $2>=64000 ? "-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>=500000 ? "-b:a:"NR-1" 128k" : "-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" 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" 128k" : "-b:a:"NR-1" "$2 else print $2>=450000 ? "-b:a:"NR-1" 450k" : "-b:a:"NR-1" "$2
} }
END{ END{
print "\""file_output"\" -v info -hide_banner" print "\""file_output"\" -v info -hide_banner"