#/bin/sh # Simple StopMotion Movie Maker, based on Mencoder # Copyright (c) 2008 Erwan LEHERISSE - contact [AT] imaginair.net - www.imaginair.net # # Resize jpeg images and create a stopmotion movie with all jpeg images in the current folder # Redimensionne les images jpeg et créer une vidéo en stopmotion avec toutes les images jpeg du dossier courant # # ---------------------------------------------------------------- # Under Gnu/GPL license v2 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation (version 2). # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # ---------------------------------------------------------------- # if [ -z $1 ] || [ -z $2 ] then echo echo Simple Stopmotion Movie Maker echo Based on Mencoder - By Erwan LEHERISSE - Under GNU Public Licence v2 or later echo echo Usage : ./ssmmaker [video name] [fps] [width - optional] echo echo Example : ./ssmaker myvideo 10 800 echo will create a video from jpeg images in the current folder, with 10 images per second and resizing images to 800px max before. echo exit 1 else NAME=$1 FPS=$2 WIDTH=$3 fi if [ ! -z $3 ] then echo echo ----------------------------------- echo echo First step : resizing echo echo ----------------------------------- echo for COPYFILE in *.JPG do convert -resize $WIDTHx$WIDTH $COPYFILE $COPYFILE #echo $COPYFILE resized echo -ne $COPYFILE resized \\r done fi echo echo ----------------------------------- echo echo Final step : video encoding echo echo ----------------------------------- echo mencoder mf://*.JPG -mf fps=$FPS:type=jpg -ovc lavc -lavcopts vcodec=mjpeg -o $NAME.avi FOLDER=`pwd` echo echo ----------------------------------- echo echo Animation created $FOLDER/$NAME.avi echo