diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2019-08-15 09:56:21 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2019-08-15 10:06:41 +0530 |
commit | 7575a3e031d0af5b946cec510f32d528badd4755 (patch) | |
tree | 1f9d296d1a439ab3a782e8da51df9583f6e475c8 /plugins/vidthumb | |
parent | 4ab13b1b349e7ebac9d393660a06f4050eaf4a68 (diff) | |
download | nnn-7575a3e031d0af5b946cec510f32d528badd4755.tar.gz |
Plugin vidthumb
Diffstat (limited to 'plugins/vidthumb')
-rwxr-xr-x | plugins/vidthumb | 27 |
1 files changed, 27 insertions, 0 deletions
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 |