Created
February 17, 2018 17:16
-
-
Save zsiciarz/c3a92515da8e39df64594bd2d17fa80b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euox pipefail | |
IFS=$'\n\t' | |
INTERPOLATED_COUNT=25 | |
PHOTOS_DIR=$1 | |
TEMPORARY_FRAMES_DIR=tmp_frames | |
echo "Making timelapse from photos in $PHOTOS_DIR..." | |
echo "Blending interpolated frames..." | |
gifblender -o $TEMPORARY_FRAMES_DIR -s $INTERPOLATED_COUNT $PHOTOS_DIR/*.jpg | |
echo "Putting frames together..." | |
ffmpeg -r 25 -pattern_type glob -i "$TEMPORARY_FRAMES_DIR/*.jpg" -s 1333x2000 -b:v 60M -y "$PHOTOS_DIR.avi" | |
echo "Cleaning up..." | |
rm $TEMPORARY_FRAMES_DIR/*.jpg | |
echo "Timelapse complete." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment