Skip to content

Instantly share code, notes, and snippets.



Last active Aug 29, 2015
What would you like to do?
EyeEm in motion
#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
#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"*
#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"
#upload images using (secret) upload script
#can't share this as it uses a private API
ruby upload.rb "$output_dir" jackinmotion

This comment has been minimized.

Copy link
Owner Author

@jackmahoney jackmahoney commented Jan 31, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment