Timelapses with Android

My wife and I decided to add a deck to our home. It’s something we’d been discussing for years. Should it run the length of the house? Or should it be shorter? Narrower? Do we want to allow space for a future hot tub (which we’ll probably never get)? Built in pergola? Big stairs? Little stairs? It’s a conversation I think we could have kept having for many more years if we had indulged ourselves. But sometimes you just have to know when it’s time to make a decision and move on.

So we settled on a design, talked to contractors and code enforcement folks, and finally scheduled the build. I really, REALLY wanted to do a timelapse of the whole thing, but I wasn’t sure what to use. I considered using something like CHDK on my DSLR. The idea of leaving the camera out in the elements for days on end didn’t appeal to me. So I dismissed that idea fairly quickly. I had an old Samsung Galaxy S3 sitting in a drawer collecting dust and wondered if I might use that instead. It took decent photos. And if it died in the middle of the build, I wouldn’t be terribly heartbroken about it. So that’s the path I went down.

As a software developer, the instinct is to write software solutions for your own problems. I began listing out the things I would need in order to do the timelapse in Android – wake locks, a Service, an Activity for starting/stopping captures, a preview surface, camera code, storage code, etc. And then I began writing the app. No sooner had I started than I realized I only had 3 days before the builders began their work. So I backed away and began looking at what was already in the Play store.

That’s when I stumbled upon Lapse It Pro. It did everything I needed. And it allowed me to save full-frame, 8 megapixel image sequences as opposed to just a video – a bonus because I wanted to stitch the video together outside of the phone. I installed it on the S3 and had it working in no time. The UI is straightforward. And the entire capture process can be configured – frequency, video/image format, image size, etc. I fell in love with it right away. (I’m already thinking of new projects I can use it on.)

The next thing I needed to figure out was power. I would be placing the phone in or near trees, far away from any electrical outlets. As a test, I charged the phone completely and started a 1 frame per 30 second capture using just the phone’s battery. It lasted about 3 hours before it died. I next tried using a 4400mAh battery pack I picked up from Adafruit a year or so ago. That bumped my capture time up to about 6 hours. Good, but not good enough. It was also a 1A pack, so it couldn’t charge my phone as fast as the phone was discharging. I really needed about 10 hours of life with a 2A supply. That’s when I found a 18000mAh pack on Amazon for $33. It had a port that could deliver 2A. And so it was perfect for my needs.

The video above is the fruit of my labor. The 3D modeling was done using 3DSMax. The morphing towards the end was done with FantaMorph(another fantastic piece of software). And the whole video was stitched together using Adobe Premiere. I ended up needing to apply the Warp Stabilizer effect to the timelapses because it was windy out and the ladder supporting the phone shook quite a bit.

Leave a Reply

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

+ 2 = 8