Make ffmpeg for optional for audio preview

This commit is contained in:
Nikita Ivanov 2022-11-27 02:55:09 +01:00
parent 9417ecb426
commit dc41738b32
No known key found for this signature in database
GPG Key ID: 6E656AC5B97B5133

View File

@ -4,9 +4,10 @@ audio() {
ffmpegthumbnailer -i "$f" -s 0 -q 50% -t 10 -o "$cache_f" 2>/dev/null
}
x="$(ffmpeg -hide_banner -i "$f" 2>&1)"
printf '%s\n' "$x"
y=$((y + $(printf '%s\n' "$x" | wc -l)))
if exists ffmpeg; then
x="$(ffmpeg -hide_banner -i "$f" 2>&1)"
printf '%s\n' "$x"
y=$((y + $(printf '%s\n' "$x" | wc -l)))
fi
convert_and_show_image audio