Heather's World

Heather has been using her Nabi Jr. tablet for awhile now.  It has a camera on it that can spin from front-facing to back-facing.  I configured it to automatically sync the pictures to the computer.

With the pictures all in place I created a time-lapse of Heather's past year.  If you don't care about the nerdy details of how I made it, jump to the bottom to watch the video.

It started with the 925 pictures she took over the last year.  I ran them through ImageMagick to pad them to a consistent size:

$ cd /home/heather/Pictures
$ mkdir ~/Desktop/tmp
$ find "./2014/12 December 2014" "./2015" -name "*.jpg" -exec mogrify -gravity center -background black -extent 1600x1600 -path ~/Desktop/tmp {} \;

Then I, again, used ImageMagick to interpolate 3 transition frames between each picture so it's less jumpy (still pretty jumpy though):

$ cd ~/Desktop/tmp
$ mkdir morphs
$ convert *.jpg -morph 3 ./morphs/out-%04d.jpg

Okay, that's a little bit of a lie.  ImageMagick's convert tool currently (version 6.x) reads in all input before doing anything.  When it tries to load in the 925 images it uses up all the memory in my computer and then dies.  So I had to break it up into batches (IM 7 supposedly fixes this problem).  I used batches of 100 which still used about 7 GB of RAM:

$ ls *.jpg | head -n 100 | tail -n 100 | convert @- -morph 3 morphs/a-%04d.jpg
$ ls *.jpg | head -n 200 | tail -n 101 | convert @- -morph 3 morphs/b-%04d.jpg
$ ls *.jpg | head -n 300 | tail -n 101 | convert @- -morph 3 morphs/c-%04d.jpg
# .... all the way through head -n 900 .....
$ ls *.jpg | tail -n 26 | convert @- -morph 3 morphs/j-%04d.jpg

Doing it in batches results in a duplicate frame between each batch, so at this point we have to delete b-0000.jpg, c-0000.jpg, d-0000.jpg, etc. (but keep a-0000.jpg).

Now we're ready to run them through mencoder to produce our video:

$ cd morphs
$ mencoder mf://\*.jpg -mf w=1600:h=1600:fps=16:type=jpg -ovc lavc -lavcopts vcodec=mpeg4 -of lavf -lavfopts format=mp4 -oac copy -o ~/Desktop/output.mp4

I tried doing this with ffmpeg/avconv, but it kept cropping my images and I couldn't make it work.  I also spent hours trying to get all this to work without using intermediate files, but ultimately failed.  This process is a little more arduous (I might get around to writing it all into a script at some point) but it does work.

Here's is the view from Heather's world from December 2014 through September 2015 (there's no audio):

Or right-click and "save as..." to download it here: Heather's View - Dec 2014 - Sep 2015 (small)

If you watch closely you'll see Christmas, Jess being very pregnant, Corinne appears, Grandma visits, Kyle's birthday, and a lot of wandering around the house.

It's not super exciting, but I think it's kind of an interesting insight into Heather's world.

Leave a Reply

Your email address will not be published. Required fields are marked *