summaryrefslogtreecommitdiff
path: root/app-misc/ctpv/files
diff options
context:
space:
mode:
authormhsn <mail@mhsn.net>2025-12-30 11:39:45 +0000
committermhsn <mail@mhsn.net>2025-12-30 11:48:59 +0000
commit6a8076144b1f023c2721b9328487b5b7109032e1 (patch)
treea282994e9cc53bc0ee3237d98fb3b3a05b220a13 /app-misc/ctpv/files
parent6cbc1b85dd53119cbc9ed05def77a8304d07632f (diff)
downloadadelie-6a8076144b1f023c2721b9328487b5b7109032e1.tar.gz
adelie-6a8076144b1f023c2721b9328487b5b7109032e1.zip
add ctpv ebuild
Diffstat (limited to 'app-misc/ctpv/files')
-rw-r--r--app-misc/ctpv/files/thumbnail-grid.diff17
1 files changed, 17 insertions, 0 deletions
diff --git a/app-misc/ctpv/files/thumbnail-grid.diff b/app-misc/ctpv/files/thumbnail-grid.diff
new file mode 100644
index 0000000..8645b37
--- /dev/null
+++ b/app-misc/ctpv/files/thumbnail-grid.diff
@@ -0,0 +1,17 @@
+diff --git i/sh/prev/video.sh w/sh/prev/video.sh
+index 3e85e4f..d3d9f74 100644
+--- i/sh/prev/video.sh
++++ w/sh/prev/video.sh
+@@ -1,7 +1,11 @@
+ # video: ffmpegthumbnailer
+
+ video() {
+- ffmpegthumbnailer -i "$f" -o "$cache_f" -s 0 -t 50% 2>/dev/null
++ _wh=$(ffprobe -v error -select_streams v -show_entries stream=width,height -of csv=p=0:s=x "$f")
++ _w=$(echo "${_wh%%x*}/4" | bc)
++ _h=$(echo "${_wh##*x}/4" | bc)
++ thumbnail-grid -r 4 -c 4 -q 100 -w $_w -h $_h "$f" "$cache_f" 2>/dev/null
++ magick "$cache_f" "JPG:$cache_f"
+ }
+
+ convert_and_show_image video