Skip to content

Instantly share code, notes, and snippets.

@roblanf
Created October 29, 2018 18:59
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 roblanf/64743d03b5b41ee920e50ccd3d644103 to your computer and use it in GitHub Desktop.
Save roblanf/64743d03b5b41ee920e50ccd3d644103 to your computer and use it in GitHub Desktop.
echo "copying source pics"
mkdir source_pics
cp ~/pikrellcam/media/timelapse/* source_pics
cd source_pics
echo "renaming"
mkdir renamed
counter=1
ls -1tr *.jpg | while read filename; do cp $filename renamed/$(printf %05d $counter)_$filename; ((cou\
nter++)); done
cd renamed
echo "resizing"
mkdir resized
mogrify -path resized -resize 1920x1080 *.jpg
cd resized
echo "stitching"
ffmpeg -r 25 -pattern_type glob -i '*.jpg' -c:v mjpeg -q:v 2 ../../../output.avi
echo "cleaning up"
rm -rf source_pics
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment