From 1b04c155137b3561d27c753f0e1d3b88e1e2e004 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Sat, 2 Oct 2021 22:01:28 +0200 Subject: [PATCH] improved reliability --- thumbnail.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thumbnail.sh b/thumbnail.sh index a2686be..09f5ab0 100644 --- a/thumbnail.sh +++ b/thumbnail.sh @@ -8,7 +8,7 @@ gen_thumb(){ local tmp="${TMPDIR:-/tmp}/serve0tmp_$$/" lenght n if [ "${file%.part}" = "${file}" -a ! -s "$thumb" -a -s "$file" ] && mkdir "$tmp"; then - length="$( ffprobe -show_entries stream=duration "$file" 2>&- )" + length="$( ffprobe -show_entries format=duration "$file" 2>&- )" length="${length#*duration=}" length="${length%%${BR}*}" length="${length%.*}" # ffmpeg -nostdin -y -i "$file" -vf fps=11/$length,scale=320:-2 -frames 10 "$tmp/thumb_%02d.jpg" 2>&- -- 2.39.2