Last active
August 29, 2015 14:14
-
-
Save jackmahoney/02c9890e610b313a52bb to your computer and use it in GitHub Desktop.
EyeEm in motion
This file contains hidden or 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 | |
#script takes a video and converts it to frames | |
#it then slices the frames and uploads them to an eyeem album | |
#when you scroll the album fast enough it turns back into a video | |
output_dir=./output/ | |
#convert video to frames, dump in output dir | |
ffmpeg -i $1 "$output_dir"image-%d.jpg | |
#slice and filter frames | |
for f in "$output_dir"* | |
do | |
#convert image to grayscale | |
convert "$f" -colorspace Gray "$f" | |
#cut image into thirds because eyeem grid | |
#uses three columns | |
convert -crop 33%x100% "$f" "$f" | |
#remove the left over 1% | |
rm "$output_dir"*-3.jpg | |
#remove original | |
rm "$f" | |
done | |
#upload images using (secret) upload script | |
#can't share this as it uses a private API | |
ruby upload.rb "$output_dir" jackinmotion |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Demo at www.eyeem.com/u/jackinmotion