lms-video/scripts/make_thumbs.sh
Santi Noreña ef52ae20d8 - Menus
- Open/Save file
- Add CITP/MSEx menu
- Make Thumbs
- Init CITP/MSEx
2013-02-11 17:52:36 +01:00

20 lines
561 B
Bash
Executable file

#!/bin/bash
# make_thumbs v0.0.2
# Script que genera thumbnails de todas las películas en el directorio Media
# Copyright Santi Noreña 2012-2013
# GPL License
cd $0 ||{
echo "Can not change to directory." $0
exit $E_XCD;
}
for folder in $(find -maxdepth 1 -type d); do
rm $folder/thumbs/*
mkdir $folder/thumbs
done
for file in $(find . -maxdepth 2 -mindepth 2 -type f ); do
avconv -i $file -f image2 -frames:v 1 -s 64x46 -vcodec mjpeg $file.jpg
done
for folder in $(find -maxdepth 1 -type d); do
mv $folder/*.jpg $folder/thumbs
done
exit 0