From 57bb813a6fbb3407bd6b9b027ff405a6bc7d9b7a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Tue, 17 Jun 2025 21:04:51 +0200 Subject: [PATCH] performance: prescale thumbnails befor montage --- thumbnail.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/thumbnail.sh b/thumbnail.sh index 09f5ab0..f13ec1c 100755 --- a/thumbnail.sh +++ b/thumbnail.sh @@ -14,9 +14,11 @@ gen_thumb(){ # ffmpeg -nostdin -y -i "$file" -vf fps=11/$length,scale=320:-2 -frames 10 "$tmp/thumb_%02d.jpg" 2>&- for n in 1 2 3 4 5 6 7 8 9 10; do - ffmpeg -nostdin -y -ss "$((n * length / 11))" -i "$file" -frames 1 "$tmp/thumb_$((n - 1)).jpg" 2>&- + nice -4 \ + ffmpeg -nostdin -y -ss "$((n * length / 11))" -i "$file" -frames 1 -filter scale=640:-2 "$tmp/thumb_$((n - 1)).jpg" 2>&- done + nice -4 \ montage "$tmp"/thumb_[0-9].jpg \ -background "$bgcolor" \ -tile 10x1 -geometry 320x180+0+0 \ -- 2.39.5