From 7575a3e031d0af5b946cec510f32d528badd4755 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Thu, 15 Aug 2019 09:56:21 +0530 Subject: Plugin vidthumb --- plugins/vidthumb | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 plugins/vidthumb (limited to 'plugins/vidthumb') diff --git a/plugins/vidthumb b/plugins/vidthumb new file mode 100755 index 0000000..a6eb0e4 --- /dev/null +++ b/plugins/vidthumb @@ -0,0 +1,27 @@ +#!/usr/bin/env sh + +# Description: Generate video thumbnails and view them +# +# Requires: +# ffmpegthumbnailer: https://github.com/dirkvdb/ffmpegthumbnailer +# lsix: https://github.com/hackerb9/lsix +# +# Shell: POSIX compliant +# Author: Arun Prakash Jana + +mkdir .nthumbs > /dev/null 2>&1 + +for file in *; do + if [ -f "$file" ]; then + ffmpegthumbnailer -i "$file" -o .nthumbs/"${file%%.*}".jpg 2> /dev/null + fi +done + +# render thumbnails in lsix +lsix .nthumbs/* + +# remove the thumbnails +rm -rf .nthumbs + +echo -n "Press any key to exit..." +read dummy -- cgit v1.2.3-70-g09d2