From: Paul Hänsch Date: Tue, 17 Jun 2025 19:04:51 +0000 (+0200) Subject: performance: prescale thumbnails befor montage X-Git-Url: http://git.plutz.net/?a=commitdiff_plain;h=57bb813a6fbb3407bd6b9b027ff405a6bc7d9b7a;p=serve0 performance: prescale thumbnails befor montage --- 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 \