diff options
author | Mroik/PositiveC <fainamirko@gmail.com> | 2023-11-11 15:09:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-11 09:09:35 -0500 |
commit | 2796e82abdadadb0facbfc1df2816eb2d69ed502 (patch) | |
tree | 798cd9cc32d9eeec95df39b2bb2197c282469032 | |
parent | ecdcd0ae5f2c87658056209bb8747b7790f6123d (diff) |
Add thumbnail for video preview on kitty (#451)
* Add thumbnail for video preview on kitty
* Hide ffmpegthumbnailer output
This can cause problems on videos that have some kind of malformation
-rw-r--r-- | docs/image_previews/kitty.md | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/docs/image_previews/kitty.md b/docs/image_previews/kitty.md index 84c142d..6e00060 100644 --- a/docs/image_previews/kitty.md +++ b/docs/image_previews/kitty.md @@ -30,11 +30,20 @@ function image { "$1" 2>/dev/null } +function video { + ffmpegthumbnailer -i "$1" -o "${TMP_FILE}" -s 0 2>/dev/null + image "${TMP_FILE}" +} + case "$mimetype" in image/*) image "${FILE_PATH}" ;; *) + video/*) + video "${FILE_PATH}" + ;; + *) kitty +kitten icat \ --transfer-mode=file \ --clear 2>/dev/null |