Skip to content

Instantly share code, notes, and snippets.

@mperlet
Created August 28, 2014 06:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mperlet/be10f0c28074d01adfc8 to your computer and use it in GitHub Desktop.
Save mperlet/be10f0c28074d01adfc8 to your computer and use it in GitHub Desktop.
Picraf ist ein kleines Shell-Script welches mit 2 optionalen Parametern ein Zeitraffer Video erstellt. Verwendet wird fswebcam und ffmpeg.
#!/bin/bash
if [[ "$1" == "" ]]; then
to=1440
else
to=$1
fi
if [[ "$2" == "" ]]; then
waitsek=60
else
waitsek=$2
fi
echo "$to Pics ($waitsek sek) "
for i in $(seq 1 $to)
do
printf " $i-tes Bild\r"
fswebcam --quiet --no-banner --jpeg 95 --resolution 1280x720 --save "pic"$(printf %05d $i)".jpg"
sleep $waitsek
done
ffmpeg -i pic%05d.jpg -vcodec copy picraf.mp4
rm *jpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment