mirror of
https://github.com/jarun/nnn.git
synced 2024-08-19 14:02:59 +00:00
28 lines
561 B
Plaintext
28 lines
561 B
Plaintext
|
#!/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
|