„to_opus.sh“ ändern

This commit is contained in:
esche 2023-05-18 15:18:10 +02:00
parent 9c984a19df
commit 4dc0b7f648

View file

@ -32,7 +32,7 @@ for file in **/*.@($extension); do
awk -v file="$file" -v file_output="${file%.*}.opus" '
BEGIN{
ORS=" ";
print "ffmpeg -threads 4 -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
if($1==1) print $2>=64000 ? "-b:a:"NR-1" 128k" : "-b:a:"NR-1" "$2
@ -45,12 +45,12 @@ for file in **/*.@($extension); do
}')
is_video=$(ffprobe "$file" -v 0 -show_entries stream=codec_type -of compact=p=0:nk=1:s="\ " | grep video)
if [[ -n "$is_video" ]]; then
#is_video=$(ffprobe "$file" -v 0 -show_entries stream=codec_type -of compact=p=0:nk=1:s="\ " | grep video)
#if [[ -n "$is_video" ]]; then
eval "$command"
else
#else
#eval "$command" && rm "$file"
fi
#fi
done