nnn/plugins/vidthumb

28 lines
563 B
Plaintext
Raw Normal View History

2019-08-15 04:26:21 +00:00
#!/usr/bin/env sh
# Description: Generate video thumbnails and view them
#
2020-05-06 05:29:57 +00:00
# Dependencies:
2019-08-15 04:26:21 +00:00
# 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
2019-11-21 20:44:25 +00:00
printf "Press any key to exit..."
read -r _