Like all people who own a Digital Camera and thus have gagilions of pictures from possibly several machines/ mobile phones / etc (webcams? Your absolute best Chatrollete face? ), I like to keep the whole thing organized on the filesystem . To facilitate this, I’ve written a very simple script that goes through a directory (say your memory card filled with pictures) reads the files and their EXIF information and then plants them on another directory (say your external hard drive?) with a date structure, followed by Camera brand and Camera Model (keeping the original name).
./2010-08-22/Canon/Canon EOS 10D
A directory example
I’ve had this for a long time but only now did I get around to put it up on GitHub, should it be useful to anyone (or for public shame) . It uses the Exifer Library to read the Exif information and all you need to run it is PHP (CLI) installed (You can probably get away with PHP4 – if you absolutely must) , it has the bare minimum of parameters and doesn’t allow for much customization without changing the code, but if I’m putting it out there, I’m also making myself available for changes that might suit your need
Timelapse photography has always fascinated me, you have but to drop by Vimeo or Youtube and be blessed with impressive videos – I would mostly stick to Vimeo from the looks of the Youtube results . Now, some cameras offer some type of timelapse settings, but from what I’ve seen (on a few cameras, I’m hardly a man with a deep knowledge of the market) they offer limited frame counts with not so short intervals (minutes, instead of seconds), so for a while I wasn’t very tempted or motivated to try and timelapse myself, but recently I actually found a good mix of software that not only revived my interest in timelapse, but empowered me and made an old camera come to life and be useful again
So , onwards to my simple recipe for Timelapse videos
Ingredients:
Digital camera + tripod
So, I’m a SLR fan and I admit, I tried to timelapse with my old Canon 300D but as the 99 Error Code of Unknown Death started to flash more and more often, I tried it once, and aborted at the though of the old and battered shutter simply dying for a simple test. Now, luck would have it that I was cleaning my closet and I found my old Canon Powershot S70, that for some reason (at the time) went bad and seemed to be non-working – it was taking terribly dark pictures, and no, it wasn’t me being silly .
I took it, charged the battery, found a USB cable, plugged it in and with the help of Mister Ingredient #2 .. BOOM it worked like a charm, and at least it’s one shutter I don’t have to worry much about
gPhoto
I had some computer troubles, a 3 year old Windows XP installation not filled with Spyware and Viruses, but certainly filled with a lot of other things developers tend to accumulate , and I felt the need to change and jumped onto the Ubuntu bandwagon – a post for later perhaps – with great success and personal joy.
A result of that jump was that I stumbled into gphoto - yes, I admit it, apt-get ease of install actually makes me find new stuff more easily. Now, gPhoto is a “set of digital camera software applications for Unix-like systems” that supports more than 1300 cameras, and while this may sound vague, a quick look over the manual – or command line help – shone a light on me, a light in the form of “–capture-image” and “interval”
So what basically happens is, I could now hook up a Camera via the USB port, call up gPhoto2 and tell him to capture images forever (or with a limit of frames) within a timeinterval that it will try to keep as long as the camera helps .
We have control, we get our computer taking care of our camera and telling it to take pictures from time to time, with settings that we control, but we’ll just have a bunch of images, so we need something else
FFMPEG
Now, as luck would have it I was in the middle of a project that involved video encoding and a fair amount of FFMPEG, so I knew this would be my non-professional tool last piece of the puzzle, as we can take a bunch of images and tell FFMPEG to make a movie out of them.
The project I was doing needed to encode files using VP8, so if you want that, please, visit this tutorial on how to get FFMPEG correctly installed, It Just Works ™ and you’ll be WebM’ing in no time
Preparation
The settings change according to what your needs, camera capabilities and type of scene, I’ll give you a general run down of the commands and pipeline I have, I’ll show you some examples but after that, please, let us discuss
So, take your Digital Camera, put it on a tripod (you won’t be holding it perfectly still for hours, now will you?), connect it to your PC (or Mac if that’s your fancy) and get a terminal open for …
gphoto2 --capture-image --interval 15
This will tell gphoto2 to initialize the camera and get it cracking pictures every 15 seconds. 15 seconds incidentally is no random number, for my Powershot, it’s the fastest I can go while taking pictures with enough quality for a Full HD movie export (1920×1200) , if I want more I need to go onto lower resolutions.
I’ll leave the camera up for a while, usually for as long as the battery lasts , but the math is sort of easy to do, if you want a 30 fps movie, you need to take 30 pictures for each second of video. If, for instance you want a full minute that would mean 1800 pictures, at a 15 seconds interval that would mean ……………….. 7 hours and 30 minutes of picture taking , how cool is that?
So, next up, I download the pictures to my computer, put them in a directory and prepare them for FFMPEG. Now, this would be the time to mess around with the pictures, maybe resize them or crop them (FFMPEG can do that for you), but more importantly adjust Brightness, Contrast, Saturation, perhaps mess around with Levels, but keep in mind that you’ll probably want something that can be run against a batch of pictures so, don’t overdo it
Ok, preparing the files for FFMPEG means getting them with a sequential naming scheme so FFMPEG can cycle and encode them into a movie file. For this I use a bit of bash scripting that I found online (sorry, no reference ) and that looks like this
x=1; for i in *JPG; do counter=$(printf %04d $x); ln "$i" ./tmp/img"$counter".jpg; x=$(($x+1)); done
What this does is go through all files that have “JPG” inside a directory (my camera saves files with a capital JPG extension, but feel free to adjust this to your settings) and create a link inside a folder (tmp) with four digits (change this accordingly – %04d) . By the end of this, we have a nice little directory with 0001.jpg all the way to xxxx.jpg in sequential order for mister FFMPEG.
So, having this, all I need to do is tell FFMPEG to grab the files and pack them into a video file, a hd1080 WebM encoded file with the following command:
This takes a while, but by the end of it – assuming you had no errors breaking the process – you’ll have your very own Full HD – VP8 video ready to Youtube uploading .. or whatever you do with video files
Some Examples
I’ll leave you with three initial attempts, none particularly brilliant, I was furious about trying this out and I hardly remember the settings but it will give you an idea, and if you look at the kitchen one, you’ll see that different types of scenes require different settings, in that case the interval was too long (but I remember using 15s for it, so it needs to be much faster) for anything useful to come out.For city or outside scenes, I think doing it by night adds an interesting and much appreciated effect, slow exposure, you’ll get light streaks that make the scenes more fluid, in the day scenes it’s easy to spot objects jumping around.
Final thoughts
All of this is a first attempt at things, I think the pipeline is ok, but I think that either by using professional software or by adding something to the mix, we can generate some in-between frames to both enrich the movie but also make it longer and have a better control of the timelapse rate.
I hope this can be useful in anyway to you, I know all these factors combined motivated and empowered me to experiment with timelapse, and I wanted to share it, but it’s only one way, and I’m sure there are countless, so if you know other techniques or have more ingredients to add to the mix, please please please, let’s talk about it
I’ve been going through a lot of personal life phases lately, for a long long time, in fact, I’m writing this post on the first vacation time I had for some 5 years – I’ve been to the Algarve, but I did my 10h work day either way, so that’s hardly … anything. My kid is almost 5 and we’re having a second one in late November (a second boy, boy oh boy ), I’ve had an incredibly – if such a word is adequate - busy and roller-coaster type of life and yet I have little to show for, if you don’t take into to account the problems and challenges I had to (and still) face and this has also reflected itself on my online presence .
I’ve grown anxious, I hid myself for a while (outside of the problem scope, in that regard I believe in a in-your-face approach), depended and looked for low depth interactions on quick mediums – Twitter is my absolutely favorite and more “prolific” online presence, I neglected my blog, trying to feed it by purely online presence and activity (and having the occasional debacle with certain Lifestream + Twitter plugins) instead of taking care of it myself and it shows, both on the blog and on my attitude.
I want to tell my tale, and I will eventually talk about it, but I’m still in the middle of it and it’s the sort of thing that “entrepreneurs” sometimes go through – completely outside the glamor, fame and fortune that you might take for granted . Despite my shyness and silent mood, a few close – and not so close – friends recognized the general situation and helped me and my family in whatever ways they could, I am a richer person for having them and to them I’m grateful.
The fact that I’m back here now and that I start to acknowledge these … character and life problems is part of a roadmap I’m trying to build and follow, my life from 2007 to 2009 have been almost 100% based on problems, large scale non-health-but-scary-as-such ones, and while they are not entirely resolved, they have been addressed and put into a more manageable state, so now is the time for me to take care of myself and pick up the pieces again .. and at 31 – no longer will I be able to be a young millionaire like the Ad said but I’ll keep at it, if anything because I absolutely love what I do and because I absolutely love life – even if only know I’m acknowledging it.
Very nice advertisement by McDonald’s, we don’t see this sort of thing on a day to day basis but it’s not super-rare either. The reasons are easy, there’s cost, maintenance (replacing a sheet of paper is easy, mechanical/electronic stuff not so much) , risk of vandalism (and the interest level must rise with these ones) but, when there’s budget and a will to risk it, it beats the crap out of conventional posters
As the Summer Silly Shows creep up on us via national television (as in Portuguese National ) , RTP2 – as usual – detaches itself and is showing a range of documentaries about the Moon. Today I caught one called “Tank on the Moon” – from what I gather, done by/for the Science Channel – and I was amazed, both from my own ignorance on the subject but also from the sheer magnitude that certain scientific feats have.
During the 1960s, the United States and the Soviet Union were engaged in a feverish competition to be the first to set foot on the moon. We know who won this race, but less about a secret chapter. The Soviets many not have sent a man to the moon, but they successfully guided two small robots by remote control from the earth. For 16 months between 1970 and 1973, these “Lunokhods” traveled more than thirty miles over the moon’s surface. With the declassification of the former USSR space archives, along with recollections by several of the key participants in the Lunokhod program, the true story of the Russian lunar robots can finally be told.
Lunokhod 1 robot vehicle (Wikipedia)
The documentary tells the tale of how Russian scientists / engineers put two rovers on the moon in 1970 . Two robotic, remotely operated Rovers on a Celestial Body that they weren’t sure the surface was solid, dusty, sandy, rocky, whatever . This is the essence of projects and watching the Documentary had a profound effect on me, because we know all about the Apollo 11 and Neil Amstrong and everything surrounding that – mind you, an equally yet different amazing feat – but this suffered from what I think were two key aspects, the American Shouting Power and the Sovied Whispering Politics , and this is my own personal-average-joe-on-a-country-possibly-equally-apart-from-both-superpowers view , not a certified one .
Sojourner Rover (Wikipedia)
The important thing for me was, 27 years before the Mars Pathfinder – a project that grasped my own imagination and awe, a group of people built, in a world where – probably – the total ammount of computer power equals my phone or possibly micro-wave oven, lauched, landed and controlled a robot on the surface of the Moon . Now, this also takes me to my second imeadiate thought … damn , this was all because of the Cold War , the un-nobliest of reasons . I know I’m from the computer boom generation, and I – too easily – expect every single aspect of technology to follow a sort of Moore’s Law rule, and yes, we still fill huge tanks of super powerfull combustant and blast (literarly) heaps of metal into space, but the Moon is again on our scopes in what will probably be some 50 years after man and machine had been there .
Damn the Cold War but how can we reproduce it’s effect in this day and age? I’m guessing we need to find a way to make a profit from the Moon, I’m sure that would spur the right amount of interest in the world . How sad is it, that we (as in the Human Race) need to be motivated by hatred and power struggles to find the motivation to do the things we’ve shown we can do ? Humans always need a highier purpose , I almost wish Religion would step in and say that God wants us to build a space ship (no Tom Cruise, not you ) .
“Everyone is capable of doing extraordinary things, each in his own way. Some are perfectly happy doing simple things in good spirits; others, however, concentrate on details. We are all different, and it really doesn’t matter if you focus on space travel or work in the fields. What is important is to do what you really want.” – Alexander Kemurdzhian
For a particular project we had to brush up a bit on the ActionScript 3 Drawing API (Flash 10). We needed to provide a sort of whiteboard where people could draw up vectors and save the metadata to XML for later use and also so we could process either PDF or some large scale images . We struggled a bit with performance and had to change the approach a couple of times settling, at some point Flash 10 was coming out and we took advantage of the new Vectors and Drawing API changes, we also had to work up the math / geometry equations so the vectors could be deleted / split using an Eraser tool .
All went fine, we delivered the project, gained some experience and now we leave you with a in-between experiment so you can have some fun (or not ) . Draw away to your hear content, let the randomness help you and when you’re happy press our logo, save the snapshot and SHARE IT with us
If your reading via an RSS tool you might not see the Flash app, but it’s easy enough to follow the link to the post , so go ahead
You need Flash 10 Player , sorry . Yes, if you use the Debugger Version you might see some weird stuff
Lately I’ve been given a few interesting challenges, I had to learn ActionScript 3, Flex, Air, learned to hate a little bit Flash (hate it or misunderstand it … whatever comes first) . Anyway, learning is always interesting but Learning while on a deadline is not what I call the Perfect Mental State, but we managed, and when a breather was necessary to put ideas down, we had to start all over again, still in the ActionScript world but this time PaperVision is being called to handle some graphical requirements.
Now, I had some general knowledge of Papervision, enough to put it on top of the list as soon as the requirements came up, so I jumped at it . I went with version 2.0, no need to start with “old” code , and became quickly overwhelmed by it , Cameras? Viewports? Scenes? And that’s just to get a cold, grey screen going . Luckily, we live in G-World, and information is but a keystroke away, so I found a couple (hundred ) of nice Tutorials that offered a Model / Framework / Template approach to it all .
First is the Papervision 2tutorials , it covers all basic aspects that you need to get started and gives you a Base Template that covers all your setup needs . I then found another series of tutorials that also ofered some template classes, but this one was a bit more modular and I’m now working over this .. plus, the very first thing they did was draw up a cool space ship, so it was a winner
Now, this got me going but I still have a long way to go, either way it’s good exercise to share these initial steps (feel free to point me to other interesting starting points ) , meanwhile, the Papervision Blog brings us an excelent Showcase of what people are doing with it and this blog entry throws a huge list of examples too, so plenty to look at if you want to take a look at Papervision
I leave you with a good example of a combination of tools, including Papervision that has brought Flash, at least to me, to a different level than it used to be , more information here
February 22nd … that was my last post – not that virtual life ended there of course, plenty was said over time witnessed by different platforms, condenced by FriendFeed . A lot things happened since then, life for the most part got worse and the last months have been a struggle and will continue to be for quite a while … but that’s life , if I wanted stability … errrr … I would work for someone else? Who knows , but that’s besides the point, point is life is happening, my son is great (apart for last weeks fever thingy) , my wife is great as is the rest of the family.
Having a blog , or a place of my own, back was a goal I had, of course being who I am I have millions great fantastic world-changing ideas for the RagingNexus and, of course being who I am, all these will still be thoughts for a while (of forever even ) , so I decided to start with plain WordPress, get a theme in, salvage my old database and actually have something working . And this is what I have, and now, I have something I can use and improve …. a life will happen
Yep, the race is on, $30 million to whomever safely lands (as in, In One piece) a robot on the surface of the Moon and get it “walk” 500mts and take lovely pictures (extra points for the Bot who uploads them to twitxr) . Now, 10 teams are already in, ranging from Team Italia to Romania’s ARCA and also the guys wanting to Open Source all this.
Now, these are (in this context) exciting times, since we’re looking (as Humanity) at the aging Shuttles doing a couple of flights per year, where each flight is a total risk management nightmare and yet we can’t help wounder why is it that 20 years was not enought to come up with other ways to do things, and I know, we’ve probably reached the Technological Barrier and we’re waiting for a Breakthrough (anti-gravity Mega Field and what not), but getting “ordinary” people to work on this (not just Government Suits) brings a little bit of hope, and even if most miss the moon (or indeed miss flight as a whole and come crashing down in flames and debris) SOMETHING will happen, and we’ll (humanity you know) be proud of ourselfs again
Oh yeah, and bad bad google stole the idea , credit for the guy for thinking up this, but I submit that at least 2033556 anonymous people also had a similar idea … being original is overrated we’re (as in humanity again) just too many