diff --git a/to_opus/to_opus.sh b/to_opus/to_opus.sh index 6e6117a..9f452f0 100755 --- a/to_opus/to_opus.sh +++ b/to_opus/to_opus.sh @@ -40,6 +40,8 @@ for file in **/*.@($extension); do # array over the bitrates of all streams readarray -t bitrates <<<"$(ffprobe -v error -select_streams a -show_entries stream=bit_rate -of compact=p=0:nk=1 "$file")" + if [[ ${#channels} == 0 ]]; then continue; fi + # set a channel dependend bitrate for every audio stream # to use ffmpegs default just comment out this block for ((index=0; index<${#channels[@]};index++)); do