Krolyxon
Commit ffd4a5b

Branches

Refs →

auroraffd4a5b

lf: use ffmpegthumbnailer for video thumbnail preview

Author
krolxon
Date
2025-12-08 23:59 +0530
Parent
22b8483
Commit
ffd4a5b1c42ef9bb300f0cb0e8f1710694b5390c

+5 −0

1 file changed

  1. M .config/lf/scope +5 −0
M .config/lf/scope View
@@ -3,6 +3,11 @@ case "$(file -Lb --mime-type -- "$1")" in
33 image/*)
44 chafa -f sixel -s "$2x$3" --animate off --polite on -t 1 --bg black "$1"
55 ;;
6+ video/*)
7+ CACHE="${XDG_CACHE_HOME:-$HOME/.cache}/lf/thumb.$(stat --printf '%n\0%i\0%F\0%s\0%W\0%Y' -- "$(readlink -f "$1")" | sha256sum | cut -d' ' -f1)"
8+ ffmpegthumbnailer -i "$1" -o "$CACHE" -s 0
9+ chafa -f sixel -s "$2x$3" --animate off --polite on -t 1 --bg black "$CACHE"
10+ ;;
611 text/*)
712 bat "$1"
813 ;;