bugfix for files not containing audios

This commit is contained in:
esche 2023-07-27 00:06:51 +02:00
parent da4483fd12
commit 43271c64a8

View file

@ -40,6 +40,8 @@ for file in **/*.@($extension); do
# array over the bitrates of all streams # 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")" 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 # set a channel dependend bitrate for every audio stream
# to use ffmpegs default just comment out this block # to use ffmpegs default just comment out this block
for ((index=0; index<${#channels[@]};index++)); do for ((index=0; index<${#channels[@]};index++)); do