aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/vidthumb
blob: a6eb0e4383d904893de26113772fa42852872139 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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