Add script for generating thumbnails for all viedeos
This commit is contained in:
parent
30798acb6f
commit
2bd5241c62
1 changed files with 21 additions and 0 deletions
21
recursive.sh
Executable file
21
recursive.sh
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
|
||||
exec 3> >(zenity --progress --title="generating thumbnails..." --percentage=0 --width=400 --no-cancel )
|
||||
echo "# searching for files..." >&3
|
||||
files=$(find . -name '*.webm')
|
||||
echo "$(tput setaf 2)The following files werde found:$(tput sgr0)"
|
||||
echo "$files"
|
||||
echo "----"
|
||||
num_files=$(echo "$files"| wc -l)
|
||||
a=1
|
||||
find . -name '*.webm' -print0 | while read -d $'\0' file # http://stackoverflow.com/a/15931055
|
||||
do
|
||||
echo "$(tput setaf 2)$file$(tput sgr0)"
|
||||
echo "# $file ($a/$num_files)" >&3;
|
||||
./thumbnail.sh "$file" best
|
||||
echo "$a/$num_files*100" | bc -l >&3 #percentage
|
||||
((a++))
|
||||
done
|
||||
|
||||
echo "# finished generating thumbnails" >&3
|
||||
notify-send "Thumbnails" "finished" #im Paket libnotify-bin
|
Reference in a new issue